summaryrefslogtreecommitdiff
path: root/examples/gui
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gui')
-rw-r--r--examples/gui/alignment/aligntest.lpi3
-rw-r--r--examples/gui/imgtest/bitmaptest.dpr36
-rw-r--r--examples/gui/imgtest/bitmaptest.lpi15
-rw-r--r--examples/gui/modalforms/modalforms.lpi4
-rw-r--r--examples/gui/stdimages/stdimglist.lpi3
-rw-r--r--examples/gui/timertest/timertest.lpi10
6 files changed, 31 insertions, 40 deletions
diff --git a/examples/gui/alignment/aligntest.lpi b/examples/gui/alignment/aligntest.lpi
index 5d943df0..4baa8867 100644
--- a/examples/gui/alignment/aligntest.lpi
+++ b/examples/gui/alignment/aligntest.lpi
@@ -25,7 +25,8 @@
</RunParams>
<RequiredPackages Count="1">
<Item1>
- <PackageName Value="fpGFX2"/>
+ <PackageName Value="fpgui_package"/>
+ <MinVersion Minor="5" Valid="True"/>
</Item1>
</RequiredPackages>
<Units Count="1">
diff --git a/examples/gui/imgtest/bitmaptest.dpr b/examples/gui/imgtest/bitmaptest.dpr
index 8ab86361..c8000d15 100644
--- a/examples/gui/imgtest/bitmaptest.dpr
+++ b/examples/gui/imgtest/bitmaptest.dpr
@@ -7,46 +7,40 @@ uses
SysUtils,
gfxbase,
fpgfx,
- gfx_imgfmt_bmp;
+ gfx_imgfmt_bmp,
+ gui_form;
type
- TMainForm = class(TfpgWindow)
+ TMainForm = class(TfpgForm)
private
img: TfpgImage;
- procedure MsgPaint(var msg: TfpgMessageRec); message FPGM_PAINT;
- procedure MsgClose(var msg: TfpgMessageRec); message FPGM_CLOSE;
+ protected
+ procedure HandlePaint; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
- procedure Show;
end;
{ TMainForm }
-procedure TMainForm.MsgPaint(var msg: TfpgMessageRec);
+procedure TMainForm.HandlePaint;
begin
- Canvas.BeginDraw;
+ Canvas.BeginDraw; // activate double buffering in time.
+ inherited HandlePaint;
Canvas.DrawImage(0, 0, img);
Canvas.EndDraw;
end;
-procedure TMainForm.MsgClose(var msg: TfpgMessageRec);
-begin
- ReleaseWindowHandle;
- Halt(0);
-end;
-
constructor TMainForm.Create(AOwner: TComponent);
var
i, j: integer;
begin
inherited Create(AOwner);
- FWidth := 256;
- FHeight := 256;
- WindowAttributes := [waScreenCenterPos];
-
+ SetPosition(100, 100, 256, 256);
+ WindowTitle := 'fpGUI Bitmap Test';
+
img := TfpgImage.Create;
img.AllocateImage(32, 256, 256);
img.UpdateImage;
@@ -62,13 +56,6 @@ begin
inherited Destroy;
end;
-procedure TMainForm.Show;
-begin
- AllocateWindowHandle;
- // We can only set the title once we have a window handle.
- SetWindowTitle('fpGUI Bitmap Test');
-end;
-
procedure MainProc;
var
@@ -80,6 +67,7 @@ begin
fpgApplication.Run;
end;
+
begin
MainProc;
end.
diff --git a/examples/gui/imgtest/bitmaptest.lpi b/examples/gui/imgtest/bitmaptest.lpi
index c8bf98e0..de1157a5 100644
--- a/examples/gui/imgtest/bitmaptest.lpi
+++ b/examples/gui/imgtest/bitmaptest.lpi
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="\"/>
+ <PathDelim Value="/"/>
<Version Value="5"/>
<General>
<Flags>
@@ -9,7 +9,7 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value=".\"/>
+ <IconPath Value="./"/>
<TargetFileExt Value=""/>
<Title Value="bitmaptest"/>
</General>
@@ -18,19 +18,19 @@
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
- <DestinationDirectory Value="$(TestDir)\publishedproject\"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
+ <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
- <PackageName Value="fpGFX2"/>
+ <PackageName Value="fpgui_package"/>
+ <MinVersion Minor="5" Valid="True"/>
</Item1>
</RequiredPackages>
<Units Count="1">
@@ -43,10 +43,9 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
- <PathDelim Value="\"/>
<SearchPaths>
- <IncludeFiles Value="..\source\"/>
- <OtherUnitFiles Value="..\source\;..\source\x11\;..\gui\"/>
+ <IncludeFiles Value="../source/"/>
+ <OtherUnitFiles Value="../source/;../source/x11/;../gui/"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
diff --git a/examples/gui/modalforms/modalforms.lpi b/examples/gui/modalforms/modalforms.lpi
index 2d2e9d9d..4dffc0d7 100644
--- a/examples/gui/modalforms/modalforms.lpi
+++ b/examples/gui/modalforms/modalforms.lpi
@@ -9,6 +9,7 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
+ <IconPath Value="./"/>
<TargetFileExt Value=""/>
</General>
<VersionInfo>
@@ -28,7 +29,8 @@
</RunParams>
<RequiredPackages Count="1">
<Item1>
- <PackageName Value="fpGFX2"/>
+ <PackageName Value="fpgui_package"/>
+ <MinVersion Minor="5" Valid="True"/>
</Item1>
</RequiredPackages>
<Units Count="1">
diff --git a/examples/gui/stdimages/stdimglist.lpi b/examples/gui/stdimages/stdimglist.lpi
index f43952b3..1d6f96bb 100644
--- a/examples/gui/stdimages/stdimglist.lpi
+++ b/examples/gui/stdimages/stdimglist.lpi
@@ -28,7 +28,8 @@
</RunParams>
<RequiredPackages Count="1">
<Item1>
- <PackageName Value="fpGFX2"/>
+ <PackageName Value="fpgui_package"/>
+ <MinVersion Minor="5" Valid="True"/>
</Item1>
</RequiredPackages>
<Units Count="1">
diff --git a/examples/gui/timertest/timertest.lpi b/examples/gui/timertest/timertest.lpi
index 0dfae648..32287328 100644
--- a/examples/gui/timertest/timertest.lpi
+++ b/examples/gui/timertest/timertest.lpi
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="\"/>
+ <PathDelim Value="/"/>
<Version Value="5"/>
<General>
<Flags>
@@ -9,7 +9,7 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value=".\"/>
+ <IconPath Value="./"/>
<TargetFileExt Value=""/>
</General>
<VersionInfo>
@@ -23,12 +23,13 @@
<RunParams>
<local>
<FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
+ <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
- <PackageName Value="fpGFX2"/>
+ <PackageName Value="fpgui_package"/>
+ <MinVersion Minor="5" Valid="True"/>
</Item1>
</RequiredPackages>
<Units Count="1">
@@ -41,7 +42,6 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
- <PathDelim Value="\"/>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>