lainz пре 9 година
родитељ
комит
725c52f447

+ 4 - 0
.gitignore

@@ -7,3 +7,7 @@ lib
 debug
 *.res
 *.lrt
+*.o
+*.ppu
+*.or
+*.compiled

BIN
test/test_extra/fpGUI theme/aerow8.zip


+ 560 - 0
test/test_extra/fpGUI theme/mystyle.pas

@@ -0,0 +1,560 @@
+unit mystyle;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, SysUtils, fpg_main, fpg_base,
+  BGRABitmap, BGRABitmapTypes, BGRASliceScaling, Zipper, FPReadPNG;
+
+const
+  WIN10_3DDKSHADOW_COLOR = $00696969;
+  WIN10_3DLIGHT_COLOR = $00E3E3E3;
+  WIN10_ACTIVEBORDER_COLOR = $00B4B4B4;
+  WIN10_ACTIVECAPTION_COLOR = $00D1B499;
+  WIN10_APPWORKSPACE_COLOR = $00ABABAB;
+  WIN10_BACKGROUND_COLOR = clBlack;
+  WIN10_BTNFACE_COLOR = $00F0F0F0;
+  WIN10_BTNHIGHLIGHT_COLOR = clWhite;
+  WIN10_BTNSHADOW_COLOR = $00A0A0A0;
+  WIN10_BTNTEXT_COLOR = clBlack;
+  WIN10_CAPTIONTEXT_COLOR = clBlack;
+  WIN10_FORM_COLOR = $00F0F0F0;
+  WIN10_GRADIENTACTIVECAPTION_COLOR = $00EAD1B9;
+  WIN10_GRADIENTINACTIVECAPTION_COLOR = $00F2E4D7;
+  WIN10_GRAYTEXT_COLOR = $006D6D6D;
+  WIN10_HIGHLIGHTTEXT_COLOR = $00FF9933;
+  WIN10_HIGHLIGHT_COLOR = $00FF9933;
+  WIN10_HOTLIGHT_COLOR = $00CC6600;
+  WIN10_INACTIVEBORDER_COLOR = $00FCF7F4;
+  WIN10_INACTIVECAPTIONTEXT_COLOR = $00544E43;
+  WIN10_INACTIVECAPTION_COLOR = $00DBCDBF;
+  WIN10_INFOBK_COLOR = $00E1FFFF;
+  WIN10_INFOTEXT_COLOR = clBlack;
+  WIN10_MENUBAR_COLOR = $00F0F0F0;
+  WIN10_MENUHIGHLIGHT_COLOR = $00FF9933;
+  WIN10_MENUTEXT_COLOR = clBlack;
+  WIN10_MENU_COLOR = $00F0F0F0;
+  WIN10_SCROLLBAR_COLOR = $00C8C8C8;
+  WIN10_WINDOWFRAME_COLOR = $00646464;
+  WIN10_WINDOWTEXT_COLOR = clBlack;
+  WIN10_WINDOW_COLOR = clWhite;
+
+type
+
+  { TBGRAZip }
+
+  TBGRAZip = class
+  private
+    Bmp: TBGRABitmap;
+  private
+    procedure DoCreateOutZipStream(Sender: TObject; var AStream: TStream;
+      AItem: TFullZipFileEntry);
+    procedure DoDoneOutZipStream(Sender: TObject; var AStream: TStream;
+      AItem: TFullZipFileEntry);
+  public
+    function Extract(ZipName, FileName: string): TBGRABitmap;
+  end;
+
+  { TMemoryStreamZip }
+
+  TMemoryStreamZip = class
+  private
+    Stm: TMemoryStream;
+  private
+    procedure DoCreateOutZipStream(Sender: TObject; var AStream: TStream;
+      AItem: TFullZipFileEntry);
+    procedure DoDoneOutZipStream(Sender: TObject; var AStream: TStream;
+      AItem: TFullZipFileEntry);
+  public
+    function Extract(ZipName, FileName: string): TMemoryStream;
+  end;
+
+  { TBitmapTheme }
+
+  TBitmapTheme = class
+  private
+    // general
+    FButton: TBGRAMultiSliceScaling;
+    FCheckBox: TBGRAMultiSliceScaling;
+    FRadioButton: TBGRAMultiSliceScaling;
+    FProgressBarHorizontalBackground: TBGRAMultiSliceScaling;
+    FProgressBarVerticalBackground: TBGRAMultiSliceScaling;
+    FProgressBarHorizontalFill: TBGRAMultiSliceScaling;
+    FProgressBarVerticalFill: TBGRAMultiSliceScaling;
+    // extra
+    FArrow: TBGRAMultiSliceScaling;
+    FArrowLeft: TBGRAMultiSliceScaling;
+    FArrowRight: TBGRAMultiSliceScaling;
+    FCloseButton: TBGRAMultiSliceScaling;
+    // settings
+    FFolder: string;
+    FTickmark: boolean;
+    FDPI: integer;
+    FDebug: boolean;
+    FResourcesLoaded: boolean;
+    function GetArrowLeftSkin: TBGRAMultiSliceScaling;
+    function GetArrowRightSkin: TBGRAMultiSliceScaling;
+    function GetArrowSkin: TBGRAMultiSliceScaling;
+    function GetButtonSkin: TBGRAMultiSliceScaling;
+    function GetCheckBoxSkin: TBGRAMultiSliceScaling;
+    function GetCloseButtonSkin: TBGRAMultiSliceScaling;
+    function GetProgressBarHorizontalBackgroundSkin: TBGRAMultiSliceScaling;
+    function GetProgressBarHorizontalFillSkin: TBGRAMultiSliceScaling;
+    function GetProgressBarVerticalBackgroundSkin: TBGRAMultiSliceScaling;
+    function GetProgressBarVerticalFillSkin: TBGRAMultiSliceScaling;
+    function GetRadioButtonSkin: TBGRAMultiSliceScaling;
+    procedure SetFDebug(AValue: boolean);
+    procedure SetFDPI(AValue: integer);
+    procedure SetFFolder(AValue: string);
+    procedure SetFTickmark(AValue: boolean);
+  protected
+    procedure LoadBitmapResources;
+    procedure FreeBitmapResources;
+  public
+    constructor Create(Folder: string);
+    destructor Destroy; override;
+  public
+    // general
+    property Button: TBGRAMultiSliceScaling read GetButtonSkin;
+    property CheckBox: TBGRAMultiSliceScaling read GetCheckBoxSkin;
+    property RadioButton: TBGRAMultiSliceScaling read GetRadioButtonSkin;
+    property ProgressBarHorizontalBackground: TBGRAMultiSliceScaling
+      read GetProgressBarHorizontalBackgroundSkin;
+    property ProgressBarVerticalBackground: TBGRAMultiSliceScaling
+      read GetProgressBarVerticalBackgroundSkin;
+    property ProgressBarHorizontalFill: TBGRAMultiSliceScaling
+      read GetProgressBarHorizontalFillSkin;
+    property ProgressBarVerticalFill: TBGRAMultiSliceScaling
+      read GetProgressBarVerticalFillSkin;
+    // extra
+    property Arrow: TBGRAMultiSliceScaling read GetArrowSkin;
+    property ArrowLeft: TBGRAMultiSliceScaling read GetArrowLeftSkin;
+    property ArrowRight: TBGRAMultiSliceScaling read GetArrowRightSkin;
+    property CloseButton: TBGRAMultiSliceScaling read GetCloseButtonSkin;
+    // settings
+    property Folder: string read FFolder write SetFFolder;
+    property Tickmark: boolean read FTickmark write SetFTickmark;
+    property DPI: integer read FDPI write SetFDPI;
+    property Debug: boolean read FDebug write SetFDebug;
+  end;
+
+  { TMyStyle }
+
+  TMyStyle = class(TfpgStyle)
+  private
+    FTheme: TBitmapTheme;
+  public
+    constructor Create; override;
+    destructor Destroy; override;
+    { Button }
+    procedure DrawButtonFace(ACanvas: TfpgCanvas; x, y, w, h: TfpgCoord; AFlags: TfpgButtonFlags); override;
+  end;
+
+  function ExtractZipPNGtoBGRA(ZipName, FileName: string): TBGRABitmap;
+  function ExtractZipFiletoMemoryStream(ZipName, FileName: string): TMemoryStream;
+
+implementation
+
+uses
+  fpg_stylemanager, LazFileUtils, FileUtil, INIFiles;
+
+function ExtractZipPNGtoBGRA(ZipName, FileName: string): TBGRABitmap;
+var
+  z: TBGRAZip;
+begin
+  z := TBGRAZip.Create;
+  Result := z.Extract(ZipName, FileName);
+  z.Free;
+end;
+
+function ExtractZipFiletoMemoryStream(ZipName, FileName: string): TMemoryStream;
+var
+  z: TMemoryStreamZip;
+begin
+  z := TMemoryStreamZip.Create;
+  Result := z.Extract(ZipName, FileName);
+  z.Free;
+end;
+
+{ TBitmapTheme }
+
+procedure TBitmapTheme.SetFDebug(AValue: boolean);
+begin
+  if FDebug = AValue then
+    Exit;
+  FDebug := AValue;
+end;
+
+function TBitmapTheme.GetArrowLeftSkin: TBGRAMultiSliceScaling;
+begin
+  LoadBitmapResources;
+  Result := FArrowLeft;
+end;
+
+function TBitmapTheme.GetArrowRightSkin: TBGRAMultiSliceScaling;
+begin
+  LoadBitmapResources;
+  Result := FArrowRight;
+end;
+
+function TBitmapTheme.GetArrowSkin: TBGRAMultiSliceScaling;
+begin
+  LoadBitmapResources;
+  Result := FArrow;
+end;
+
+function TBitmapTheme.GetButtonSkin: TBGRAMultiSliceScaling;
+begin
+  LoadBitmapResources;
+  Result := FButton;
+end;
+
+function TBitmapTheme.GetCheckBoxSkin: TBGRAMultiSliceScaling;
+begin
+  LoadBitmapResources;
+  Result := FCheckBox;
+end;
+
+function TBitmapTheme.GetCloseButtonSkin: TBGRAMultiSliceScaling;
+begin
+  LoadBitmapResources;
+  Result := FCloseButton;
+end;
+
+function TBitmapTheme.GetProgressBarHorizontalBackgroundSkin: TBGRAMultiSliceScaling;
+begin
+  LoadBitmapResources;
+  Result := FProgressBarHorizontalBackground;
+end;
+
+function TBitmapTheme.GetProgressBarHorizontalFillSkin: TBGRAMultiSliceScaling;
+begin
+  LoadBitmapResources;
+  Result := FProgressBarHorizontalFill;
+end;
+
+function TBitmapTheme.GetProgressBarVerticalBackgroundSkin: TBGRAMultiSliceScaling;
+begin
+  LoadBitmapResources;
+  Result := FProgressBarVerticalBackground;
+end;
+
+function TBitmapTheme.GetProgressBarVerticalFillSkin: TBGRAMultiSliceScaling;
+begin
+  LoadBitmapResources;
+  Result := FProgressBarVerticalFill;
+end;
+
+function TBitmapTheme.GetRadioButtonSkin: TBGRAMultiSliceScaling;
+begin
+  LoadBitmapResources;
+  Result := FRadioButton;
+end;
+
+procedure TBitmapTheme.SetFDPI(AValue: integer);
+begin
+  if FDPI = AValue then
+    Exit;
+  FDPI := AValue;
+  FreeBitmapResources;
+end;
+
+procedure TBitmapTheme.SetFFolder(AValue: string);
+begin
+  if FFolder = AValue then
+    Exit;
+  FFolder := AValue;
+  FreeBitmapResources;
+end;
+
+procedure TBitmapTheme.SetFTickmark(AValue: boolean);
+begin
+  if FTickmark = AValue then
+    Exit;
+  FTickmark := AValue;
+end;
+
+procedure TBitmapTheme.LoadBitmapResources;
+
+{ Use this to extract PNG files and load into BGRABitmap }
+//function ExtractZipPNGtoBGRA(ZipName, FileName: string): TBGRABitmap;
+{ Use this to extract any file and load into MemoryStream }
+//function ExtractZipFiletoMemoryStream(ZipName, FileName: string): TMemoryStream;
+
+  function CreateFromZip(ZipName, Section: string): TBGRAMultiSliceScaling;
+  var
+    Direction: TSliceScalingDirection;
+    bmp: TBGRABitmap;
+    ini: TIniFile;
+    i: integer;
+    defaultRepeat: string;
+    strIni: TMemoryStream;
+  begin
+    strIni := ExtractZipFileToMemoryStream(ZipName, 'skin.ini');
+    ini := TIniFile.Create(strIni);
+
+    bmp := ExtractZipPNGtoBGRA(ZipName, ini.ReadString(Section, 'Bitmap', ''));
+
+    if ini.ReadBool(Section, 'HorizontalDirection', False) then
+      Direction := sdHorizontal
+    else
+      Direction := sdVertical;
+
+    Result := TBGRAMultiSliceScaling.Create(bmp,
+      ini.ReadInteger(Section, 'MarginTop', 0), ini.ReadInteger(Section,
+      'MarginRight', 0), ini.ReadInteger(Section, 'MarginBottom', 0),
+      ini.ReadInteger(Section, 'MarginLeft', 0), ini.ReadInteger(Section,
+      'NumberOfItems', 1), Direction, True);
+
+    defaultRepeat := ini.ReadString(Section, 'Repeat', 'Auto');
+    for i := 0 to High(Result.SliceScalingArray) do
+      Result.SliceScalingArray[i].SliceRepeatAsString :=
+        ini.ReadString(Section, 'Repeat' + IntToStr(i + 1), defaultRepeat);
+
+    ini.Free;
+    strIni.Free;
+  end;
+
+var
+  dpi_str: string;
+begin
+  debugln('Loading Resources.');
+
+  if FResourcesLoaded then
+    exit;
+
+  if (FDPI > 96) and (FDPI <= 120) then
+    dpi_str := '120'
+  else if (FDPI > 120) then
+    dpi_str := '144'
+  else
+    dpi_str := '';
+
+  FreeBitmapResources;
+
+  if FileExistsUTF8(FFolder) then
+  begin
+    debugln('Loading From File.');
+    // general
+    debugln('Loading Button.');
+    FButton := CreateFromZip(FFolder, 'Button');
+    debugln('Loading CheckBox.');
+    FCheckBox := CreateFromZip(FFolder, 'CheckBox' + dpi_str);
+    debugln('Loading RadioButton.');
+    FRadioButton := CreateFromZip(FFolder, 'RadioButton' + dpi_str);
+    debugln('Loading ProgressBar.');
+    FProgressBarHorizontalBackground := CreateFromZip(FFolder, 'ProgressBar');
+    debugln('Loading ProgressBarV.');
+    FProgressBarVerticalBackground := CreateFromZip(FFolder, 'ProgressBarV');
+    debugln('Loading ProgressBarFill.');
+    FProgressBarHorizontalFill := CreateFromZip(FFolder, 'ProgressBarFill');
+    debugln('Loading ProgressBarFillV.');
+    FProgressBarVerticalFill := CreateFromZip(FFolder, 'ProgressBarFillV');
+    // extra
+    debugln('Loading Arrow.');
+    FArrow := CreateFromZip(FFolder, 'Arrow' + dpi_str);
+    debugln('Loading ArrowLeft.');
+    FArrowLeft := CreateFromZip(FFolder, 'ArrowLeft' + dpi_str);
+    debugln('Loading ArrowRight.');
+    FArrowRight := CreateFromZip(FFolder, 'ArrowRight' + dpi_str);
+    debugln('Loading CloseButton.');
+    FCloseButton := CreateFromZip(FFolder, 'CloseButton' + dpi_str);
+    debugln('Resources Loaded.');
+    FResourcesLoaded := True;
+  end
+  else if DirectoryExistsUTF8(FFolder) then
+  begin
+    debugln('Loading From Folder.');
+    // general
+    FButton := TBGRAMultiSliceScaling.Create(FFolder + 'skin.ini', 'Button');
+    FCheckBox := TBGRAMultiSliceScaling.Create(FFolder + 'skin.ini',
+      'CheckBox' + dpi_str);
+    FRadioButton := TBGRAMultiSliceScaling.Create(FFolder + 'skin.ini',
+      'RadioButton' + dpi_str);
+    FProgressBarHorizontalBackground :=
+      TBGRAMultiSliceScaling.Create(FFolder + 'skin.ini', 'ProgressBar');
+    FProgressBarVerticalBackground :=
+      TBGRAMultiSliceScaling.Create(FFolder + 'skin.ini', 'ProgressBarV');
+    FProgressBarHorizontalFill :=
+      TBGRAMultiSliceScaling.Create(FFolder + 'skin.ini', 'ProgressBarFill');
+    FProgressBarVerticalFill :=
+      TBGRAMultiSliceScaling.Create(FFolder + 'skin.ini', 'ProgressBarFillV');
+    // extra
+    FArrow := TBGRAMultiSliceScaling.Create(FFolder + 'skin.ini', 'Arrow' + dpi_str);
+    FArrowLeft := TBGRAMultiSliceScaling.Create(FFolder + 'skin.ini',
+      'ArrowLeft' + dpi_str);
+    FArrowRight := TBGRAMultiSliceScaling.Create(FFolder + 'skin.ini',
+      'ArrowRight' + dpi_str);
+    FCloseButton := TBGRAMultiSliceScaling.Create(FFolder + 'skin.ini',
+      'CloseButton' + dpi_str);
+    FResourcesLoaded := True;
+  end;
+end;
+
+procedure TBitmapTheme.FreeBitmapResources;
+begin
+  if not FResourcesLoaded then
+    exit;
+
+  // general
+  if FButton <> nil then
+    FreeAndNil(FButton);
+  if FCheckBox <> nil then
+    FreeAndNil(FCheckBox);
+  if FRadioButton <> nil then
+    FreeAndNil(FRadioButton);
+  if FProgressBarHorizontalBackground <> nil then
+    FreeAndNil(FProgressBarHorizontalBackground);
+  if FProgressBarVerticalBackground <> nil then
+    FreeAndNil(FProgressBarVerticalBackground);
+  if FProgressBarHorizontalFill <> nil then
+    FreeAndNil(FProgressBarHorizontalFill);
+  if FProgressBarVerticalFill <> nil then
+    FreeAndNil(FProgressBarVerticalFill);
+  // extra
+  if FArrow <> nil then
+    FreeAndNil(FArrow);
+  if FArrowLeft <> nil then
+    FreeAndNil(FArrowLeft);
+  if FArrowRight <> nil then
+    FreeAndNil(FArrowRight);
+  if FCloseButton <> nil then
+    FreeAndNil(FCloseButton);
+  FResourcesLoaded := False;
+end;
+
+constructor TBitmapTheme.Create(Folder: string);
+begin
+  FDPI := 96;
+  FFolder := Folder;
+  FResourcesLoaded := False;
+  inherited Create;
+end;
+
+destructor TBitmapTheme.Destroy;
+begin
+  FreeBitmapResources;
+  inherited Destroy;
+end;
+
+{ TMemoryStreamZip }
+
+procedure TMemoryStreamZip.DoCreateOutZipStream(Sender: TObject;
+  var AStream: TStream; AItem: TFullZipFileEntry);
+begin
+  AStream := TMemoryStream.Create;
+end;
+
+procedure TMemoryStreamZip.DoDoneOutZipStream(Sender: TObject;
+  var AStream: TStream; AItem: TFullZipFileEntry);
+begin
+  AStream.Position := 0;
+
+  Stm := TMemoryStream.Create;
+
+  Stm.LoadFromStream(AStream);
+
+  Astream.Free;
+end;
+
+function TMemoryStreamZip.Extract(ZipName, FileName: string): TMemoryStream;
+  var
+    ZipFile: TUnZipper;
+    sl: TStringList;
+  begin
+    sl := TStringList.Create;
+    sl.Add(FileName);
+    ZipFile := TUnZipper.Create;
+    try
+      ZipFile.FileName := ZipName;
+      ZipFile.OnCreateStream := @DoCreateOutZipStream;
+      ZipFile.OnDoneStream := @DoDoneOutZipStream;
+      ZipFile.UnZipFiles(sl);
+    finally
+      ZipFile.Free;
+      sl.Free;
+    end;
+
+    Result := Stm;
+end;
+
+{ TBGRAZip }
+
+procedure TBGRAZip.DoCreateOutZipStream(Sender: TObject; var AStream: TStream;
+  AItem: TFullZipFileEntry);
+begin
+  AStream := TMemoryStream.Create;
+end;
+
+procedure TBGRAZip.DoDoneOutZipStream(Sender: TObject; var AStream: TStream;
+  AItem: TFullZipFileEntry);
+  var
+    reader: TFPReaderPNG;
+  begin
+    AStream.Position := 0;
+
+    if bmp <> nil then
+      bmp.Free;
+
+    reader := TFPReaderPNG.Create;
+    bmp := TBGRABitmap.Create;
+    bmp.LoadFromStream(AStream, reader);
+    reader.Free;
+
+    Astream.Free;
+end;
+
+function TBGRAZip.Extract(ZipName, FileName: string): TBGRABitmap;
+var
+  ZipFile: TUnZipper;
+  sl: TStringList;
+begin
+  sl := TStringList.Create;
+  sl.Add(FileName);
+  ZipFile := TUnZipper.Create;
+  try
+    ZipFile.FileName := ZipName;
+    ZipFile.OnCreateStream := @DoCreateOutZipStream;
+    ZipFile.OnDoneStream := @DoDoneOutZipStream;
+    ZipFile.UnZipFiles(sl);
+  finally
+    ZipFile.Free;
+    sl.Free;
+  end;
+
+  Result := Bmp;
+end;
+
+{ TMyStyle }
+
+constructor TMyStyle.Create;
+begin
+  inherited Create;
+  FTheme := TBitmapTheme.Create('aerow8.zip');
+  fpgSetNamedColor(clWindowBackground, WIN10_FORM_COLOR);
+end;
+
+destructor TMyStyle.Destroy;
+begin
+  FTheme.Free;
+  inherited Destroy;
+end;
+
+procedure TMyStyle.DrawButtonFace(ACanvas: TfpgCanvas; x, y, w, h: TfpgCoord;
+  AFlags: TfpgButtonFlags);
+var
+  bmp: TBGRABitmap;
+begin
+  bmp := TBGRABitmap.Create(w, h, WIN10_FORM_COLOR);
+  FTheme.Button.Draw(0, bmp, 0, 0, bmp.Width, bmp.Height, FTheme.Debug);
+  bmp.Draw(ACanvas, Rect(x, y, w, h));
+  bmp.Free;
+end;
+
+initialization
+  fpgStyleManager.RegisterClass('Demo Style', TMyStyle);
+
+end.
+

+ 110 - 0
test/test_extra/fpGUI theme/project1.lpi

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+  <ProjectOptions>
+    <Version Value="9"/>
+    <PathDelim Value="\"/>
+    <General>
+      <SessionStorage Value="InProjectDir"/>
+      <MainUnit Value="0"/>
+      <Title Value="fpGUI Theme"/>
+      <UseAppBundle Value="False"/>
+      <ResourceType Value="res"/>
+      <UseXPManifest Value="True"/>
+      <XPManifest>
+        <DpiAware Value="True"/>
+      </XPManifest>
+    </General>
+    <i18n>
+      <EnableI18N LFM="False"/>
+    </i18n>
+    <VersionInfo>
+      <StringTable ProductVersion=""/>
+    </VersionInfo>
+    <BuildModes Count="2">
+      <Item1 Name="Debug" Default="True"/>
+      <Item2 Name="Release">
+        <CompilerOptions>
+          <Version Value="11"/>
+          <PathDelim Value="\"/>
+          <SearchPaths>
+            <IncludeFiles Value="$(ProjOutDir)"/>
+          </SearchPaths>
+          <CodeGeneration>
+            <SmartLinkUnit Value="True"/>
+            <Optimizations>
+              <OptimizationLevel Value="3"/>
+            </Optimizations>
+          </CodeGeneration>
+          <Linking>
+            <Debugging>
+              <GenerateDebugInfo Value="False"/>
+            </Debugging>
+            <LinkSmart Value="True"/>
+          </Linking>
+        </CompilerOptions>
+      </Item2>
+    </BuildModes>
+    <PublishOptions>
+      <Version Value="2"/>
+    </PublishOptions>
+    <RunParams>
+      <local>
+        <FormatVersion Value="1"/>
+      </local>
+    </RunParams>
+    <RequiredPackages Count="2">
+      <Item1>
+        <PackageName Value="BGRABitmapPack4fpGUI"/>
+      </Item1>
+      <Item2>
+        <PackageName Value="fpgui_toolkit"/>
+      </Item2>
+    </RequiredPackages>
+    <Units Count="1">
+      <Unit0>
+        <Filename Value="project1.lpr"/>
+        <IsPartOfProject Value="True"/>
+      </Unit0>
+    </Units>
+  </ProjectOptions>
+  <CompilerOptions>
+    <Version Value="11"/>
+    <PathDelim Value="\"/>
+    <SearchPaths>
+      <IncludeFiles Value="$(ProjOutDir)"/>
+    </SearchPaths>
+    <Parsing>
+      <SyntaxOptions>
+        <IncludeAssertionCode Value="True"/>
+      </SyntaxOptions>
+    </Parsing>
+    <CodeGeneration>
+      <Checks>
+        <IOChecks Value="True"/>
+        <RangeChecks Value="True"/>
+        <OverflowChecks Value="True"/>
+        <StackChecks Value="True"/>
+      </Checks>
+    </CodeGeneration>
+    <Linking>
+      <Debugging>
+        <DebugInfoType Value="dsDwarf2Set"/>
+        <UseHeaptrc Value="True"/>
+        <UseExternalDbgSyms Value="True"/>
+      </Debugging>
+    </Linking>
+  </CompilerOptions>
+  <Debugging>
+    <Exceptions Count="3">
+      <Item1>
+        <Name Value="EAbort"/>
+      </Item1>
+      <Item2>
+        <Name Value="ECodetoolError"/>
+      </Item2>
+      <Item3>
+        <Name Value="EFOpenError"/>
+      </Item3>
+    </Exceptions>
+  </Debugging>
+</CONFIG>

+ 876 - 0
test/test_extra/fpGUI theme/project1.lpr

@@ -0,0 +1,876 @@
+program project1;
+
+{$mode objfpc}{$H+}
+
+uses {$IFDEF UNIX} {$IFDEF UseCThreads}
+  cthreads, {$ENDIF} {$ENDIF}
+  Classes,
+  SysUtils,
+  fpg_base,
+  fpg_main,
+  fpg_button,
+  fpg_checkbox,
+  fpg_combobox,
+  fpg_edit,
+  fpg_form,
+  fpg_gauge,
+  fpg_grid,
+  fpg_hyperlink,
+  fpg_label,
+  fpg_listbox,
+  fpg_listview,
+  fpg_memo,
+  fpg_panel,
+  fpg_popupcalendar,
+  fpg_progressbar,
+  fpg_radiobutton,
+  fpg_trackbar,
+  fpg_splitter,
+  fpg_ColorWheel,
+  fpg_editbtn,
+  fpg_menu,
+  fpg_stylemanager,
+  mystyle;
+
+type
+
+  TMainForm = class(TfpgForm)
+  private
+    {@VFD_HEAD_BEGIN: MainForm}
+
+    Label1: TfpgLabel;
+    Edit1: TfpgEdit;
+    Memo1: TfpgMemo;
+    Button1: TfpgButton;
+    CheckBox1: TfpgCheckBox;
+    RadioButton1: TfpgRadioButton;
+    ComboBox1: TfpgComboBox;
+    CalendarCombo1: TfpgCalendarCombo;
+    CalendarCombo2: TfpgCalendarCheckCombo;
+    ListBox1: TfpgListBox;
+    ColorListBox1: TfpgColorListBox;
+    Grid1: TfpgStringGrid;
+    Bevel1: TfpgBevel;
+    Panel1: TfpgPanel;
+    GroupBox1: TfpgGroupBox;
+    ProgressBar1: TfpgProgressBar;
+    TrackBar1: TfpgTrackBar;
+    ListView1: TfpgListView;
+    Gauge1: TfpgGauge;
+    EditInteger1: TfpgEditInteger;
+    EditFloat1: TfpgEditFloat;
+    EditCurrency1: TfpgEditCurrency;
+    FilenameEdit1: TfpgFileNameEdit;
+    DirectoryEdit1: TfpgDirectoryEdit;
+    DirectoryEdit2: TfpgFontEdit;
+    ColorWheel1: TfpgColorWheel;
+    ValueBar1: TfpgValueBar;
+    //Splitter1: TfpgSplitter;
+    Hyperlink1: TfpgHyperlink;
+    //Toggle1: TfpgToggle;
+                    {@VFD_HEAD_END: MainForm}
+  public
+    procedure AfterCreate; override;
+  end;
+
+    TTest = class(TfpgForm)
+  private
+    {@VFD_HEAD_BEGIN: Test}
+    Label1: TfpgLabel;
+    Edit1: TfpgEdit;
+    Memo1: TfpgMemo;
+    Button1: TfpgButton;
+    CheckBox1: TfpgCheckBox;
+    RadioButton1: TfpgRadioButton;
+    ComboBox1: TfpgComboBox;
+    CalendarCombo1: TfpgCalendarCombo;
+    CalendarCombo2: TfpgCalendarCheckCombo;
+    ListBox1: TfpgListBox;
+    ColorListBox1: TfpgColorListBox;
+    Grid1: TfpgStringGrid;
+    Bevel1: TfpgBevel;
+    Panel1: TfpgPanel;
+    GroupBox1: TfpgGroupBox;
+    ProgressBar1: TfpgProgressBar;
+    TrackBar1: TfpgTrackBar;
+    ListView1: TfpgListView;
+    Gauge1: TfpgGauge;
+    EditInteger1: TfpgEditInteger;
+    EditFloat1: TfpgEditFloat;
+    EditCurrency1: TfpgEditCurrency;
+    FilenameEdit1: TfpgFileNameEdit;
+    DirectoryEdit1: TfpgDirectoryEdit;
+    DirectoryEdit2: TfpgFontEdit;
+    ColorWheel1: TfpgColorWheel;
+    ValueBar1: TfpgValueBar;
+    Hyperlink1: TfpgHyperlink;
+    {@VFD_HEAD_END: Test}
+  public
+    procedure AfterCreate; override;
+  end;
+
+{@VFD_NEWFORM_DECL}
+
+
+
+  {@VFD_NEWFORM_IMPL}
+
+procedure TTest.AfterCreate;
+begin
+  {%region 'Auto-generated GUI code' -fold}
+  {@VFD_BODY_BEGIN: Test}
+  Name := 'Test';
+  SetPosition(469, 323, 981, 466);
+  WindowTitle := 'Test';
+  Hint := '';
+  IconName := '';
+  {%region 'Auto-generated GUI code' -fold}
+  {@VFD_BODY_BEGIN: Test}
+  {Splitter1 := TfpgSplitter.Create(self);
+  with Splitter1 do
+  begin
+  Name := 'Splitter1';
+  SetPosition(776, 0, 14, 466);
+  Align := alLeft;
+  end;}
+  {Toggle1 := TfpgToggle.Create(self);
+  with Toggle1 do
+  begin
+  Name := 'Toggle1';
+  SetPosition(796, 60, 120, 20);
+  CheckedCaption := 'ON';
+  FontDesc := '#Label1';
+  Hint := '';
+  TabOrder := 31;
+  Text := 'ToggleBox';
+  UnCheckedCaption := 'OFF';
+  UseAnimation := True;
+  end;}
+
+  Label1 := TfpgLabel.Create(self);
+  with Label1 do
+  begin
+    Name := 'Label1';
+    SetPosition(8, 8, 68, 16);
+    FontDesc := '#Label1';
+    Hint := '';
+    Text := 'Label';
+  end;
+
+  Edit1 := TfpgEdit.Create(self);
+  with Edit1 do
+  begin
+    Name := 'Edit1';
+    SetPosition(8, 28, 120, 24);
+    ExtraHint := '';
+    FontDesc := '#Edit1';
+    Hint := '';
+    TabOrder := 2;
+    Text := '';
+  end;
+
+  Memo1 := TfpgMemo.Create(self);
+  with Memo1 do
+  begin
+    Name := 'Memo1';
+    SetPosition(8, 60, 120, 52);
+    FontDesc := '#Edit1';
+    Hint := '';
+    TabOrder := 3;
+  end;
+
+  Button1 := TfpgButton.Create(self);
+  with Button1 do
+  begin
+    Name := 'Button1';
+    SetPosition(8, 120, 80, 24);
+    Text := 'Button';
+    FontDesc := '#Label1';
+    Hint := '';
+    ImageName := '';
+    TabOrder := 4;
+  end;
+
+  CheckBox1 := TfpgCheckBox.Create(self);
+  with CheckBox1 do
+  begin
+    Name := 'CheckBox1';
+    SetPosition(8, 152, 120, 20);
+    FontDesc := '#Label1';
+    Hint := '';
+    TabOrder := 5;
+    Text := 'CheckBox';
+  end;
+
+  RadioButton1 := TfpgRadioButton.Create(self);
+  with RadioButton1 do
+  begin
+    Name := 'RadioButton1';
+    SetPosition(8, 176, 120, 20);
+    FontDesc := '#Label1';
+    GroupIndex := 0;
+    Hint := '';
+    TabOrder := 6;
+    Text := 'RadioButton';
+  end;
+
+  ComboBox1 := TfpgComboBox.Create(self);
+  with ComboBox1 do
+  begin
+    Name := 'ComboBox1';
+    SetPosition(8, 204, 120, 24);
+    ExtraHint := '';
+    FontDesc := '#List';
+    Hint := '';
+    Items.Add('Item');
+    Items.Add('Item');
+    Items.Add('Item');
+    Items.Add('Item');
+    FocusItem := -1;
+    TabOrder := 7;
+  end;
+
+  CalendarCombo1 := TfpgCalendarCombo.Create(self);
+  with CalendarCombo1 do
+  begin
+    Name := 'CalendarCombo1';
+    SetPosition(8, 236, 120, 24);
+    BackgroundColor := TfpgColor($80000002);
+    DateFormat := 'dd/MM/yyyy';
+    DayColor := TfpgColor($000000);
+    FontDesc := '#List';
+    Hint := '';
+    HolidayColor := TfpgColor($000000);
+    SelectedColor := TfpgColor($000000);
+    SelectedColor := TfpgColor($000000);
+    TabOrder := 8;
+  end;
+
+  CalendarCombo2 := TfpgCalendarCheckCombo.Create(self);
+  with CalendarCombo2 do
+  begin
+    Name := 'CalendarCombo2';
+    SetPosition(8, 264, 120, 24);
+    BackgroundColor := TfpgColor($80000002);
+    Checked := True;
+    DateFormat := 'dd/MM/yyyy';
+    DayColor := TfpgColor($000000);
+    FontDesc := '#List';
+    Hint := '';
+    HolidayColor := TfpgColor($000000);
+    SelectedColor := TfpgColor($000000);
+    SelectedColor := TfpgColor($000000);
+    TabOrder := 9;
+  end;
+
+  ListBox1 := TfpgListBox.Create(self);
+  with ListBox1 do
+  begin
+    Name := 'ListBox1';
+    SetPosition(8, 296, 116, 104);
+    FontDesc := '#List';
+    Hint := '';
+    Items.Add('Line 1');
+    Items.Add('Line 1');
+    Items.Add('Line 1');
+    Items.Add('Line 1');
+    Items.Add('Line 1');
+    Items.Add('Line 1');
+    Items.Add('Line 1');
+    Items.Add('Line 1');
+    TabOrder := 10;
+  end;
+
+  ColorListBox1 := TfpgColorListBox.Create(self);
+  with ColorListBox1 do
+  begin
+    Name := 'ColorListBox1';
+    SetPosition(140, 28, 168, 84);
+    Color := TfpgColor($FF00FFFF);
+    FontDesc := '#List';
+    Hint := '';
+    TabOrder := 11;
+  end;
+
+  Grid1 := TfpgStringGrid.Create(self);
+  with Grid1 do
+  begin
+    Name := 'Grid1';
+    SetPosition(140, 124, 180, 112);
+    BackgroundColor := TfpgColor($80000002);
+    AddColumn('New', 50, taLeftJustify);
+    AddColumn('New', 50, taLeftJustify);
+    AddColumn('New', 50, taLeftJustify);
+    FontDesc := '#Grid';
+    HeaderFontDesc := '#GridHeader';
+    Hint := '';
+    RowCount := 10;
+    RowSelect := False;
+    TabOrder := 12;
+  end;
+
+  Bevel1 := TfpgBevel.Create(self);
+  with Bevel1 do
+  begin
+    Name := 'Bevel1';
+    SetPosition(140, 244, 180, 120);
+    Hint := '';
+  end;
+
+  Panel1 := TfpgPanel.Create(self);
+  with Panel1 do
+  begin
+    Name := 'Panel1';
+    SetPosition(140, 372, 180, 88);
+    FontDesc := '#Label1';
+    Hint := '';
+    Text := 'Panel';
+  end;
+
+  GroupBox1 := TfpgGroupBox.Create(self);
+  with GroupBox1 do
+  begin
+    Name := 'GroupBox1';
+    SetPosition(328, 32, 200, 80);
+    FontDesc := '#Label1';
+    Hint := '';
+    Text := 'Group box';
+  end;
+
+  ProgressBar1 := TfpgProgressBar.Create(self);
+  with ProgressBar1 do
+  begin
+    Name := 'ProgressBar1';
+    SetPosition(328, 124, 150, 22);
+    Hint := '';
+    Position := 75;
+  end;
+
+  TrackBar1 := TfpgTrackBar.Create(self);
+  with TrackBar1 do
+  begin
+    Name := 'TrackBar1';
+    SetPosition(328, 160, 148, 30);
+    Hint := '';
+    Position := 20;
+    Position := 20;
+    TabOrder := 17;
+  end;
+
+  ListView1 := TfpgListView.Create(self);
+  with ListView1 do
+  begin
+    Name := 'ListView1';
+    SetPosition(328, 244, 184, 120);
+    Hint := '';
+    MultiSelect := False;
+    ShowHeaders := True;
+    ShowHeaders := True;
+    TabOrder := 18;
+  end;
+
+  Gauge1 := TfpgGauge.Create(self);
+  with Gauge1 do
+  begin
+    Name := 'Gauge1';
+    SetPosition(332, 376, 180, 25);
+    Hint := '';
+    Progress := 50;
+  end;
+
+  EditInteger1 := TfpgEditInteger.Create(self);
+  with EditInteger1 do
+  begin
+    Name := 'EditInteger1';
+    SetPosition(544, 40, 120, 24);
+    FontDesc := '#Edit1';
+    Hint := '';
+    MaxValue := 0;
+    MinValue := 0;
+    TabOrder := 21;
+    Value := 0;
+  end;
+
+  EditFloat1 := TfpgEditFloat.Create(self);
+  with EditFloat1 do
+  begin
+    Name := 'EditFloat1';
+    SetPosition(544, 76, 120, 24);
+    FontDesc := '#Edit1';
+    Hint := '';
+    MaxValue := 0;
+    MinValue := 0;
+    TabOrder := 22;
+    Value := 0;
+  end;
+
+  EditCurrency1 := TfpgEditCurrency.Create(self);
+  with EditCurrency1 do
+  begin
+    Name := 'EditCurrency1';
+    SetPosition(544, 112, 120, 24);
+    FontDesc := '#Edit1';
+    Hint := '';
+    TabOrder := 23;
+    Value := 100;
+  end;
+
+  FilenameEdit1 := TfpgFileNameEdit.Create(self);
+  with FilenameEdit1 do
+  begin
+    Name := 'FilenameEdit1';
+    SetPosition(544, 152, 140, 24);
+    ExtraHint := '';
+    FileName := '';
+    Filter := '';
+    InitialDir := '';
+    TabOrder := 24;
+  end;
+
+  DirectoryEdit1 := TfpgDirectoryEdit.Create(self);
+  with DirectoryEdit1 do
+  begin
+    Name := 'DirectoryEdit1';
+    SetPosition(544, 188, 140, 24);
+    Directory := '';
+    ExtraHint := '';
+    RootDirectory := '';
+    TabOrder := 25;
+  end;
+
+  DirectoryEdit2 := TfpgFontEdit.Create(self);
+  with DirectoryEdit2 do
+  begin
+    Name := 'DirectoryEdit2';
+    SetPosition(544, 220, 140, 24);
+    ExtraHint := '';
+    FontDesc := '';
+    TabOrder := 26;
+  end;
+
+  ColorWheel1 := TfpgColorWheel.Create(self);
+  with ColorWheel1 do
+  begin
+    Name := 'ColorWheel1';
+    SetPosition(544, 260, 116, 120);
+  end;
+
+  ValueBar1 := TfpgValueBar.Create(self);
+  with ValueBar1 do
+  begin
+    Name := 'ValueBar1';
+    SetPosition(700, 36, 80, 160);
+    Value := 1;
+  end;
+
+  Hyperlink1 := TfpgHyperlink.Create(self);
+  with Hyperlink1 do
+  begin
+    Name := 'Hyperlink1';
+    SetPosition(796, 36, 120, 16);
+    FontDesc := 'Arial-8:antialias=true:underline';
+    Hint := '';
+    HotTrackFont := 'Arial-8:antialias=true:underline:bold';
+    Text := 'fpGUI website';
+    URL := 'http://fpgui.sourceforge.net/';
+  end;
+
+  {@VFD_BODY_END: Test}
+  {%endregion}
+end;
+
+
+  procedure TMainForm.AfterCreate;
+  begin
+    {%region 'Auto-generated GUI code' -fold}
+    {@VFD_BODY_BEGIN: MainForm}
+
+
+
+
+    Name := 'MainForm';
+    SetPosition(316, 186, 300, 250);
+    WindowTitle := 'MainForm';
+
+    {%region 'Auto-generated GUI code' -fold}
+    {@VFD_BODY_BEGIN: Test}
+    Name := 'Test';
+    SetPosition(469, 323, 981, 466);
+    WindowTitle := 'Test';
+    Hint := '';
+    IconName := '';
+
+    Label1 := TfpgLabel.Create(self);
+    with Label1 do
+    begin
+      Name := 'Label1';
+      SetPosition(8, 8, 68, 16);
+      FontDesc := '#Label1';
+      Hint := '';
+      Text := 'Label';
+    end;
+
+    Edit1 := TfpgEdit.Create(self);
+    with Edit1 do
+    begin
+      Name := 'Edit1';
+      SetPosition(8, 28, 120, 24);
+      ExtraHint := '';
+      FontDesc := '#Edit1';
+      Hint := '';
+      TabOrder := 2;
+      Text := '';
+    end;
+
+    Memo1 := TfpgMemo.Create(self);
+    with Memo1 do
+    begin
+      Name := 'Memo1';
+      SetPosition(8, 60, 120, 52);
+      FontDesc := '#Edit1';
+      Hint := '';
+      TabOrder := 3;
+    end;
+
+    Button1 := TfpgButton.Create(self);
+    with Button1 do
+    begin
+      Name := 'Button1';
+      SetPosition(8, 120, 80, 24);
+      Text := 'Button';
+      FontDesc := '#Label1';
+      Hint := '';
+      ImageName := '';
+      TabOrder := 4;
+    end;
+
+    CheckBox1 := TfpgCheckBox.Create(self);
+    with CheckBox1 do
+    begin
+      Name := 'CheckBox1';
+      SetPosition(8, 152, 120, 20);
+      FontDesc := '#Label1';
+      Hint := '';
+      TabOrder := 5;
+      Text := 'CheckBox';
+    end;
+
+    RadioButton1 := TfpgRadioButton.Create(self);
+    with RadioButton1 do
+    begin
+      Name := 'RadioButton1';
+      SetPosition(8, 176, 120, 20);
+      FontDesc := '#Label1';
+      GroupIndex := 0;
+      Hint := '';
+      TabOrder := 6;
+      Text := 'RadioButton';
+    end;
+
+    ComboBox1 := TfpgComboBox.Create(self);
+    with ComboBox1 do
+    begin
+      Name := 'ComboBox1';
+      SetPosition(8, 204, 120, 24);
+      ExtraHint := '';
+      FontDesc := '#List';
+      Hint := '';
+      FocusItem := -1;
+      TabOrder := 7;
+    end;
+
+    CalendarCombo1 := TfpgCalendarCombo.Create(self);
+    with CalendarCombo1 do
+    begin
+      Name := 'CalendarCombo1';
+      SetPosition(8, 236, 120, 24);
+      BackgroundColor := TfpgColor($80000002);
+      DateFormat := 'dd/MM/yyyy';
+      DayColor := TfpgColor($000000);
+      FontDesc := '#List';
+      Hint := '';
+      HolidayColor := TfpgColor($000000);
+      SelectedColor := TfpgColor($000000);
+      SelectedColor := TfpgColor($000000);
+      TabOrder := 8;
+    end;
+
+    CalendarCombo2 := TfpgCalendarCheckCombo.Create(self);
+    with CalendarCombo2 do
+    begin
+      Name := 'CalendarCombo2';
+      SetPosition(8, 264, 120, 24);
+      BackgroundColor := TfpgColor($80000002);
+      Checked := True;
+      DateFormat := 'dd/MM/yyyy';
+      DayColor := TfpgColor($000000);
+      FontDesc := '#List';
+      Hint := '';
+      HolidayColor := TfpgColor($000000);
+      SelectedColor := TfpgColor($000000);
+      SelectedColor := TfpgColor($000000);
+      TabOrder := 9;
+    end;
+
+    ListBox1 := TfpgListBox.Create(self);
+    with ListBox1 do
+    begin
+      Name := 'ListBox1';
+      SetPosition(8, 296, 116, 104);
+      FontDesc := '#List';
+      Hint := '';
+      Items.Add('Line 1');
+      Items.Add('Line 1');
+      Items.Add('Line 1');
+      Items.Add('Line 1');
+      Items.Add('Line 1');
+      Items.Add('Line 1');
+      Items.Add('Line 1');
+      Items.Add('Line 1');
+      TabOrder := 10;
+    end;
+
+    ColorListBox1 := TfpgColorListBox.Create(self);
+    with ColorListBox1 do
+    begin
+      Name := 'ColorListBox1';
+      SetPosition(140, 28, 168, 84);
+      Color := TfpgColor($FF00FFFF);
+      FontDesc := '#List';
+      Hint := '';
+      TabOrder := 11;
+    end;
+
+    Grid1 := TfpgStringGrid.Create(self);
+    with Grid1 do
+    begin
+      Name := 'Grid1';
+      SetPosition(140, 124, 180, 112);
+      BackgroundColor := TfpgColor($80000002);
+      AddColumn('New', 50, taLeftJustify);
+      AddColumn('New', 50, taLeftJustify);
+      AddColumn('New', 50, taLeftJustify);
+      FontDesc := '#Grid';
+      HeaderFontDesc := '#GridHeader';
+      Hint := '';
+      RowCount := 10;
+      RowSelect := False;
+      TabOrder := 12;
+    end;
+
+    Bevel1 := TfpgBevel.Create(self);
+    with Bevel1 do
+    begin
+      Name := 'Bevel1';
+      SetPosition(140, 244, 180, 120);
+      Hint := '';
+    end;
+
+    Panel1 := TfpgPanel.Create(self);
+    with Panel1 do
+    begin
+      Name := 'Panel1';
+      SetPosition(140, 372, 180, 88);
+      FontDesc := '#Label1';
+      Hint := '';
+      Text := 'Panel';
+    end;
+
+    GroupBox1 := TfpgGroupBox.Create(self);
+    with GroupBox1 do
+    begin
+      Name := 'GroupBox1';
+      SetPosition(328, 32, 200, 80);
+      FontDesc := '#Label1';
+      Hint := '';
+      Text := 'Group box';
+    end;
+
+    ProgressBar1 := TfpgProgressBar.Create(self);
+    with ProgressBar1 do
+    begin
+      Name := 'ProgressBar1';
+      SetPosition(328, 124, 150, 22);
+      Hint := '';
+      Position := 75;
+    end;
+
+    TrackBar1 := TfpgTrackBar.Create(self);
+    with TrackBar1 do
+    begin
+      Name := 'TrackBar1';
+      SetPosition(328, 160, 148, 30);
+      Hint := '';
+      Position := 20;
+      Position := 20;
+      TabOrder := 17;
+    end;
+
+    ListView1 := TfpgListView.Create(self);
+    with ListView1 do
+    begin
+      Name := 'ListView1';
+      SetPosition(328, 244, 184, 120);
+      Hint := '';
+      MultiSelect := False;
+      ShowHeaders := True;
+      ShowHeaders := True;
+      TabOrder := 18;
+    end;
+
+    Gauge1 := TfpgGauge.Create(self);
+    with Gauge1 do
+    begin
+      Name := 'Gauge1';
+      SetPosition(332, 376, 180, 25);
+      Hint := '';
+      Progress := 50;
+    end;
+
+    EditInteger1 := TfpgEditInteger.Create(self);
+    with EditInteger1 do
+    begin
+      Name := 'EditInteger1';
+      SetPosition(544, 40, 120, 24);
+      FontDesc := '#Edit1';
+      Hint := '';
+      MaxValue := 0;
+      MinValue := 0;
+      TabOrder := 21;
+      Value := 50;
+    end;
+
+    EditFloat1 := TfpgEditFloat.Create(self);
+    with EditFloat1 do
+    begin
+      Name := 'EditFloat1';
+      SetPosition(544, 76, 120, 24);
+      FontDesc := '#Edit1';
+      Hint := '';
+      MaxValue := 0;
+      MinValue := 0;
+      TabOrder := 22;
+      Value := 50.75;
+    end;
+
+    EditCurrency1 := TfpgEditCurrency.Create(self);
+    with EditCurrency1 do
+    begin
+      Name := 'EditCurrency1';
+      SetPosition(544, 112, 120, 24);
+      FontDesc := '#Edit1';
+      Hint := '';
+      TabOrder := 23;
+      Value := 100;
+    end;
+
+    FilenameEdit1 := TfpgFileNameEdit.Create(self);
+    with FilenameEdit1 do
+    begin
+      Name := 'FilenameEdit1';
+      SetPosition(544, 152, 140, 24);
+      ExtraHint := '';
+      FileName := '';
+      Filter := '';
+      InitialDir := '';
+      TabOrder := 24;
+    end;
+
+    DirectoryEdit1 := TfpgDirectoryEdit.Create(self);
+    with DirectoryEdit1 do
+    begin
+      Name := 'DirectoryEdit1';
+      SetPosition(544, 188, 140, 24);
+      Directory := '';
+      ExtraHint := '';
+      RootDirectory := '';
+      TabOrder := 25;
+    end;
+
+    DirectoryEdit2 := TfpgFontEdit.Create(self);
+    with DirectoryEdit2 do
+    begin
+      Name := 'DirectoryEdit2';
+      SetPosition(544, 220, 140, 24);
+      ExtraHint := '';
+      FontDesc := '';
+      TabOrder := 26;
+    end;
+
+    ColorWheel1 := TfpgColorWheel.Create(self);
+    with ColorWheel1 do
+    begin
+      Name := 'ColorWheel1';
+      SetPosition(544, 260, 116, 120);
+    end;
+
+    ValueBar1 := TfpgValueBar.Create(self);
+    with ValueBar1 do
+    begin
+      Name := 'ValueBar1';
+      SetPosition(700, 36, 80, 160);
+      Value := 1;
+    end;
+
+  {Splitter1 := TfpgSplitter.Create(self);
+  with Splitter1 do
+  begin
+    Name := 'Splitter1';
+    SetPosition(776, 0, 14, 466);
+    Align := alLeft;
+  end;}
+
+    Hyperlink1 := TfpgHyperlink.Create(self);
+    with Hyperlink1 do
+    begin
+      Name := 'Hyperlink1';
+      SetPosition(796, 36, 120, 16);
+      FontDesc := 'Arial-8:antialias=true:underline';
+      Hint := '';
+      HotTrackFont := 'Arial-8:antialias=true:underline:bold';
+      Text := 'fpGUI website';
+      URL := 'http://fpgui.sourceforge.net/';
+    end;
+
+  {Toggle1 := TfpgToggle.Create(self);
+  with Toggle1 do
+  begin
+    Name := 'Toggle1';
+    SetPosition(796, 60, 120, 20);
+    CheckedCaption := 'ON';
+    FontDesc := '#Label1';
+    Hint := '';
+    TabOrder := 31;
+    Text := 'ToggleBox';
+    UnCheckedCaption := 'OFF';
+    UseAnimation := True;
+  end;}
+
+            {@VFD_BODY_END: MainForm}
+    {%endregion}
+  end;
+
+
+  procedure MainProc;
+  var
+    frm: TMainForm;
+  begin
+    fpgApplication.Initialize;
+	
+	if fpgStyleManager.SetStyle('Demo Style') then
+      fpgStyle := fpgStyleManager.Style; 
+	
+    fpgApplication.CreateForm(TMainForm, frm);
+    try
+      frm.Show;
+      fpgApplication.Run;
+    finally
+      frm.Free;
+    end;
+  end;
+
+{$R *.res}
+
+begin
+  MainProc;
+end.