window T00:00:00.000 2019-05-07T20:39:30.780 0 0 0 1 default 1 0 1 1 com.smartmobilestudio.app http://*/* https://*/* tel:* sms:* mailto:* geo:* 1 1 1 0 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 default.css 0 0 main.js index.html www\ 0 1 0 0 0 1 Ubuntu https://fonts.googleapis.com/css?family=Ubuntu window 2019-05-06T07:54:10.347Z 2019-05-06T07:54:41.138 Unit1 2019-05-06T07:54:10.347Z 2019-05-06T07:54:42.549 Form1 2019-05-06T07:54:10.347Z 2019-05-07T08:37:00.232 ' + Window1.Content.InnerHTML; end; // var Window2 : TWindow := TWindow.Create(self); Window2.SetBounds(150,100,500,300); Window2.Title := 'window2'; var Button1 : TW3Button := TW3Button.Create(Window2.Content); Button1.SetBounds(150,150,200,35); Button1.Caption := 'Button1'; end; procedure TForm1.InitializeObject; begin inherited; {$I 'Form1:impl'} end; procedure TForm1.Resize; begin inherited; end; initialization Forms.RegisterForm({$I %FILE%}, TForm1); end.]]>
2019-05-06T07:54:10.348 2019-05-07T08:34:33.360 W3Form Form1
]]>
1 1 1
UWindow 2019-05-06T07:58:35.359Z 2019-05-07T20:39:30.780 self.left + self.width - 30) and // (e.clientX < self.left + self.width) then //begin Content.handle.style.cursor := 'nwse-resize'; var saveX := e.clientX; var saveY := e.clientY; Content.handle.onmousemove := procedure(e: variant) begin self.width := self.width - (saveX - e.clientX); self.height := self.height - (saveY - e.clientY); PrevSize := TRect.CreateSized(left, top, width, height); saveX := e.clientX; saveY := e.clientY; end; //end; end; // Content.handle.onmouseup := procedure(e: variant) begin Content.handle.onmousemove := null; //nullify mousemove Content.handle.style.cursor := 'default'; end; end; procedure TWindow.MakeWindowVisible; //BringToFront begin Header.handle.onclick := procedure(e: variant) begin var z : integer := 0; var x := document.getElementsByClassName('TWindow'); for var i := 0 to x.length-1 do begin var y : integer := strtoint(x[i].style.zIndex); If y > z then z := y; //determine highest zIndex in TWindow collection end; self.handle.style.zIndex := inttostr(z+1); //inc by 1 end; Content.Handle.onclick := header.Handle.onclick; end; procedure TWindow.ReSize; begin inherited ReSize; Header.SetBounds(0,0,self.width-2,header.headerheight); Content.SetBounds(0,header.headerheight,self.width-2,self.height-2-header.headerheight); Header.TitleText.SetBounds(0,0,Header.width-(3*header.headerheight),Header.headerheight-2); end; procedure TWindow.SetTitle; begin Header.TitleText.innerHtml := '
' + title + '
'; end; initialization var Sheet := TW3StyleSheet.GlobalStyleSheet; var StyleCode := #' .TWindow { border : 1px solid silver; } .THeader { background: rgb(222,225,230); padding: 5px; } .TContent { background: #fff; padding: 5px; border-top : 1px solid lightgray; } '; Sheet.Append(StyleCode); // ButtonStyling := #' margin: 0px; padding: 0px; margin-right: 2px; //top: 0px; font-size: 12px; border: none; box-shadow: none; border-radius: 0px; height: 16px; width: 16px; float: right; cursor: pointer; '; end. ]]>
Browser Visual Components Project