|
@@ -0,0 +1,63 @@
|
|
|
|
+program ScrollWheelTest1;
|
|
|
|
+
|
|
|
|
+uses
|
|
|
|
+ {$IFDEF Unix}
|
|
|
|
+ cthreads,
|
|
|
|
+ {$ENDIF}
|
|
|
|
+ Fresnel, // initializes the widgetset
|
|
|
|
+ Fresnel.App,
|
|
|
|
+ Classes, SysUtils, Fresnel.Forms, Fresnel.Controls, Fresnel.Events,
|
|
|
|
+ FCL.Events, Fresnel.Classes;
|
|
|
|
+
|
|
|
|
+type
|
|
|
|
+
|
|
|
|
+ { TMainForm }
|
|
|
|
+
|
|
|
|
+ TMainForm = class(TFresnelForm)
|
|
|
|
+ Body: TBody;
|
|
|
|
+ HeaderLabel: TLabel;
|
|
|
|
+ public
|
|
|
|
+ constructor CreateNew(AOwner: TComponent); override;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+{ TMainForm }
|
|
|
|
+
|
|
|
|
+constructor TMainForm.CreateNew(AOwner: TComponent);
|
|
|
|
+begin
|
|
|
|
+ inherited CreateNew(AOwner);
|
|
|
|
+ Name:='MainForm';
|
|
|
|
+
|
|
|
|
+ FormBounds:=BoundsRectFre(100,100,200,150);
|
|
|
|
+
|
|
|
|
+ Stylesheet.Text:=''
|
|
|
|
+ +'div {'+LineEnding
|
|
|
|
+ +' border: 2px solid blue;'
|
|
|
|
+ +' padding: 10px;'
|
|
|
|
+ +'}'+LineEnding;
|
|
|
|
+
|
|
|
|
+ Body:=TBody.Create(Self);
|
|
|
|
+ with Body do begin
|
|
|
|
+ Name:='Body';
|
|
|
|
+ Parent:=Self;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ HeaderLabel:=TLabel.Create(Self);
|
|
|
|
+ with HeaderLabel do begin
|
|
|
|
+ Name:='HeaderLabel';
|
|
|
|
+ Style:='border: 1px solid red;';
|
|
|
|
+ Caption:='Fresnel is a visual component library based on CSS and custom drawn components';
|
|
|
|
+ Parent:=Body;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ Visible:=true;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+var
|
|
|
|
+ MainForm: TMainForm;
|
|
|
|
+begin
|
|
|
|
+ FresnelApplication.HookFresnelLog:=true;
|
|
|
|
+ FresnelApplication.Initialize;
|
|
|
|
+ FresnelApplication.CreateForm(TMainForm,MainForm);
|
|
|
|
+ FresnelApplication.Run;
|
|
|
|
+end.
|
|
|
|
+
|