diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-23 11:17:05 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-23 11:17:05 +0000 |
commit | c9be342c9263cd72b93fc54ba90330152844d0c3 (patch) | |
tree | 10ae7ad84f8fce30b2084d1cbf6461b8ec4e64ec /prototypes | |
parent | cd81d8061e71fffb318c8669d2c310206bf5f2a9 (diff) | |
download | fpGUI-c9be342c9263cd72b93fc54ba90330152844d0c3.tar.xz |
Restructure Part 5.
* Created new packages for Corelib and GUI.
* Updated all examples to use the new packages.
Restructure should now be complete.
Diffstat (limited to 'prototypes')
-rw-r--r-- | prototypes/fpgui2/tests/bitmaptest.dpr | 67 | ||||
-rw-r--r-- | prototypes/fpgui2/tests/bitmaptest.lpi | 63 | ||||
-rw-r--r-- | prototypes/fpgui2/tests/edittest.dpr | 6 | ||||
-rw-r--r-- | prototypes/fpgui2/tests/edittest.lpi | 3 | ||||
-rw-r--r-- | prototypes/fpgui2/tests/themetest.lpi | 3 | ||||
-rw-r--r-- | prototypes/fpgui2/tests/themetest.lpr | 10 |
6 files changed, 12 insertions, 140 deletions
diff --git a/prototypes/fpgui2/tests/bitmaptest.dpr b/prototypes/fpgui2/tests/bitmaptest.dpr deleted file mode 100644 index c8b98193..00000000 --- a/prototypes/fpgui2/tests/bitmaptest.dpr +++ /dev/null @@ -1,67 +0,0 @@ -program bitmaptest; - -{$mode objfpc}{$H+} - -uses - Classes, - SysUtils, - gfxbase, - fpgfx, - gfx_imgfmt_bmp, - gui_form; - -type - - { TMainForm } - - TMainForm = class(TfpgForm) - public - procedure AfterCreate; override; - procedure HandlePaint; override; - end; - - - { TMainForm } - - procedure TMainForm.AfterCreate; - begin - SetPosition(100, 100, 256, 256); - WindowTitle := 'fpGUI Bitmap Test'; - end; - - procedure TMainForm.HandlePaint; - var - img: TfpgImage; - i, j: integer; - begin - Canvas.BeginDraw; // activate double buffering in time. - inherited HandlePaint; - - img := TfpgImage.Create; - img.AllocateImage(32, 256, 256); - img.UpdateImage; - // populate the bitmap with pretty colors :-) - for j := 0 to 255 do - for i := 0 to 255 do - PLongWord(img.ImageData)[j * 256 + i] := (i shl 16) or (j shl 8); - - Canvas.DrawImage(0, 0, img); - img.Free; - Canvas.EndDraw; - end; - - procedure MainProc; - var - frm: TMainForm; - begin - fpgApplication.Initialize; - frm := TMainForm.Create(nil); - frm.Show; - fpgApplication.Run; - end; - - -begin - MainProc; -end. - diff --git a/prototypes/fpgui2/tests/bitmaptest.lpi b/prototypes/fpgui2/tests/bitmaptest.lpi deleted file mode 100644 index 844bcc82..00000000 --- a/prototypes/fpgui2/tests/bitmaptest.lpi +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0"?> -<CONFIG> - <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="5"/> - <General> - <Flags> - <SaveOnlyProjectUnits Value="True"/> - </Flags> - <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> - <IconPath Value="./"/> - <TargetFileExt Value=""/> - <Title Value="bitmaptest"/> - </General> - <VersionInfo> - <ProjectVersion Value=""/> - </VersionInfo> - <PublishOptions> - <Version Value="2"/> - <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)"/> - </local> - </RunParams> - <RequiredPackages Count="1"> - <Item1> - <PackageName Value="fpGFX2"/> - </Item1> - </RequiredPackages> - <Units Count="2"> - <Unit0> - <Filename Value="bitmaptest.dpr"/> - <IsPartOfProject Value="True"/> - <UnitName Value="bitmaptest"/> - </Unit0> - <Unit1> - <Filename Value="uhelpers.pas"/> - <IsPartOfProject Value="True"/> - <UnitName Value="uhelpers"/> - </Unit1> - </Units> - </ProjectOptions> - <CompilerOptions> - <Version Value="5"/> - <SearchPaths> - <IncludeFiles Value="../source/"/> - <OtherUnitFiles Value="../source/;../source/x11/;../gui/"/> - </SearchPaths> - <CodeGeneration> - <Generate Value="Faster"/> - </CodeGeneration> - <Other> - <CustomOptions Value="-FUunits -"/> - <CompilerPath Value="$(CompPath)"/> - </Other> - </CompilerOptions> -</CONFIG> diff --git a/prototypes/fpgui2/tests/edittest.dpr b/prototypes/fpgui2/tests/edittest.dpr index 31a85587..500be048 100644 --- a/prototypes/fpgui2/tests/edittest.dpr +++ b/prototypes/fpgui2/tests/edittest.dpr @@ -229,7 +229,7 @@ begin Height := 21; State := 0; - image := LoadImage_BMP(SetDirSeparators('../images/themes/luna/button.bmp')); + image := LoadImage_BMP(SetDirSeparators('../../../images/themes/luna/button.bmp')); image.CreateMaskFromSample(0, 0); image.UpdateImage; if not Assigned(image) then @@ -255,7 +255,7 @@ end; bmp: TfpgImage; i: integer; begin - bmp := LoadImage_BMP(SetDirSeparators('../images/themes/luna/button.bmp')); + bmp := LoadImage_BMP(SetDirSeparators('../../../images/themes/luna/button.bmp')); bmp.CreateMaskFromSample(0, 0); bmp.UpdateImage; @@ -359,7 +359,7 @@ end; xpsilver.Top := 230; xpsilver.Width := 75; xpsilver.Text := 'XP Silver'; - bmp := LoadImage_BMP(SetDirSeparators('../images/themes/silver/button.bmp')); + bmp := LoadImage_BMP(SetDirSeparators('../../../images/themes/silver/button.bmp')); bmp.CreateMaskFromSample(0, 0); bmp.UpdateImage; xpsilver.ThemeImage := bmp; diff --git a/prototypes/fpgui2/tests/edittest.lpi b/prototypes/fpgui2/tests/edittest.lpi index 3e9244a7..c96925dd 100644 --- a/prototypes/fpgui2/tests/edittest.lpi +++ b/prototypes/fpgui2/tests/edittest.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="2"> diff --git a/prototypes/fpgui2/tests/themetest.lpi b/prototypes/fpgui2/tests/themetest.lpi index 7ec6778f..2e9f7080 100644 --- a/prototypes/fpgui2/tests/themetest.lpi +++ b/prototypes/fpgui2/tests/themetest.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/prototypes/fpgui2/tests/themetest.lpr b/prototypes/fpgui2/tests/themetest.lpr index ed4cc66b..7a99a55b 100644 --- a/prototypes/fpgui2/tests/themetest.lpr +++ b/prototypes/fpgui2/tests/themetest.lpr @@ -196,7 +196,7 @@ begin inherited Create(AOwner); Width := 17; State := 0; - image := LoadImage_BMP(SetDirSeparators('../images/themes/luna/scrollbar.bmp')); + image := LoadImage_BMP(SetDirSeparators('../../../images/themes/luna/scrollbar.bmp')); // image.CreateMaskFromSample(0, 0); image.UpdateImage; @@ -369,7 +369,7 @@ begin Height := 21; State := 0; - image := LoadImage_BMP(SetDirSeparators('../images/themes/luna/button.bmp')); + image := LoadImage_BMP(SetDirSeparators('../../../images/themes/luna/button.bmp')); image.CreateMaskFromSample(0, 0); image.UpdateImage; if not Assigned(image) then @@ -414,7 +414,7 @@ begin xpsilver.Top := 45; xpsilver.Width := 75; xpsilver.Text := 'XP Silver'; - bmp := LoadImage_BMP(SetDirSeparators('../images/themes/silver/button.bmp')); + bmp := LoadImage_BMP(SetDirSeparators('../../../images/themes/silver/button.bmp')); bmp.CreateMaskFromSample(0, 0); bmp.UpdateImage; xpsilver.ThemeImage := bmp; @@ -424,7 +424,7 @@ procedure TMainForm.CreateScrollbars; var bmp: TfpgImage; begin - bmp := LoadImage_BMP(SetDirSeparators('../images/themes/silver/scrollbar.bmp')); + bmp := LoadImage_BMP(SetDirSeparators('../../../images/themes/silver/scrollbar.bmp')); bmp.UpdateImage; sbluna := TThemeScrollBar.Create(self); @@ -468,7 +468,7 @@ begin inherited HandlePaint; - image := LoadImage_BMP(SetDirSeparators('../images/themes/luna/scrollbar.bmp')); + image := LoadImage_BMP(SetDirSeparators('../../../images/themes/luna/scrollbar.bmp')); // image.CreateMaskFromSample(0, 0); image.UpdateImage; |