summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/apps/ide/src/fpg_textedit.pas4
-rw-r--r--examples/apps/ide/src/frm_configureide.pas4
-rw-r--r--examples/apps/ide/src/frm_main.pas62
-rw-r--r--examples/apps/ide/src/frm_projectoptions.pas10
-rw-r--r--examples/apps/ide/src/maximus.lpi33
-rw-r--r--examples/apps/ide/src/maximus.lpr1
-rw-r--r--examples/apps/ide/src/unitlist.pas32
-rw-r--r--examples/apps/nanoedit/mainfrm.pas4
-rw-r--r--examples/gui/alignment/aligntest.lpi29
-rw-r--r--examples/gui/alignment_resize/alignment_resize.lpi27
-rw-r--r--examples/gui/animation/anim_test.lpi24
-rw-r--r--examples/gui/bevel/beveltest.lpi24
-rw-r--r--examples/gui/calendar/calendartest.lpi20
-rw-r--r--examples/gui/colorlistbox/colorlistboxtest.lpi24
-rw-r--r--examples/gui/colorwheel/colorwheel_test.lpi24
-rw-r--r--examples/gui/colorwheel/frm_main.pas243
-rw-r--r--examples/gui/combobox/comboboxtest.lpi25
-rw-r--r--examples/gui/combobox/frm_main.pas18
-rw-r--r--examples/gui/command_interface/test.lpi26
-rw-r--r--examples/gui/customstyles/customstyles.lpi7
-rw-r--r--examples/gui/customstyles/mystyle.pas4
-rw-r--r--examples/gui/customwindow/close.bmpbin0 -> 338 bytes
-rw-r--r--examples/gui/customwindow/custom_window.lpi65
-rw-r--r--examples/gui/customwindow/custom_window.lpr352
-rw-r--r--examples/gui/customwindow/extrafpc.cfg10
-rw-r--r--examples/gui/customwindow/images.inc57
-rw-r--r--examples/gui/customwindow/resize.bmpbin0 -> 474 bytes
-rw-r--r--examples/gui/customwindow/units/.gitignore1
-rw-r--r--examples/gui/dbtest/dbtest.lpi24
-rw-r--r--examples/gui/drag_n_drop/dndexample.lpi4
-rw-r--r--examples/gui/drag_n_drop/dndexample.lpr9
-rw-r--r--examples/gui/edits/edittest.lpi24
-rw-r--r--examples/gui/embedded_form/demo1.lpi24
-rw-r--r--examples/gui/embedded_form/frm_main.pas1
-rw-r--r--examples/gui/filedialog/filedialog.lpi7
-rw-r--r--examples/gui/filedialog/filedialog.lpr1
-rw-r--r--examples/gui/filegrid/filegrid.lpi28
-rw-r--r--examples/gui/fontselect/fontselect.lpi25
-rw-r--r--examples/gui/gauges/gaugetest.lpi21
-rw-r--r--examples/gui/gridediting/gridediting.lpi15
-rw-r--r--examples/gui/gridtest/gridtest.lpi2
-rw-r--r--examples/gui/gridtest/gridtest.lpr14
-rw-r--r--examples/gui/hintwindow/hintwindowtest.lpi24
-rw-r--r--examples/gui/imgtest/bitmaptest.lpi27
-rw-r--r--examples/gui/imgtest_jpeg/jpeg.lpi22
-rw-r--r--examples/gui/listbox/frm_main.pas16
-rw-r--r--examples/gui/listbox/listboxtest.lpi26
-rw-r--r--examples/gui/listviewtest/listviewtest.lpi10
-rw-r--r--examples/gui/memo/memotest.lpi20
-rw-r--r--examples/gui/menutest/menutest.lpi22
-rw-r--r--examples/gui/modalforms/modalforms.lpi7
-rw-r--r--examples/gui/mousecursor/cursordemo.lpi21
-rw-r--r--examples/gui/panel/panel_test.lpi27
-rw-r--r--examples/gui/reporting/pdf_demo.lpi2
-rw-r--r--examples/gui/scrollframe/bigframe_test.lpi78
-rw-r--r--examples/gui/scrollframe/bigframe_test.lpr114
-rw-r--r--examples/gui/scrollframe/frame_test.lpi78
-rw-r--r--examples/gui/scrollframe/frame_test.lpr112
-rw-r--r--examples/gui/splashscreen/frm_main.pas1
-rw-r--r--examples/gui/splashscreen/test.lpi24
-rw-r--r--examples/gui/splitter/splitter_test.lpi28
-rw-r--r--examples/gui/sprites/spritedemo.lpi27
-rw-r--r--examples/gui/stdimages/stdimglist.lpi9
-rw-r--r--examples/gui/tabtest/tabtest.lpi20
-rw-r--r--examples/gui/timertest/timertest.lpi28
-rw-r--r--examples/gui/togglebox/ToggleBoxTest.lpi77
-rw-r--r--examples/gui/togglebox/ToggleBoxTest.lpr30
-rw-r--r--examples/gui/togglebox/mainfrm.pas44
-rw-r--r--examples/gui/treeviewtest/treeviewtest.lpi11
-rw-r--r--examples/gui/video_vlc/frmvlcplayer.pas4
-rw-r--r--examples/gui/video_vlc/testfpguivlc.lpi10
-rw-r--r--examples/gui/wulinetest/wuline_test.lpi28
72 files changed, 1933 insertions, 343 deletions
diff --git a/examples/apps/ide/src/fpg_textedit.pas b/examples/apps/ide/src/fpg_textedit.pas
index 013ad86b..3e88f3d1 100644
--- a/examples/apps/ide/src/fpg_textedit.pas
+++ b/examples/apps/ide/src/fpg_textedit.pas
@@ -2412,7 +2412,7 @@ begin
BuffList[I] := SLine;
end;
end;
- BuffList.SaveToFile(AFileName);
+ BuffList.SaveToFile(fpgToOSEncoding(AFileName));
finally
BuffList.Free;
end;
@@ -2423,7 +2423,7 @@ begin
if not fpgFileExists(AFileName) then
Exit; //==>
Clear;
- FLines.LoadFromFile(AFileName);
+ FLines.LoadFromFile(fpgToOSEncoding(AFileName));
HandleResize(Width, Height);
Invalidate;
end;
diff --git a/examples/apps/ide/src/frm_configureide.pas b/examples/apps/ide/src/frm_configureide.pas
index fad0418f..51061a42 100644
--- a/examples/apps/ide/src/frm_configureide.pas
+++ b/examples/apps/ide/src/frm_configureide.pas
@@ -1,7 +1,7 @@
{
fpGUI IDE - Maximus
- Copyright (C) 2012 - 2013 Graeme Geldenhuys
+ Copyright (C) 2012 - 2014 Graeme Geldenhuys
See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.
@@ -229,7 +229,6 @@ constructor TConfigureIDEForm.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FInternalMacroList := TIDEMacroList.Create;
- OnKeyPress := @FormKeyPressed;
end;
destructor TConfigureIDEForm.Destroy;
@@ -248,6 +247,7 @@ begin
Hint := '';
ShowHint := True;
WindowPosition := wpOneThirdDown;
+ OnKeyPress := @FormKeyPressed;
btnCancel := TfpgButton.Create(self);
with btnCancel do
diff --git a/examples/apps/ide/src/frm_main.pas b/examples/apps/ide/src/frm_main.pas
index fe903c31..8a8f3c12 100644
--- a/examples/apps/ide/src/frm_main.pas
+++ b/examples/apps/ide/src/frm_main.pas
@@ -1,7 +1,7 @@
{
fpGUI IDE - Maximus
- Copyright (C) 2012 - 2013 Graeme Geldenhuys
+ Copyright (C) 2012 - 2014 Graeme Geldenhuys
See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.
@@ -118,6 +118,7 @@ type
procedure AddUnitToProject(const AUnitName: TfpgString);
procedure miProjectAddUnitToProject(Sender: TObject);
procedure tvProjectDoubleClick(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
+ procedure tvProjectKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
procedure grdMessageKeyPressed(Sender: TObject; var KeyCode: Word; var ShiftState: TShiftState; var Consumed: Boolean);
procedure TabSheetClosing(Sender: TObject; ATabSheet: TfpgTabSheet);
procedure BuildTerminated(Sender: TObject);
@@ -541,18 +542,18 @@ var
r: TfpgTreeNode;
n: TfpgTreeNode;
begin
- u := TUnit.Create;
- u.FileName := AUnitName;
- u.Opened := True;
- GProject.UnitList.Add(u);
- // add reference to tabsheet
- pcEditor.ActivePage.TagPointer := u;
- s := fpgExtractRelativepath(GProject.ProjectDir, u.FileName);
- r := GetUnitsNode;
- n := r.AppendText(s);
- // add reference to treenode
- n.Data := u;
- tvProject.Invalidate;
+ u := GProject.UnitList.AddFilename(AUnitName);
+ if Assigned(n) then
+ begin
+ // add reference to tabsheet
+ pcEditor.ActivePage.TagPointer := u;
+ s := u.GetRelativePath;
+ r := GetUnitsNode;
+ n := r.AppendText(s);
+ // add reference to treenode
+ n.Data := u;
+ tvProject.Invalidate;
+ end;
end;
procedure TMainForm.miProjectAddUnitToProject(Sender: TObject);
@@ -587,6 +588,38 @@ begin
end;
end;
+procedure TMainForm.tvProjectKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
+var
+ r: TfpgTreeNode;
+ n: TfpgTreeNode;
+ i: integer;
+begin
+ if keyCode = keyDelete then
+ begin
+ r := GetUnitsNode;
+ if r.FindSubNode(tvProject.Selection.Text, False) = tvProject.Selection then
+ begin
+ // remove from project, then from tree view
+ n := tvProject.Selection;
+ tvProject.GotoNextNodeUp;
+ r.Remove(n);
+ tvProject.Invalidate;
+ GProject.UnitList.Remove(TUnit(n.Data));
+
+ for i := 0 to pcEditor.PageCount-1 do
+ begin
+ if pcEditor.Pages[i].TagPointer = n.Data then
+ begin
+ pcEditor.Pages[i].TagPointer := nil;
+ break
+ end;
+ end;
+ TUnit(n.Data).Free;
+ n.Free;
+ end;
+ end;
+end;
+
procedure TMainForm.grdMessageKeyPressed(Sender: TObject; var KeyCode: Word; var ShiftState: TShiftState; var Consumed: Boolean);
var
cr: TClipboardKeyType;
@@ -1478,6 +1511,7 @@ begin
Hint := '';
TabOrder := 20;
OnDoubleClick := @tvProjectDoubleClick;
+ OnKeyPress := @tvProjectKeyPressed;
end;
tsFiles := TfpgTabSheet.Create(pnlTool);
@@ -1597,7 +1631,7 @@ begin
begin
Name := 'mnuProject';
SetPosition(476, 140, 172, 20);
- AddMenuItem('Options...', rsKeyCtrl+rsKeyShift+'O', @miProjectOptions);
+ AddMenuItem('Options...', rsKeyCtrl+rsKeyShift+'F11', @miProjectOptions);
AddMenuItem('-', '', nil);
AddMenuItem('New (empty)...', '', @miProjectNew);
AddMenuItem('New from Template...', '', @miProjectNewFromTemplate);
diff --git a/examples/apps/ide/src/frm_projectoptions.pas b/examples/apps/ide/src/frm_projectoptions.pas
index 1e1c318a..a3e43d6a 100644
--- a/examples/apps/ide/src/frm_projectoptions.pas
+++ b/examples/apps/ide/src/frm_projectoptions.pas
@@ -1,7 +1,7 @@
{
fpGUI IDE - Maximus
- Copyright (C) 2012 - 2013 Graeme Geldenhuys
+ Copyright (C) 2012 - 2014 Graeme Geldenhuys
See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.
@@ -103,6 +103,7 @@ type
procedure CleanupCompilerDirs;
procedure CleanupUserMacrosGrid;
procedure SaveToMacroList(AList: TIDEMacroList);
+ procedure FormKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
@@ -582,6 +583,12 @@ begin
// AList.SetValue(cMacro_FPCSrcDir, edtFPCSrcDir.Directory);
end;
+procedure TProjectOptionsForm.FormKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
+begin
+ if KeyCode = keyEscape then
+ Close;
+end;
+
constructor TProjectOptionsForm.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
@@ -603,6 +610,7 @@ begin
WindowTitle := 'Project Options';
Hint := '';
ShowHint := True;
+ OnKeyPress := @FormKeyPressed;
btnCancel := TfpgButton.Create(self);
with btnCancel do
diff --git a/examples/apps/ide/src/maximus.lpi b/examples/apps/ide/src/maximus.lpi
index accb3570..01a377d7 100644
--- a/examples/apps/ide/src/maximus.lpi
+++ b/examples/apps/ide/src/maximus.lpi
@@ -42,7 +42,6 @@
<Unit0>
<Filename Value="maximus.lpr"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="maximus"/>
</Unit0>
<Unit1>
<Filename Value="frm_main.pas"/>
@@ -52,7 +51,6 @@
<Unit2>
<Filename Value="frm_configureide.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="frm_configureide"/>
</Unit2>
<Unit3>
<Filename Value="ideconst.pas"/>
@@ -67,7 +65,6 @@
<Unit5>
<Filename Value="frm_debug.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="frm_debug"/>
</Unit5>
<Unit6>
<Filename Value="project.pas"/>
@@ -77,7 +74,6 @@
<Unit7>
<Filename Value="unitlist.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="UnitList"/>
</Unit7>
<Unit8>
<Filename Value="frm_projectoptions.pas"/>
@@ -97,47 +93,42 @@
<Unit11>
<Filename Value="ideimages.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="ideimages"/>
</Unit11>
<Unit12>
<Filename Value="stringhelpers.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="stringhelpers"/>
</Unit12>
<Unit13>
<Filename Value="frm_procedurelist.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="frm_procedurelist"/>
</Unit13>
<Unit14>
- <Filename Value="mpaslex.pas"/>
+ <Filename Value="filemonitor.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="mPasLex"/>
+ <UnitName Value="filemonitor"/>
</Unit14>
<Unit15>
- <Filename Value="filemonitor.pas"/>
+ <Filename Value="synregexpr.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="filemonitor"/>
</Unit15>
<Unit16>
- <Filename Value="synregexpr.pas"/>
+ <Filename Value="fpg_textedit.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="SynRegExpr"/>
+ <UnitName Value="fpg_textedit"/>
</Unit16>
<Unit17>
- <Filename Value="fpg_textedit.pas"/>
+ <Filename Value="frm_find.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="fpg_textedit"/>
</Unit17>
<Unit18>
- <Filename Value="frm_find.pas"/>
+ <Filename Value="sha1.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="frm_find"/>
+ <UnitName Value="Sha1"/>
</Unit18>
<Unit19>
- <Filename Value="sha1.pas"/>
+ <Filename Value="mPasLex.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="Sha1"/>
+ <UnitName Value="mPasLex"/>
</Unit19>
</Units>
</ProjectOptions>
@@ -162,11 +153,7 @@
</Optimizations>
</CodeGeneration>
<Other>
- <CompilerMessages>
- <UseMsgFile Value="True"/>
- </CompilerMessages>
<CustomOptions Value="-dDEBUGSVRx"/>
- <CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>
diff --git a/examples/apps/ide/src/maximus.lpr b/examples/apps/ide/src/maximus.lpr
index cf9c439f..13a2047e 100644
--- a/examples/apps/ide/src/maximus.lpr
+++ b/examples/apps/ide/src/maximus.lpr
@@ -39,7 +39,6 @@ uses
ideimages,
stringhelpers,
frm_procedurelist,
- mPasLex,
filemonitor,
SynRegExpr,
fpg_textedit,
diff --git a/examples/apps/ide/src/unitlist.pas b/examples/apps/ide/src/unitlist.pas
index 827326e7..e6c09a69 100644
--- a/examples/apps/ide/src/unitlist.pas
+++ b/examples/apps/ide/src/unitlist.pas
@@ -1,7 +1,7 @@
{
fpGUI IDE - Maximus
- Copyright (C) 2012 - 2013 Graeme Geldenhuys
+ Copyright (C) 2012 - 2014 Graeme Geldenhuys
See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.
@@ -31,6 +31,7 @@ type
function GetUnitName: TfpgString;
public
constructor Create;
+ function GetRelativePath: TfpgString;
property FileName: TfpgString read FFilename write FFilename;
property UnitName: TfpgString read GetUnitName;
property Opened: Boolean read FOpened write FOpened;
@@ -48,6 +49,8 @@ type
function Count: integer;
function FindByName(const AUnitName: TfpgString): TUnit;
function FileExists(const AFilename: TfpgString): Boolean;
+ function AddFileName(const AFilename: TfpgString): TUnit;
+ function Remove(AUnit: TUnit): integer;
procedure Add(NewUnit: TUnit);
procedure Clear;
procedure Delete(AIndex: integer);
@@ -58,7 +61,8 @@ type
implementation
uses
- fpg_utils;
+ fpg_utils,
+ project;
{ TUnitList }
@@ -128,6 +132,25 @@ begin
end;
end;
+function TUnitList.AddFileName(const AFilename: TfpgString): TUnit;
+var
+ u: TUnit;
+begin
+ if not FileExists(AFilename) then
+ begin
+ u := TUnit.Create;
+ u.FileName := AFilename;
+ u.Opened := True;
+ Add(u);
+ Result := u;
+ end;
+end;
+
+function TUnitList.Remove(AUnit: TUnit): integer;
+begin
+ Result := FList.Remove(AUnit);
+end;
+
procedure TUnitList.Add(NewUnit: TUnit);
var
l: Integer;
@@ -176,6 +199,11 @@ begin
Result := fpgExtractFileName(Filename);
end;
+function TUnit.GetRelativePath: TfpgString;
+begin
+ Result := fpgExtractRelativepath(GProject.ProjectDir, FileName);
+end;
+
constructor TUnit.Create;
begin
inherited Create;
diff --git a/examples/apps/nanoedit/mainfrm.pas b/examples/apps/nanoedit/mainfrm.pas
index 93f8f8a6..f652e179 100644
--- a/examples/apps/nanoedit/mainfrm.pas
+++ b/examples/apps/nanoedit/mainfrm.pas
@@ -80,7 +80,7 @@ begin
try
if dlg.RunOpenFile then
begin
- memEditor.Lines.LoadFromFile(dlg.FileName);
+ memEditor.LoadFromFile(dlg.FileName);
FFileName := dlg.FileName;
UpdateStatus(FFileName);
end;
@@ -99,7 +99,7 @@ begin
dlg.FileName := FFilename;
if dlg.RunSaveFile then
begin
- memEditor.Lines.SaveToFile(dlg.FileName);
+ memEditor.SaveToFile(dlg.FileName);
UpdateStatus(Format('<%s> successfully saved.', [FFileName]));
end;
finally
diff --git a/examples/gui/alignment/aligntest.lpi b/examples/gui/alignment/aligntest.lpi
index 586b7b90..2062f69a 100644
--- a/examples/gui/alignment/aligntest.lpi
+++ b/examples/gui/alignment/aligntest.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,13 +40,21 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="aligntest"/>
+ </Target>
<SearchPaths>
- <IncludeFiles Value="../src/"/>
- <OtherUnitFiles Value="../src/"/>
+ <IncludeFiles Value="../src"/>
+ <OtherUnitFiles Value="../src"/>
+ <UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/alignment_resize/alignment_resize.lpi b/examples/gui/alignment_resize/alignment_resize.lpi
index e22fcc29..4bf13dfd 100644
--- a/examples/gui/alignment_resize/alignment_resize.lpi
+++ b/examples/gui/alignment_resize/alignment_resize.lpi
@@ -1,21 +1,22 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
<Title Value="alignment_resize"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -43,9 +44,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="alignment_resize"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/animation/anim_test.lpi b/examples/gui/animation/anim_test.lpi
index 16a03599..4db5823a 100644
--- a/examples/gui/animation/anim_test.lpi
+++ b/examples/gui/animation/anim_test.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=".elf"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -40,9 +42,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="anim_test"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/bevel/beveltest.lpi b/examples/gui/bevel/beveltest.lpi
index 2486d074..36486204 100644
--- a/examples/gui/bevel/beveltest.lpi
+++ b/examples/gui/bevel/beveltest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,9 +41,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="beveltest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/calendar/calendartest.lpi b/examples/gui/calendar/calendartest.lpi
index 20afc9c1..ccc474ab 100644
--- a/examples/gui/calendar/calendartest.lpi
+++ b/examples/gui/calendar/calendartest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,14 +41,20 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="calendartest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<CStyleOperator Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/colorlistbox/colorlistboxtest.lpi b/examples/gui/colorlistbox/colorlistboxtest.lpi
index b74ec22a..04703732 100644
--- a/examples/gui/colorlistbox/colorlistboxtest.lpi
+++ b/examples/gui/colorlistbox/colorlistboxtest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,12 +9,14 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<Title Value="colorlistboxtest"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -46,12 +48,22 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="colorlistboxtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Linking>
<LinkSmart Value="True"/>
</Linking>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/colorwheel/colorwheel_test.lpi b/examples/gui/colorwheel/colorwheel_test.lpi
index 41da8416..a0be0fc2 100644
--- a/examples/gui/colorwheel/colorwheel_test.lpi
+++ b/examples/gui/colorwheel/colorwheel_test.lpi
@@ -1,20 +1,22 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<Title Value="colorwheel_test"/>
<UseAppBundle Value="False"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -36,7 +38,6 @@
<Unit0>
<Filename Value="colorwheel_test.lpr"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="colorwheel_test"/>
</Unit0>
<Unit1>
<Filename Value="frm_main.pas"/>
@@ -46,20 +47,21 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="colorwheel_test"/>
+ </Target>
<SearchPaths>
- <IncludeFiles Value="$(ProjOutDir)/"/>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<CStyleOperator Value="False"/>
<AllowLabel Value="False"/>
<CPPInline Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
- <Other>
- <CustomOptions Value="-FUunits"/>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
</CompilerOptions>
</CONFIG>
diff --git a/examples/gui/colorwheel/frm_main.pas b/examples/gui/colorwheel/frm_main.pas
index 63518360..612ea6c1 100644
--- a/examples/gui/colorwheel/frm_main.pas
+++ b/examples/gui/colorwheel/frm_main.pas
@@ -8,10 +8,34 @@ uses
SysUtils, Classes, fpg_base, fpg_main, fpg_widget,
fpg_edit, fpg_form, fpg_label, fpg_button,
fpg_dialogs, fpg_menu, fpg_checkbox,
- fpg_panel, fpg_ColorWheel;
+ fpg_panel, fpg_ColorWheel, fpg_spinedit;
type
+ TColorPickedEvent = procedure(Sender: TObject; const AMousePos: TPoint; const AColor: TfpgColor) of object;
+
+
+ TPickerButton = class(TfpgButton)
+ private
+ FContinuousResults: Boolean;
+ FOnColorPicked: TColorPickedEvent;
+ FColorPos: TPoint;
+ FColor: TfpgColor;
+ FColorPicking: Boolean;
+ private
+ procedure DoColorPicked;
+ protected
+ procedure HandleLMouseDown(X, Y: integer; ShiftState: TShiftState); override;
+ procedure HandleLMouseUp(x, y: integer; shiftstate: TShiftState); override;
+ procedure HandleMouseMove(x, y: integer; btnstate: word; shiftstate: TShiftState); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ published
+ property ContinuousResults: Boolean read FContinuousResults write FContinuousResults;
+ property OnColorPicked: TColorPickedEvent read FOnColorPicked write FOnColorPicked;
+ end;
+
+
TMainForm = class(TfpgForm)
private
{@VFD_HEAD_BEGIN: MainForm}
@@ -28,36 +52,134 @@ type
Label4: TfpgLabel;
Label5: TfpgLabel;
Label6: TfpgLabel;
- edR: TfpgEdit;
- edG: TfpgEdit;
- edB: TfpgEdit;
+ edR: TfpgSpinEdit;
+ edG: TfpgSpinEdit;
+ edB: TfpgSpinEdit;
+ lblHex: TfpgLabel;
Label7: TfpgLabel;
Label8: TfpgLabel;
Bevel2: TfpgBevel;
Label9: TfpgLabel;
chkCrossHair: TfpgCheckBox;
chkBGColor: TfpgCheckBox;
+ btnPicker: TPickerButton;
+ chkContinuous: TfpgCheckBox;
{@VFD_HEAD_END: MainForm}
FViaRGB: Boolean; // to prevent recursive changes
- procedure btnQuitClicked(Sender: TObject);
- procedure chkCrossHairChange(Sender: TObject);
- procedure chkBGColorChange(Sender: TObject);
- procedure UpdateHSVComponents;
- procedure UpdateRGBComponents;
- procedure ColorChanged(Sender: TObject);
- procedure RGBChanged(Sender: TObject);
+ FColorPicking: Boolean;
+ procedure btnColorPicked(Sender: TObject; const AMousePos: TPoint; const AColor: TfpgColor);
+ procedure chkContinuousChanged(Sender: TObject);
+ procedure btnQuitClicked(Sender: TObject);
+ procedure chkCrossHairChange(Sender: TObject);
+ procedure chkBGColorChange(Sender: TObject);
+ procedure UpdateHSVComponents;
+ procedure UpdateRGBComponents;
+ procedure ColorChanged(Sender: TObject);
+ procedure RGBChanged(Sender: TObject);
public
constructor Create(AOwner: TComponent); override;
- procedure AfterCreate; override;
+ procedure AfterCreate; override;
end;
{@VFD_NEWFORM_DECL}
implementation
-
{@VFD_NEWFORM_IMPL}
+function ConvertToHexa(Value: Integer): string;
+var
+ ValH,ValL: Integer;
+begin
+ValH:= Value div 16;
+ValL:= Value mod 16;
+case ValH of
+ 15:
+ Result:= 'F';
+ 14:
+ Result:= 'E';
+ 13:
+ Result:= 'D';
+ 12:
+ Result:= 'C';
+ 11:
+ Result:= 'B';
+ 10:
+ Result:= 'A';
+ else
+ Result:= IntToStr(ValH);
+ end;
+case ValL of
+ 15:
+ Result:= Result+'F';
+ 14:
+ Result:= Result+'E';
+ 13:
+ Result:= Result+'D';
+ 12:
+ Result:= Result+'C';
+ 11:
+ Result:= Result+'B';
+ 10:
+ Result:= Result+'A';
+ else
+ Result:= Result+IntToStr(ValL);
+ end;
+end;
+
+function Hexa(Red,Green,Blue: Integer): string;
+begin
+Result:= '$'+ConvertToHexa(Red)+ConvertToHexa(Green)+ConvertToHexa(Blue);
+end;
+
+{ TPickerButton }
+
+procedure TPickerButton.DoColorPicked;
+var
+ pt: TPoint;
+begin
+ pt := WindowToScreen(self, FColorPos);
+ FColor := fpgApplication.GetScreenPixelColor(pt);
+ if Assigned(FOnColorPicked) then
+ FOnColorPicked(self, FColorPos, FColor);
+end;
+
+procedure TPickerButton.HandleLMouseDown(X, Y: integer; ShiftState: TShiftState);
+begin
+ inherited HandleLMouseDown(X, Y, ShiftState);
+ MouseCursor := mcCross;
+ FColorPicking := True;
+ CaptureMouse;
+end;
+
+procedure TPickerButton.HandleLMouseUp(x, y: integer; shiftstate: TShiftState);
+begin
+ inherited HandleLMouseUp(x, y, shiftstate);
+ ReleaseMouse;
+ FColorPicking := False;
+ MouseCursor := mcDefault;
+ DoColorPicked;
+end;
+
+procedure TPickerButton.HandleMouseMove(x, y: integer; btnstate: word;
+ shiftstate: TShiftState);
+begin
+ //inherited HandleMouseMove(x, y, btnstate, shiftstate);
+ if not FColorPicking then
+ Exit;
+ FColorPos.x := x;
+ FColorPos.y := y;
+ if FContinuousResults then
+ DoColorPicked;
+end;
+
+constructor TPickerButton.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FColorPicking := False;
+ FContinuousResults := False;
+end;
+
procedure TMainForm.ColorChanged(Sender: TObject);
begin
UpdateHSVComponents;
@@ -67,22 +189,34 @@ end;
procedure TMainForm.RGBChanged(Sender: TObject);
var
- rgb: TFPColor;
+ rgb: TRGBTriple;
c: TfpgColor;
begin
FViaRGB := True; // revent recursive updates
- rgb.Red := StrToInt(edR.Text);
- rgb.Green := StrToInt(edG.Text);
- rgb.Blue := StrToInt(edB.Text);
- c := FPColorTofpgColor(rgb);
+ rgb.Red := edR.Value;
+ rgb.Green := edG.Value;
+ rgb.Blue := edB.Value;
+ c := RGBTripleTofpgColor(rgb);
ColorWheel1.SetSelectedColor(c); // This will trigger ColorWheel and ValueBar OnChange event
FViaRGB := False;
+ lblHex.Text:= 'Hex = '+ Hexa(rgb.Red,rgb.Green,rgb.Blue);
end;
constructor TMainForm.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FViaRGB := False;
+ FColorPicking := False;
+end;
+
+procedure TMainForm.btnColorPicked(Sender: TObject; const AMousePos: TPoint; const AColor: TfpgColor);
+begin
+ ColorWheel1.SetSelectedColor(AColor);
+end;
+
+procedure TMainForm.chkContinuousChanged(Sender: TObject);
+begin
+ btnPicker.ContinuousResults := chkContinuous.Checked;
end;
procedure TMainForm.btnQuitClicked(Sender: TObject);
@@ -122,14 +256,15 @@ end;
procedure TMainForm.UpdateRGBComponents;
var
- rgb: TFPColor;
+ rgb: TRGBTriple;
c: TfpgColor;
begin
c := ValueBar1.SelectedColor;
- rgb := fpgColorToFPColor(c);
- edR.Text := IntToStr(rgb.Red);
- edG.Text := IntToStr(rgb.Green);
- edB.Text := IntToStr(rgb.Blue);
+ rgb := fpgColorToRGBTriple(c);
+ edR.Value := rgb.Red;
+ edG.Value := rgb.Green;
+ edB.Value := rgb.Blue;
+ lblHex.Text:= 'Hex = '+ Hexa(rgb.Red,rgb.Green,rgb.Blue);
end;
procedure TMainForm.AfterCreate;
@@ -138,6 +273,7 @@ begin
Name := 'MainForm';
SetPosition(349, 242, 537, 411);
WindowTitle := 'ColorWheel test app';
+ Hint := '';
WindowPosition := wpUser;
Button1 := TfpgButton.Create(self);
@@ -166,6 +302,7 @@ begin
begin
Name := 'ValueBar1';
SetPosition(304, 20, 52, 244);
+ Value := 1;
OnChange := @ColorChanged;
end;
@@ -174,6 +311,7 @@ begin
begin
Name := 'Bevel1';
SetPosition(20, 288, 76, 56);
+ Hint := '';
end;
Label1 := TfpgLabel.Create(self);
@@ -275,39 +413,55 @@ begin
Text := 'Blue';
end;
- edR := TfpgEdit.Create(self);
+ edR := TfpgSpinEdit.Create(self);
with edR do
begin
Name := 'edR';
SetPosition(296, 280, 44, 26);
TabOrder := 13;
- Text := '255';
+ MinValue := 0;
+ MaxValue := 255;
+ Value := 255;
FontDesc := '#Edit1';
OnExit := @RGBChanged;
end;
- edG := TfpgEdit.Create(self);
+ edG := TfpgSpinEdit.Create(self);
with edG do
begin
Name := 'edG';
SetPosition(296, 308, 44, 26);
TabOrder := 14;
- Text := '255';
+ MinValue := 0;
+ MaxValue := 255;
+ Value := 255;
FontDesc := '#Edit1';
OnExit := @RGBChanged;
end;
- edB := TfpgEdit.Create(self);
+ edB := TfpgSpinEdit.Create(self);
with edB do
begin
Name := 'edB';
SetPosition(296, 336, 44, 26);
TabOrder := 15;
- Text := '255';
+ MinValue := 0;
+ MaxValue := 255;
+ Value := 255;
FontDesc := '#Edit1';
OnExit := @RGBChanged;
end;
+ lblHex := TfpgLabel.Create(self);
+ with lblHex do
+ begin
+ Name := 'lblHex';
+ SetPosition(380, 316, 120, 16);
+ FontDesc := '#Label2';
+ Hint := '';
+ Text := 'Hex = ';
+ end;
+
Label7 := TfpgLabel.Create(self);
with Label7 do
begin
@@ -333,6 +487,7 @@ begin
begin
Name := 'Bevel2';
SetPosition(388, 8, 2, 260);
+ Hint := '';
Style := bsLowered;
end;
@@ -353,6 +508,7 @@ begin
Name := 'chkCrossHair';
SetPosition(396, 32, 128, 20);
FontDesc := '#Label1';
+ Hint := '';
TabOrder := 20;
Text := 'Large CrossHair';
OnChange := @chkCrossHairChange;
@@ -364,11 +520,37 @@ begin
Name := 'chkBGColor';
SetPosition(396, 56, 132, 20);
FontDesc := '#Label1';
+ Hint := '';
TabOrder := 21;
Text := 'New BG Color';
OnChange := @chkBGColorChange;
end;
+ btnPicker := TPickerButton.Create(self);
+ with btnPicker do
+ begin
+ Name := 'btnPicker';
+ SetPosition(116, 372, 80, 23);
+ Text := 'Picker';
+ FontDesc := '#Label1';
+ Hint := '';
+ ImageName := '';
+ TabOrder := 24;
+ OnColorPicked := @btnColorPicked;
+ end;
+
+ chkContinuous := TfpgCheckBox.Create(self);
+ with chkContinuous do
+ begin
+ Name := 'chkContinous';
+ SetPosition(205, 375, 90, 19);
+ FontDesc := '#Label1';
+ Hint := '';
+ TabOrder := 25;
+ Text := 'Continous';
+ OnChange := @chkContinuousChanged;
+ end;
+
{@VFD_BODY_END: MainForm}
// link the two components
@@ -376,6 +558,9 @@ begin
// ColorWheel1.BackgroundColor := clFuchsia;
// ValueBar1.BackgroundColor := clFuchsia;
// ColorWheel1.CursorSize := 400;
+ UpdateHSVComponents;
+ if not FViaRGB then
+ UpdateRGBComponents;
end;
diff --git a/examples/gui/combobox/comboboxtest.lpi b/examples/gui/combobox/comboboxtest.lpi
index 41f6ae73..2163619a 100644
--- a/examples/gui/combobox/comboboxtest.lpi
+++ b/examples/gui/combobox/comboboxtest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -50,13 +52,20 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="comboboxtest"/>
+ </Target>
<SearchPaths>
- <OtherUnitFiles Value="../common/"/>
+ <OtherUnitFiles Value="../common"/>
+ <UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/combobox/frm_main.pas b/examples/gui/combobox/frm_main.pas
index e1a293df..6471963d 100644
--- a/examples/gui/combobox/frm_main.pas
+++ b/examples/gui/combobox/frm_main.pas
@@ -5,12 +5,18 @@ unit frm_main;
interface
uses
- SysUtils, Classes, fpg_base, fpg_main, fpg_edit,
- fpg_widget, fpg_form, fpg_label, fpg_button,
- fpg_listbox, fpg_memo, fpg_combobox, fpg_basegrid, fpg_grid,
- fpg_dialogs, fpg_checkbox, fpg_tree, fpg_trackbar,
- fpg_progressbar, fpg_radiobutton, fpg_tab, fpg_menu,
- fpg_panel, fpg_popupcalendar, fpg_gauge, fpg_editcombo;
+ SysUtils,
+ Classes,
+ fpg_base,
+ fpg_main,
+ fpg_form,
+ fpg_label,
+ fpg_button,
+ fpg_combobox,
+ fpg_checkbox,
+ fpg_radiobutton,
+ fpg_panel,
+ fpg_editcombo;
type
diff --git a/examples/gui/command_interface/test.lpi b/examples/gui/command_interface/test.lpi
index da19eca5..cf714b52 100644
--- a/examples/gui/command_interface/test.lpi
+++ b/examples/gui/command_interface/test.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -50,7 +51,18 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="command_interface_test"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
diff --git a/examples/gui/customstyles/customstyles.lpi b/examples/gui/customstyles/customstyles.lpi
index 50b2d740..36fef016 100644
--- a/examples/gui/customstyles/customstyles.lpi
+++ b/examples/gui/customstyles/customstyles.lpi
@@ -53,6 +53,12 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
+ <Target>
+ <Filename Value="customstyles_test"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<CStyleOperator Value="False"/>
@@ -73,7 +79,6 @@
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/customstyles/mystyle.pas b/examples/gui/customstyles/mystyle.pas
index 665a22b0..8ca00d33 100644
--- a/examples/gui/customstyles/mystyle.pas
+++ b/examples/gui/customstyles/mystyle.pas
@@ -1,4 +1,4 @@
-{
+(*
A very quick and basic style implementation. It took all of 10 minutes.
To apply this style, follow these instructions:
@@ -31,7 +31,7 @@
end;
end;
-}
+*)
unit mystyle;
{$mode objfpc}{$H+}
diff --git a/examples/gui/customwindow/close.bmp b/examples/gui/customwindow/close.bmp
new file mode 100644
index 00000000..af6745a5
--- /dev/null
+++ b/examples/gui/customwindow/close.bmp
Binary files differ
diff --git a/examples/gui/customwindow/custom_window.lpi b/examples/gui/customwindow/custom_window.lpi
new file mode 100644
index 00000000..2059fa29
--- /dev/null
+++ b/examples/gui/customwindow/custom_window.lpi
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <ProjectOptions>
+ <Version Value="9"/>
+ <General>
+ <SessionStorage Value="InProjectDir"/>
+ <MainUnit Value="0"/>
+ <Title Value="custom_window"/>
+ <UseAppBundle Value="False"/>
+ <ResourceType Value="res"/>
+ </General>
+ <i18n>
+ <EnableI18N LFM="False"/>
+ </i18n>
+ <VersionInfo>
+ <StringTable ProductVersion=""/>
+ </VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="Default" Default="True"/>
+ </BuildModes>
+ <PublishOptions>
+ <Version Value="2"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ </local>
+ </RunParams>
+ <RequiredPackages Count="1">
+ <Item1>
+ <PackageName Value="fpgui_toolkit"/>
+ </Item1>
+ </RequiredPackages>
+ <Units Count="2">
+ <Unit0>
+ <Filename Value="custom_window.lpr"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="custom_window"/>
+ </Unit0>
+ <Unit1>
+ <Filename Value="images.inc"/>
+ <IsPartOfProject Value="True"/>
+ </Unit1>
+ </Units>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="11"/>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ </SearchPaths>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="3">
+ <Item1>
+ <Name Value="EAbort"/>
+ </Item1>
+ <Item2>
+ <Name Value="ECodetoolError"/>
+ </Item2>
+ <Item3>
+ <Name Value="EFOpenError"/>
+ </Item3>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/examples/gui/customwindow/custom_window.lpr b/examples/gui/customwindow/custom_window.lpr
new file mode 100644
index 00000000..eab06e5d
--- /dev/null
+++ b/examples/gui/customwindow/custom_window.lpr
@@ -0,0 +1,352 @@
+{ This was a very quick and dirty demo to show how custom windows with your
+ own style of borders (eg: like Chrome or elementryOS) can be implement.
+ There is obviously lots of scope for improving this code and creating
+ custom widgets to make better use of code reuse and abstraction. }
+program custom_window;
+
+{$mode objfpc}{$H+}
+
+uses
+ {$IFDEF UNIX}{$IFDEF UseCThreads}
+ cthreads,
+ {$ENDIF}{$ENDIF}
+ Classes, SysUtils,
+ fpg_base, fpg_main, fpg_form, fpg_button,
+ fpg_stylemanager, fpg_cmdlineparams, fpg_grid,
+ fpg_StringGridBuilder, fpg_editbtn, fpg_checkbox,
+ fpg_panel, fpg_dialogs;
+
+type
+
+ TMainForm = class(TfpgForm)
+ procedure ResizeClicked(Sender: TObject);
+ private
+ {@VFD_HEAD_BEGIN: MainForm}
+ btnQuit: TfpgButton;
+ Grid1: TfpgStringGrid;
+ FilenameEdit1: TfpgFileNameEdit;
+ btnGo: TfpgButton;
+ CheckBox1: TfpgCheckBox;
+ bvlTitle: TfpgBevel;
+ btnClose: TfpgImagePanel;
+ btnResize: TfpgImagePanel;
+ bvlTasks: TfpgBevel;
+ {@VFD_HEAD_END: MainForm}
+ FLastPos: TPoint;
+ FMouseTracked: Boolean;
+ procedure TitleMouseDown(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
+ procedure TitleMouseUp(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
+ procedure TitleMouseMoved(Sender: TObject; AShift: TShiftState; const AMousePos: TPoint);
+ procedure btnCloseClicked(Sender: TObject);
+ procedure PaintTasksPanel(Sender: TObject);
+ procedure PaintTitle(Sender: TObject);
+ procedure FormPaint(Sender: TObject);
+ procedure btnQuitClicked(Sender: TObject);
+ procedure btnGoClicked(Sender: TObject);
+ public
+ constructor Create(AOwner: TComponent); override;
+ procedure AfterCreate; override;
+ end;
+
+{@VFD_NEWFORM_DECL}
+
+const
+ cBackground = TfpgColor($FFf5f5f5);
+ cGradientTop = TfpgColor($FFe5e5e5);
+ cGradientBottom = TfpgColor($FFbcbcbc);
+ cBorder = TfpgColor($FF7c7c7c);
+ cGrayPanel = TfpgColor($FFdedede);
+
+ { tip: probably best to use specific fonts for specific OSes }
+ cHeader1 = 'Arial-11:bold:antialias=true';
+ cHeader2 = 'Arial-10:antialias=true';
+
+{$I images.inc}
+
+{@VFD_NEWFORM_IMPL}
+
+procedure TMainForm.ResizeClicked(Sender: TObject);
+begin
+ ShowMessage('I''ll leave this one up to you to implement and experiment with. ;-)', 'Hint');
+end;
+
+procedure TMainForm.TitleMouseDown(Sender: TObject; AButton: TMouseButton;
+ AShift: TShiftState; const AMousePos: TPoint);
+begin
+ FMouseTracked := True;
+ FLastPos := bvlTitle.WindowToScreen(self, AMousePos);
+ bvlTitle.CaptureMouse;
+end;
+
+procedure TMainForm.TitleMouseUp(Sender: TObject; AButton: TMouseButton;
+ AShift: TShiftState; const AMousePos: TPoint);
+begin
+ FMouseTracked := False;
+ bvlTitle.ReleaseMouse;
+end;
+
+procedure TMainForm.TitleMouseMoved(Sender: TObject; AShift: TShiftState;
+ const AMousePos: TPoint);
+var
+ dx, dy: integer;
+ pt: TPoint;
+begin
+ pt := WindowToScreen(self, AMousePos);
+ if not FMouseTracked then
+ begin
+ FLastPos := pt;
+ Exit;
+ end;
+
+ dx := pt.X - FLastPos.X;
+ dy := pt.Y - FLastPos.Y;
+ Left := Left + dx;
+ Top := Top + dy;
+ FLastPos := pt;
+ UpdateWindowPosition;
+end;
+
+procedure TMainForm.btnCloseClicked(Sender: TObject);
+begin
+ btnQuit.Click;
+end;
+
+procedure TMainForm.PaintTasksPanel(Sender: TObject);
+begin
+ with bvlTasks do
+ begin
+ Canvas.Clear(cGrayPanel);
+
+ Canvas.Color := cBorder;
+ Canvas.DrawRectangle(0, 0, Width, Height);
+
+ Canvas.TextColor := cBorder;
+ // Output some sample text
+ Canvas.Font := fpgGetFont(cHeader1);
+ Canvas.DrawText(8, 10, 'Personal');
+ Canvas.Font := fpgGetFont(cHeader2);
+ Canvas.DrawText(20, 30, 'Home');
+ Canvas.DrawText(20, 50, 'Documents');
+ Canvas.DrawText(20, 70, 'Music');
+ Canvas.DrawText(20, 90, 'Pictures');
+ Canvas.Font := fpgGetFont(cHeader1);
+ Canvas.DrawText(8, 110, 'Network');
+ Canvas.Font := fpgGetFont(cHeader2);
+ Canvas.DrawText(20, 130, 'Entire network');
+ end;
+end;
+
+procedure TMainForm.PaintTitle(Sender: TObject);
+var
+ r: TfpgRect;
+begin
+ r.SetRect(0, 1, Width, 46);
+ with bvlTitle do
+ begin
+ Canvas.GradientFill(r, cGradientTop, cGradientBottom, gdVertical);
+
+ Canvas.Color := TfpgColor($FFc9c9c9);
+ Canvas.DrawLine(0, Height-2, Width, Height-2);
+
+ Canvas.Color := cBorder;
+ Canvas.DrawRectangle(0, 0, Width, Height);
+
+ Canvas.TextColor := cBorder;
+ Canvas.Font := fpgGetFont(cHeader1);
+ Canvas.DrawText(30, 8, Width-60, 20, WindowTitle, [txtHCenter, txtTop]);
+ end;
+end;
+
+procedure TMainForm.FormPaint(Sender: TObject);
+begin
+ Canvas.Color := cBorder;
+ Canvas.DrawRectangle(0, 0, Width, Height);
+end;
+
+procedure TMainForm.btnQuitClicked(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TMainForm.btnGoClicked(Sender: TObject);
+var
+ sgb: TStringGridBuilder;
+begin
+ try
+ sgb := TStringGridBuilder.CreateCustom(Grid1, FilenameEdit1.FileName, CheckBox1.Checked);
+ sgb.Run;
+ finally
+ sgb.Free;
+ end;
+end;
+
+constructor TMainForm.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ Include(FWindowAttributes, waBorderLess); // borderless and steals focus like a normal form
+ FMouseTracked := False;
+
+ fpgSetNamedColor(clWindowBackground, cBackground);
+
+ fpgImages.AddBMP( // 8x9 pixels.
+ 'my.close',
+ @img_close,
+ sizeof(img_close));
+
+ fpgImages.AddBMP( // 10x11 pixels.
+ 'my.resize',
+ @img_resize,
+ sizeof(img_resize));
+end;
+
+procedure TMainForm.AfterCreate;
+begin
+ {%region 'Auto-generated GUI code' -fold}
+ {@VFD_BODY_BEGIN: MainForm}
+ Name := 'MainForm';
+ SetPosition(464, 271, 866, 473);
+ WindowTitle := 'fpGUI Custom Window Demo';
+ Hint := '';
+ OnPaint := @FormPaint;
+
+ btnQuit := TfpgButton.Create(self);
+ with btnQuit do
+ begin
+ Name := 'btnQuit';
+ SetPosition(772, 436, 80, 23);
+ Text := 'Quit';
+ FontDesc := '#Label1';
+ Hint := '';
+ ImageName := '';
+ TabOrder := 1;
+ OnClick := @btnQuitClicked;
+ end;
+
+ Grid1 := TfpgStringGrid.Create(self);
+ with Grid1 do
+ begin
+ Name := 'Grid1';
+ SetPosition(182, 120, 666, 276);
+ BackgroundColor := TfpgColor($80000002);
+ FontDesc := '#Grid';
+ HeaderFontDesc := '#GridHeader';
+ Hint := '';
+ RowCount := 0;
+ RowSelect := False;
+ TabOrder := 2;
+ end;
+
+ FilenameEdit1 := TfpgFileNameEdit.Create(self);
+ with FilenameEdit1 do
+ begin
+ Name := 'FilenameEdit1';
+ SetPosition(182, 92, 510, 24);
+ ExtraHint := '';
+ FileName := '';
+ Filter := 'CSV Files (*.csv)|*.csv';
+ InitialDir := '';
+ TabOrder := 3;
+ end;
+
+ btnGo := TfpgButton.Create(self);
+ with btnGo do
+ begin
+ Name := 'btnGo';
+ SetPosition(768, 92, 80, 23);
+ Text := 'GO';
+ FontDesc := '#Label1';
+ Hint := '';
+ ImageName := '';
+ TabOrder := 4;
+ OnClick := @btnGoClicked;
+ end;
+
+ CheckBox1 := TfpgCheckBox.Create(self);
+ with CheckBox1 do
+ begin
+ Name := 'CheckBox1';
+ SetPosition(184, 68, 120, 19);
+ FontDesc := '#Label1';
+ Hint := '';
+ TabOrder := 5;
+ Text := 'Has Header';
+ end;
+
+ bvlTitle := TfpgBevel.Create(self);
+ with bvlTitle do
+ begin
+ Name := 'bvlTitle';
+ SetPosition(0, 0, 866, 48);
+ Anchors := [anLeft,anRight,anTop];
+ Hint := '';
+ Shape := bsSpacer;
+ OnPaint := @PaintTitle;
+ OnMouseMove := @TitleMouseMoved;
+ OnMouseDown := @TitleMouseDown;
+ OnMouseUp := @TitleMouseUp;
+ end;
+
+ btnClose := TfpgImagePanel.Create(bvlTitle);
+ with btnClose do
+ begin
+ Name := 'btnClose';
+ SetPosition(9, 8, 8, 9);
+ OwnsImage := False;
+ OnClick := @btnCloseClicked;
+ end;
+
+ btnResize := TfpgImagePanel.Create(bvlTitle);
+ with btnResize do
+ begin
+ Name := 'btnResize';
+ SetPosition(849, 8, 10, 11);
+ OwnsImage := False;
+ OnClick := @ResizeClicked;
+ end;
+
+ bvlTasks := TfpgBevel.Create(self);
+ with bvlTasks do
+ begin
+ Name := 'bvlTasks';
+ SetPosition(0, 47, 170, 426);
+ Anchors := [anLeft,anTop,anBottom];
+ Hint := '';
+ Shape := bsSpacer;
+ OnPaint := @PaintTasksPanel;
+ end;
+
+ {@VFD_BODY_END: MainForm}
+ {%endregion}
+
+ btnClose.Image := fpgImages.GetImage('my.close');
+ btnResize.Image := fpgImages.GetImage('my.resize');
+end;
+
+
+procedure MainProc;
+var
+ frm: TMainForm;
+begin
+ fpgApplication.Initialize;
+
+ { Set our new style as the default (before we create any forms), unless
+ a the end-user specified a different style via the command line. }
+ if not gCommandLineParams.IsParam('style') then
+ begin
+ if fpgStyleManager.SetStyle('Plastic Light Gray') then
+ fpgStyle := fpgStyleManager.Style;
+ end;
+
+ frm := TMainForm.Create(nil);
+ try
+ frm.Show;
+ fpgApplication.Run;
+ finally
+ frm.Free;
+ end;
+end;
+
+begin
+ MainProc;
+end.
+
diff --git a/examples/gui/customwindow/extrafpc.cfg b/examples/gui/customwindow/extrafpc.cfg
new file mode 100644
index 00000000..89eafa99
--- /dev/null
+++ b/examples/gui/customwindow/extrafpc.cfg
@@ -0,0 +1,10 @@
+-FUunits
+-Fu../../../lib/$fpctarget
+-Fu../common/
+-Xs
+-XX
+-CX
+#ifdef mswindows
+-WG
+#endif
+
diff --git a/examples/gui/customwindow/images.inc b/examples/gui/customwindow/images.inc
new file mode 100644
index 00000000..79663a24
--- /dev/null
+++ b/examples/gui/customwindow/images.inc
@@ -0,0 +1,57 @@
+
+const
+ img_close: array[0..337] of byte = (
+ 66, 77, 82, 1, 0, 0, 0, 0, 0, 0,122, 0, 0, 0,108, 0, 0,
+ 0, 8, 0, 0, 0, 9, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 216, 0, 0, 0,196, 14, 0, 0,196, 14, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 66, 71, 82,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,226,226,226,238,238,238,225,225,225,223,223,223,223,223,
+ 223,226,226,226,238,238,238,226,226,226,228,228,228,184,184,184,231,
+ 231,231,226,226,226,226,226,226,230,230,230,184,184,184,228,228,228,
+ 172,172,172,160,160,160,173,173,173,231,231,231,231,231,231,173,173,
+ 173,160,160,160,172,172,172,216,216,216,159,159,159,153,153,153,170,
+ 170,170,168,168,168,153,153,153,157,157,157,215,215,215,225,225,225,
+ 219,219,219,165,165,165,149,149,149,149,149,149,162,162,162,218,218,
+ 218,225,225,225,227,227,227,229,229,229,158,158,158,141,141,141,142,
+ 142,142,163,163,163,232,232,232,227,227,227,227,227,227,152,152,152,
+ 136,136,136,146,146,146,144,144,144,136,136,136,154,154,154,228,228,
+ 228,149,149,149,128,128,128,140,140,140,217,217,217,215,215,215,138,
+ 138,138,128,128,128,150,150,150,213,213,213,147,147,147,214,214,214,
+ 226,226,226,226,226,226,214,214,214,146,146,146,213,213,213);
+
+
+const
+ img_resize: array[0..473] of byte = (
+ 66, 77,218, 1, 0, 0, 0, 0, 0, 0,122, 0, 0, 0,108, 0, 0,
+ 0, 10, 0, 0, 0, 11, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 96, 1, 0, 0,196, 14, 0, 0,196, 14, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 66, 71, 82,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,242,242,242,242,242,242,242,242,242,242,242,242,233,233,
+ 233,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223, 0,
+ 0,167,167,167,167,167,167,167,167,167,162,162,162,189,189,189,223,
+ 223,223,223,223,223,223,223,223,223,223,223,223,223,223, 0, 0,157,
+ 157,157,157,157,157,157,157,157,193,193,193,226,226,226,224,224,224,
+ 224,224,224,224,224,224,224,224,224,224,224,224, 0, 0,146,146,146,
+ 141,141,141,144,144,144,164,164,164,229,229,229,224,224,224,224,224,
+ 224,224,224,224,224,224,224,224,224,224, 0, 0,131,131,131,175,175,
+ 175,146,146,146,133,133,133,153,153,153,224,224,224,224,224,224,224,
+ 224,224,224,224,224,224,224,224, 0, 0,174,174,174,225,225,225,215,
+ 215,215,146,146,146,208,208,208,228,228,228,239,239,239,227,227,227,
+ 225,225,225,235,235,235, 0, 0,225,225,225,225,225,225,225,225,225,
+ 225,225,225,225,225,225,225,225,225,183,183,183,232,232,232,235,235,
+ 235,201,201,201, 0, 0,226,226,226,226,226,226,226,226,226,226,226,
+ 226,226,226,226,167,167,167,153,153,153,167,167,167,193,193,193,154,
+ 154,154, 0, 0,226,226,226,226,226,226,226,226,226,226,226,226,226,
+ 226,226,215,215,215,152,152,152,144,144,144,144,144,144,144,144,144,
+ 0, 0,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,
+ 235,235,235,184,184,184,134,134,134,134,134,134,134,134,134, 0, 0,
+ 227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,168,168,
+ 168,115,115,115,115,115,115,115,115,115,115,115,115, 0, 0);
+
+
diff --git a/examples/gui/customwindow/resize.bmp b/examples/gui/customwindow/resize.bmp
new file mode 100644
index 00000000..8bb264cf
--- /dev/null
+++ b/examples/gui/customwindow/resize.bmp
Binary files differ
diff --git a/examples/gui/customwindow/units/.gitignore b/examples/gui/customwindow/units/.gitignore
new file mode 100644
index 00000000..72e8ffc0
--- /dev/null
+++ b/examples/gui/customwindow/units/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/examples/gui/dbtest/dbtest.lpi b/examples/gui/dbtest/dbtest.lpi
index a7c9efb9..b9934e9e 100644
--- a/examples/gui/dbtest/dbtest.lpi
+++ b/examples/gui/dbtest/dbtest.lpi
@@ -1,22 +1,23 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -47,16 +48,21 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="dbtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<AllowLabel Value="False"/>
<CPPInline Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/drag_n_drop/dndexample.lpi b/examples/gui/drag_n_drop/dndexample.lpi
index 758b5887..8c0df33d 100644
--- a/examples/gui/drag_n_drop/dndexample.lpi
+++ b/examples/gui/drag_n_drop/dndexample.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -46,7 +46,7 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
<Target>
<Filename Value="dndexample"/>
</Target>
diff --git a/examples/gui/drag_n_drop/dndexample.lpr b/examples/gui/drag_n_drop/dndexample.lpr
index 13dda563..46c5a1f6 100644
--- a/examples/gui/drag_n_drop/dndexample.lpr
+++ b/examples/gui/drag_n_drop/dndexample.lpr
@@ -64,6 +64,7 @@ procedure TMainForm.Edit1DragEnter(Sender, Source: TObject;
var
s: string;
begin
+ ShowMimeList(AMimeList);
s := 'text/plain';
if chkAccept.Checked then
Accept := False
@@ -73,7 +74,6 @@ begin
begin
if AMimeChoice <> s then
AMimeChoice := s;
- ShowMimeList(AMimeList);
end;
end;
@@ -81,9 +81,9 @@ procedure TMainForm.Bevel1DragEnter(Sender, Source: TObject;
AMimeList: TStringList; var AMimeChoice: TfpgString;
var ADropAction: TfpgDropAction; var Accept: Boolean);
var
- i: integer;
s: string;
begin
+ ShowMimeList(AMimeList);
{ the mime type we want to accept }
s := 'text/html';
{ if we wil accept the drop, set Accept to True }
@@ -94,7 +94,6 @@ begin
if AMimeChoice <> s then
AMimeChoice := s;
- ShowMimeList(AMimeList);
Bevel1.BackgroundColor := clRed;
end;
end;
@@ -108,7 +107,6 @@ procedure TMainForm.PanelDragDrop(Sender, Source: TObject; X, Y: integer;
AData: Variant);
var
s: string;
- v: variant;
begin
s := AData;
Bevel1.Text := Format('Drop event at (%d,%d) with value(s):'+LineEnding+'%s', [X, Y, s]);
@@ -123,13 +121,14 @@ end;
procedure TMainForm.btnClearClicked(Sender: TObject);
begin
Grid1.RowCount := 0;
+ Edit1.Text := '';
+ Bevel1.Text := '';
end;
procedure TMainForm.LabelDragStartDetected(Sender: TObject);
var
m: TfpgMimeData;
d: TfpgDrag;
- v: variant;
begin
m := TfpgMimeData.Create;
diff --git a/examples/gui/edits/edittest.lpi b/examples/gui/edits/edittest.lpi
index f10feccd..be69faf9 100644
--- a/examples/gui/edits/edittest.lpi
+++ b/examples/gui/edits/edittest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -40,9 +42,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="edittest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/embedded_form/demo1.lpi b/examples/gui/embedded_form/demo1.lpi
index f6200396..de9bb9a3 100644
--- a/examples/gui/embedded_form/demo1.lpi
+++ b/examples/gui/embedded_form/demo1.lpi
@@ -1,19 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<UseAppBundle Value="False"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -50,12 +52,20 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="embedded_form_test"/>
+ </Target>
<SearchPaths>
- <IncludeFiles Value="$(ProjOutDir)/"/>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/embedded_form/frm_main.pas b/examples/gui/embedded_form/frm_main.pas
index 785247c9..e2fb0f0e 100644
--- a/examples/gui/embedded_form/frm_main.pas
+++ b/examples/gui/embedded_form/frm_main.pas
@@ -56,6 +56,7 @@ var
var
j: integer;
begin
+ Result := '';
if indent = 0 then
exit;
for j := 1 to indent do
diff --git a/examples/gui/filedialog/filedialog.lpi b/examples/gui/filedialog/filedialog.lpi
index 359ca76e..f6efbd83 100644
--- a/examples/gui/filedialog/filedialog.lpi
+++ b/examples/gui/filedialog/filedialog.lpi
@@ -41,6 +41,12 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
+ <Target>
+ <Filename Value="filedialog"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
@@ -48,6 +54,7 @@
</Parsing>
<Other>
<CustomOptions Value="-FUunits"/>
+ <CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>
diff --git a/examples/gui/filedialog/filedialog.lpr b/examples/gui/filedialog/filedialog.lpr
index 7ea47bed..1294ac06 100644
--- a/examples/gui/filedialog/filedialog.lpr
+++ b/examples/gui/filedialog/filedialog.lpr
@@ -105,6 +105,7 @@ procedure TMainForm.btnUserInputClicked(Sender: TObject);
var
lAnswer: TfpgString;
begin
+ lAnswer := '';
if fpgInputQuery('Caption here', 'And the prompt goes here', lAnswer) then
ShowMessage(Format('User entered <%s>', [lAnswer]));
end;
diff --git a/examples/gui/filegrid/filegrid.lpi b/examples/gui/filegrid/filegrid.lpi
index 1fc73d24..74fb0d20 100644
--- a/examples/gui/filegrid/filegrid.lpi
+++ b/examples/gui/filegrid/filegrid.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,10 +41,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="filegrid"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/fontselect/fontselect.lpi b/examples/gui/fontselect/fontselect.lpi
index 74eb6b4d..a23797f7 100644
--- a/examples/gui/fontselect/fontselect.lpi
+++ b/examples/gui/fontselect/fontselect.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,10 +41,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="fontselect"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/gauges/gaugetest.lpi b/examples/gui/gauges/gaugetest.lpi
index 731e6f4d..899f99cd 100644
--- a/examples/gui/gauges/gaugetest.lpi
+++ b/examples/gui/gauges/gaugetest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=".exe"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -38,16 +40,21 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="gaugetest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<AllowLabel Value="False"/>
<CPPInline Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/gridediting/gridediting.lpi b/examples/gui/gridediting/gridediting.lpi
index 13caff41..dba84086 100644
--- a/examples/gui/gridediting/gridediting.lpi
+++ b/examples/gui/gridediting/gridediting.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -16,6 +16,9 @@
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -46,12 +49,18 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="gridediting"/>
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/gridtest/gridtest.lpi b/examples/gui/gridtest/gridtest.lpi
index a905d222..a02b0697 100644
--- a/examples/gui/gridtest/gridtest.lpi
+++ b/examples/gui/gridtest/gridtest.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
diff --git a/examples/gui/gridtest/gridtest.lpr b/examples/gui/gridtest/gridtest.lpr
index 4c2c0e16..4b53f260 100644
--- a/examples/gui/gridtest/gridtest.lpr
+++ b/examples/gui/gridtest/gridtest.lpr
@@ -17,7 +17,8 @@ uses
fpg_checkbox,
fpg_tab,
fpg_edit,
- fpg_dialogs;
+ fpg_dialogs,
+ fpg_scrollbar;
type
@@ -227,6 +228,9 @@ begin
AddColumn('Column 1', 100, taLeftJustify);
AddColumn('Col 2', 50, taCenter);
AddColumn('Numbers', 150, taRightJustify);
+ AddColumn('Column 4', 150, taRightJustify);
+ AddColumn('Column 5', 150, taRightJustify);
+ AddColumn('Column 6', 150, taRightJustify);
FontDesc := '#Grid';
HeaderFontDesc := '#GridHeader';
Hint := '';
@@ -253,6 +257,14 @@ begin
OnDrawCell := @StringGridDrawCell;
OnDoubleClick := @StringGridDoubleClicked;
OnHeaderClick := @StringGridHeaderClicked;
+ // Testing various scrollbar styles
+// ScrollBarStyle:= ssNone;
+// ScrollBarStyle:= ssHorizontal;
+// ScrollBarStyle:= ssVertical;
+ ScrollBarStyle:= ssAutoBoth;
+// ScrollBarStyle:= ssHorizVisible;
+// ScrollBarStyle:= ssVertiVisible;
+// ScrollBarStyle:= ssBothVisible;
end;
chkShowHeader := TfpgCheckBox.Create(self);
diff --git a/examples/gui/hintwindow/hintwindowtest.lpi b/examples/gui/hintwindow/hintwindowtest.lpi
index eef2ca11..ecb49472 100644
--- a/examples/gui/hintwindow/hintwindowtest.lpi
+++ b/examples/gui/hintwindow/hintwindowtest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,12 +9,14 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<Title Value="hintwindowtest"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,9 +42,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="hintwindowtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/imgtest/bitmaptest.lpi b/examples/gui/imgtest/bitmaptest.lpi
index ec9a5f70..f10675d4 100644
--- a/examples/gui/imgtest/bitmaptest.lpi
+++ b/examples/gui/imgtest/bitmaptest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,12 +9,14 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<Title Value="bitmaptest"/>
</General>
<VersionInfo>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,14 +42,21 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="bitmaptest"/>
+ </Target>
<SearchPaths>
- <IncludeFiles Value="../source/"/>
- <OtherUnitFiles Value="../source/;../source/x11/;../gui/"/>
+ <IncludeFiles Value="../source"/>
+ <OtherUnitFiles Value="../source;../source/x11;../gui"/>
+ <UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/imgtest_jpeg/jpeg.lpi b/examples/gui/imgtest_jpeg/jpeg.lpi
index 6b0fc630..bd592bfe 100644
--- a/examples/gui/imgtest_jpeg/jpeg.lpi
+++ b/examples/gui/imgtest_jpeg/jpeg.lpi
@@ -1,25 +1,26 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
- <UseDefaultCompilerOptions Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<VersionInfo>
<Language Value=""/>
<CharSet Value=""/>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -50,15 +51,14 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="jpegtest"/>
+ </Target>
<SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="units"/>
</SearchPaths>
- <Parsing>
- <SyntaxOptions>
- <UseAnsiStrings Value="True"/>
- </SyntaxOptions>
- </Parsing>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
diff --git a/examples/gui/listbox/frm_main.pas b/examples/gui/listbox/frm_main.pas
index 1c858112..cacc604f 100644
--- a/examples/gui/listbox/frm_main.pas
+++ b/examples/gui/listbox/frm_main.pas
@@ -5,13 +5,15 @@ unit frm_main;
interface
uses
- SysUtils, Classes,
- fpg_base, fpg_main, fpg_edit,
- fpg_widget, fpg_form, fpg_label, fpg_button,
- fpg_listbox, fpg_memo, fpg_combobox, fpg_basegrid, fpg_grid,
- fpg_dialogs, fpg_checkbox, fpg_tree, fpg_trackbar,
- fpg_progressbar, fpg_radiobutton, fpg_tab, fpg_menu,
- fpg_panel, fpg_popupcalendar, fpg_gauge;
+ SysUtils,
+ Classes,
+ fpg_base,
+ fpg_main,
+ fpg_form,
+ fpg_button,
+ fpg_listbox,
+ fpg_memo,
+ fpg_checkbox;
type
diff --git a/examples/gui/listbox/listboxtest.lpi b/examples/gui/listbox/listboxtest.lpi
index e745c4da..17170ebf 100644
--- a/examples/gui/listbox/listboxtest.lpi
+++ b/examples/gui/listbox/listboxtest.lpi
@@ -1,19 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -45,9 +47,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="listboxtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/listviewtest/listviewtest.lpi b/examples/gui/listviewtest/listviewtest.lpi
index e8537f5b..50579565 100644
--- a/examples/gui/listviewtest/listviewtest.lpi
+++ b/examples/gui/listviewtest/listviewtest.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -41,7 +41,13 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="listviewtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
diff --git a/examples/gui/memo/memotest.lpi b/examples/gui/memo/memotest.lpi
index 0102fcfc..12046720 100644
--- a/examples/gui/memo/memotest.lpi
+++ b/examples/gui/memo/memotest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -40,10 +42,18 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="memotest"/>
+ </Target>
<SearchPaths>
<UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
diff --git a/examples/gui/menutest/menutest.lpi b/examples/gui/menutest/menutest.lpi
index c3120df3..579cbc7c 100644
--- a/examples/gui/menutest/menutest.lpi
+++ b/examples/gui/menutest/menutest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="8"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,7 +41,13 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="menutest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
@@ -47,7 +55,7 @@
</Parsing>
<Linking>
<Debugging>
- <GenerateDebugInfo Value="True"/>
+ <DebugInfoType Value="dsStabs"/>
</Debugging>
<Options>
<Win32>
@@ -56,8 +64,6 @@
</Options>
</Linking>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/modalforms/modalforms.lpi b/examples/gui/modalforms/modalforms.lpi
index 938d807b..2f25e23a 100644
--- a/examples/gui/modalforms/modalforms.lpi
+++ b/examples/gui/modalforms/modalforms.lpi
@@ -41,6 +41,12 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
+ <Target>
+ <Filename Value="modalformstests"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
@@ -48,6 +54,7 @@
</Parsing>
<Other>
<CustomOptions Value="-FUunits"/>
+ <CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>
diff --git a/examples/gui/mousecursor/cursordemo.lpi b/examples/gui/mousecursor/cursordemo.lpi
index 7aea18fa..d3e71ef7 100644
--- a/examples/gui/mousecursor/cursordemo.lpi
+++ b/examples/gui/mousecursor/cursordemo.lpi
@@ -1,23 +1,25 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
</Flags>
<SessionStorage Value="None"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<Title Value="cursordemo"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
<Language Value=""/>
<CharSet Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -44,15 +46,14 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="cursordemo"/>
+ </Target>
<SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="units"/>
</SearchPaths>
- <Parsing>
- <SyntaxOptions>
- <UseAnsiStrings Value="True"/>
- </SyntaxOptions>
- </Parsing>
<Linking>
<Options>
<Win32>
diff --git a/examples/gui/panel/panel_test.lpi b/examples/gui/panel/panel_test.lpi
index 89378ec4..dc519cb0 100644
--- a/examples/gui/panel/panel_test.lpi
+++ b/examples/gui/panel/panel_test.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -45,9 +46,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="panel_test"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/reporting/pdf_demo.lpi b/examples/gui/reporting/pdf_demo.lpi
index 57598cef..9af69bbd 100644
--- a/examples/gui/reporting/pdf_demo.lpi
+++ b/examples/gui/reporting/pdf_demo.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
diff --git a/examples/gui/scrollframe/bigframe_test.lpi b/examples/gui/scrollframe/bigframe_test.lpi
new file mode 100644
index 00000000..ee242841
--- /dev/null
+++ b/examples/gui/scrollframe/bigframe_test.lpi
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <ProjectOptions>
+ <Version Value="9"/>
+ <General>
+ <Flags>
+ <MainUnitHasCreateFormStatements Value="False"/>
+ <MainUnitHasTitleStatement Value="False"/>
+ </Flags>
+ <SessionStorage Value="InProjectDir"/>
+ <MainUnit Value="0"/>
+ <Title Value="bigframe_test"/>
+ <UseAppBundle Value="False"/>
+ <ResourceType Value="res"/>
+ </General>
+ <i18n>
+ <EnableI18N LFM="False"/>
+ </i18n>
+ <VersionInfo>
+ <StringTable ProductVersion=""/>
+ </VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="Default" Default="True"/>
+ </BuildModes>
+ <PublishOptions>
+ <Version Value="2"/>
+ <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
+ <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ <LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+ </local>
+ </RunParams>
+ <RequiredPackages Count="1">
+ <Item1>
+ <PackageName Value="fpgui_toolkit"/>
+ </Item1>
+ </RequiredPackages>
+ <Units Count="1">
+ <Unit0>
+ <Filename Value="bigframe_test.lpr"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="bigframe_test"/>
+ </Unit0>
+ </Units>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="bigframe_test"/>
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ <Other>
+ <CompilerMessages>
+ <MsgFileName Value=""/>
+ </CompilerMessages>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="3">
+ <Item1>
+ <Name Value="EAbort"/>
+ </Item1>
+ <Item2>
+ <Name Value="ECodetoolError"/>
+ </Item2>
+ <Item3>
+ <Name Value="EFOpenError"/>
+ </Item3>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/examples/gui/scrollframe/bigframe_test.lpr b/examples/gui/scrollframe/bigframe_test.lpr
new file mode 100644
index 00000000..5309e965
--- /dev/null
+++ b/examples/gui/scrollframe/bigframe_test.lpr
@@ -0,0 +1,114 @@
+program bigframe_test;
+
+{$mode objfpc}{$H+}
+
+uses
+ Classes,
+ sysutils,
+ fpg_base,
+ fpg_main,
+ fpg_button,
+ fpg_label,
+ fpg_form,
+ fpg_panel,
+ fpg_scrollframe
+ ;
+
+procedure create_buttons (f : TfpgFrame);
+var
+ i, j, ij : integer;
+ b : TfpgButton;
+const
+ num_button_cols = 4;
+ num_button_rows = 5;
+begin
+ with f do begin
+ for i := 0 to num_button_cols-1 do
+ begin
+ for j := 0 to num_button_rows-1 do
+ begin
+ if (j>4) and (j<16) then continue;
+ ij := j + num_button_rows*i;
+ b := TfpgButton.Create(f);
+ with b do begin
+ if (i=2) and (j=2)
+ then SetPosition(6000, 6000, 100, 25)
+ else SetPosition(20+i*105, 50+j*30, 100, 25);
+ name := 'button' + inttostr(ij);
+ Text := 'Button ' + inttostr(ij+1);
+ FontDesc := '#Label1';
+ end;
+ end;
+ end;
+ end;
+end;
+
+type
+
+ { t_sample_frame }
+
+ t_sample_frame = class (TfpgAutoSizingFrame)
+ protected
+ my_color : TfpgColor;
+ embed_button : TfpgButton;
+ procedure click_embed_button (Sender: TObject);
+ procedure paint_my_stuff (Sender: TObject);
+ public
+ procedure AfterCreate; override;
+ end;
+
+procedure t_sample_frame.click_embed_button(Sender: TObject);
+var
+ inner_bevel : TfpgBevel;
+ inner_frame : TfpgScrollFrame;
+begin
+ embed_button.Visible:=false;
+ inner_bevel := TfpgBevel.Create(self);
+ with inner_bevel do begin;
+ SetPosition(90, 210, 300, 300);
+ BorderStyle := bsDouble;
+ Shape := bsFrame;
+ UpdateWindowPosition;
+ end;
+ RecalcFrameSize;
+
+ inner_frame := TfpgScrollFrame.Create(inner_bevel, t_sample_frame);
+ inner_frame.Align:=alClient;
+end;
+
+procedure t_sample_frame.paint_my_stuff (Sender: TObject);
+begin
+ canvas.Color := my_color;
+ canvas.FillRectangle (30, 30, 200, 400);
+end;
+
+procedure t_sample_frame.AfterCreate;
+begin
+ inherited AfterCreate;
+ MarginBR:=7;
+ my_color:=TfpgColor(random(high(longint)));
+ embed_button := CreateButton (self, 20, 240, 270,
+ 'Click to embed another Scroll-Frame here', @click_embed_button);
+ OnPaint:=@paint_my_stuff;
+ create_buttons(self);
+end;
+
+
+var
+ form: TfpgForm;
+ outer_frame: TfpgScrollFrame;
+
+begin
+ fpgApplication.Initialize;
+ form := TfpgForm.Create(nil);
+ form.SetPosition(0,0,380,360);
+ outer_frame := TfpgScrollFrame.Create(form, t_sample_frame);
+ outer_frame.Align:=alClient;
+ try
+ form.Show;
+ fpgApplication.Run;
+ finally
+ form.Free;
+ end;
+end.
+
diff --git a/examples/gui/scrollframe/frame_test.lpi b/examples/gui/scrollframe/frame_test.lpi
new file mode 100644
index 00000000..ab3bd77f
--- /dev/null
+++ b/examples/gui/scrollframe/frame_test.lpi
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <ProjectOptions>
+ <Version Value="9"/>
+ <General>
+ <Flags>
+ <MainUnitHasCreateFormStatements Value="False"/>
+ <MainUnitHasTitleStatement Value="False"/>
+ </Flags>
+ <SessionStorage Value="InProjectDir"/>
+ <MainUnit Value="0"/>
+ <Title Value="frame_test"/>
+ <UseAppBundle Value="False"/>
+ <ResourceType Value="res"/>
+ </General>
+ <i18n>
+ <EnableI18N LFM="False"/>
+ </i18n>
+ <VersionInfo>
+ <StringTable ProductVersion=""/>
+ </VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="Default" Default="True"/>
+ </BuildModes>
+ <PublishOptions>
+ <Version Value="2"/>
+ <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
+ <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ <LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+ </local>
+ </RunParams>
+ <RequiredPackages Count="1">
+ <Item1>
+ <PackageName Value="fpgui_toolkit"/>
+ </Item1>
+ </RequiredPackages>
+ <Units Count="1">
+ <Unit0>
+ <Filename Value="frame_test.lpr"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="frame_test"/>
+ </Unit0>
+ </Units>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="frame_test"/>
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ <Other>
+ <CompilerMessages>
+ <MsgFileName Value=""/>
+ </CompilerMessages>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="3">
+ <Item1>
+ <Name Value="EAbort"/>
+ </Item1>
+ <Item2>
+ <Name Value="ECodetoolError"/>
+ </Item2>
+ <Item3>
+ <Name Value="EFOpenError"/>
+ </Item3>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/examples/gui/scrollframe/frame_test.lpr b/examples/gui/scrollframe/frame_test.lpr
new file mode 100644
index 00000000..252f8a07
--- /dev/null
+++ b/examples/gui/scrollframe/frame_test.lpr
@@ -0,0 +1,112 @@
+program frame_test;
+
+{$mode objfpc}{$H+}
+
+uses
+ Classes,
+ sysutils,
+ fpg_base,
+ fpg_main,
+ fpg_button,
+ fpg_label,
+ fpg_form,
+ fpg_panel,
+ fpg_scrollframe
+ ;
+
+procedure create_buttons (f : TfpgFrame);
+var
+ i, j, ij : integer;
+ b : TfpgButton;
+const
+ num_button_cols = 4;
+ num_button_rows = 5;
+begin
+ with f do begin
+ for i := 0 to num_button_cols-1 do
+ begin
+ for j := 0 to num_button_rows-1 do
+ begin
+ if (j>4) and (j<16) then continue;
+ ij := j + num_button_rows*i;
+ b := TfpgButton.Create(f);
+ with b do begin
+ SetPosition(20+i*105, 50+j*30, 100, 25);
+ name := 'button' + inttostr(ij);
+ Text := 'Button ' + inttostr(ij+1);
+ FontDesc := '#Label1';
+ end;
+ end;
+ end;
+ end;
+end;
+
+type
+
+ { t_sample_frame }
+
+ t_sample_frame = class (TfpgAutoSizingFrame)
+ protected
+ my_color : TfpgColor;
+ embed_button : TfpgButton;
+ procedure click_embed_button (Sender: TObject);
+ procedure paint_my_stuff (Sender: TObject);
+ public
+ procedure AfterCreate; override;
+ end;
+
+procedure t_sample_frame.click_embed_button(Sender: TObject);
+var
+ inner_bevel : TfpgBevel;
+ inner_frame : TfpgScrollFrame;
+begin
+ embed_button.Visible:=false;
+ inner_bevel := TfpgBevel.Create(self);
+ with inner_bevel do begin;
+ SetPosition(90, 210, 300, 300);
+ BorderStyle := bsDouble;
+ Shape := bsFrame;
+ UpdateWindowPosition;
+ end;
+ RecalcFrameSize;
+
+ inner_frame := TfpgScrollFrame.Create(inner_bevel, t_sample_frame);
+ inner_frame.Align:=alClient;
+end;
+
+procedure t_sample_frame.paint_my_stuff (Sender: TObject);
+begin
+ canvas.Color := my_color;
+ canvas.FillRectangle (30, 30, 200, 400);
+end;
+
+procedure t_sample_frame.AfterCreate;
+begin
+ inherited AfterCreate;
+ MarginBR:=7;
+ my_color:=TfpgColor(random(high(longint)));
+ embed_button := CreateButton (self, 20, 240, 270,
+ 'Click to embed another Scroll-Frame here', @click_embed_button);
+ OnPaint:=@paint_my_stuff;
+ create_buttons(self);
+end;
+
+
+var
+ form: TfpgForm;
+ outer_frame: TfpgScrollFrame;
+
+begin
+ fpgApplication.Initialize;
+ form := TfpgForm.Create(nil);
+ form.SetPosition(0,0,380,360);
+ outer_frame := TfpgScrollFrame.Create(form, t_sample_frame);
+ outer_frame.Align:=alClient;
+ try
+ form.Show;
+ fpgApplication.Run;
+ finally
+ form.Free;
+ end;
+end.
+
diff --git a/examples/gui/splashscreen/frm_main.pas b/examples/gui/splashscreen/frm_main.pas
index 7ecf663c..61155fae 100644
--- a/examples/gui/splashscreen/frm_main.pas
+++ b/examples/gui/splashscreen/frm_main.pas
@@ -49,7 +49,6 @@ type
implementation
uses
- fpg_command_intf,
commands;
{@VFD_NEWFORM_IMPL}
diff --git a/examples/gui/splashscreen/test.lpi b/examples/gui/splashscreen/test.lpi
index fa0ecd6b..bd28075e 100644
--- a/examples/gui/splashscreen/test.lpi
+++ b/examples/gui/splashscreen/test.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -54,9 +56,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="splashscreen"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/splitter/splitter_test.lpi b/examples/gui/splitter/splitter_test.lpi
index 431f5ffe..6f2b669f 100644
--- a/examples/gui/splitter/splitter_test.lpi
+++ b/examples/gui/splitter/splitter_test.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=".exe"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,7 +41,18 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="splitter_test"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Checks>
@@ -57,8 +69,6 @@
<LinkSmart Value="True"/>
</Linking>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/sprites/spritedemo.lpi b/examples/gui/sprites/spritedemo.lpi
index d5109e71..6b393910 100644
--- a/examples/gui/sprites/spritedemo.lpi
+++ b/examples/gui/sprites/spritedemo.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -41,9 +42,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="spritedemo"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/stdimages/stdimglist.lpi b/examples/gui/stdimages/stdimglist.lpi
index f519fc99..e9d1ba25 100644
--- a/examples/gui/stdimages/stdimglist.lpi
+++ b/examples/gui/stdimages/stdimglist.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -41,13 +41,18 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
+ <Target>
+ <Filename Value="stdimglist"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/tabtest/tabtest.lpi b/examples/gui/tabtest/tabtest.lpi
index b29eb7a0..a3e5d6f7 100644
--- a/examples/gui/tabtest/tabtest.lpi
+++ b/examples/gui/tabtest/tabtest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,10 +41,18 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="tabtest"/>
+ </Target>
<SearchPaths>
<UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Linking>
<Debugging>
<UseHeaptrc Value="True"/>
diff --git a/examples/gui/timertest/timertest.lpi b/examples/gui/timertest/timertest.lpi
index a27e074a..c9494ac4 100644
--- a/examples/gui/timertest/timertest.lpi
+++ b/examples/gui/timertest/timertest.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,10 +41,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="timertest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/togglebox/ToggleBoxTest.lpi b/examples/gui/togglebox/ToggleBoxTest.lpi
new file mode 100644
index 00000000..327b4258
--- /dev/null
+++ b/examples/gui/togglebox/ToggleBoxTest.lpi
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <ProjectOptions>
+ <Version Value="9"/>
+ <General>
+ <Flags>
+ <MainUnitHasCreateFormStatements Value="False"/>
+ <MainUnitHasTitleStatement Value="False"/>
+ </Flags>
+ <SessionStorage Value="InProjectDir"/>
+ <MainUnit Value="0"/>
+ <Title Value="ToggleBoxTest"/>
+ <UseAppBundle Value="False"/>
+ <ResourceType Value="res"/>
+ </General>
+ <i18n>
+ <EnableI18N LFM="False"/>
+ </i18n>
+ <VersionInfo>
+ <StringTable ProductVersion=""/>
+ </VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="Default" Default="True"/>
+ </BuildModes>
+ <PublishOptions>
+ <Version Value="2"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ <LaunchingApplication Use="True" PathPlusParams="/usr/bin/gnome-terminal -t 'Lazarus Run Output' -e '$(LazarusDir)/tools/runwait.sh $(TargetCmdLine)'"/>
+ </local>
+ </RunParams>
+ <RequiredPackages Count="1">
+ <Item1>
+ <PackageName Value="fpgui_toolkit"/>
+ </Item1>
+ </RequiredPackages>
+ <Units Count="2">
+ <Unit0>
+ <Filename Value="ToggleBoxTest.lpr"/>
+ <IsPartOfProject Value="True"/>
+ </Unit0>
+ <Unit1>
+ <Filename Value="mainfrm.pas"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="mainfrm"/>
+ </Unit1>
+ </Units>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="ToggleBoxTest"/>
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ <Other>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="3">
+ <Item1>
+ <Name Value="EAbort"/>
+ </Item1>
+ <Item2>
+ <Name Value="ECodetoolError"/>
+ </Item2>
+ <Item3>
+ <Name Value="EFOpenError"/>
+ </Item3>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/examples/gui/togglebox/ToggleBoxTest.lpr b/examples/gui/togglebox/ToggleBoxTest.lpr
new file mode 100644
index 00000000..8866f9c5
--- /dev/null
+++ b/examples/gui/togglebox/ToggleBoxTest.lpr
@@ -0,0 +1,30 @@
+program ToggleBoxTest;
+
+{$mode objfpc}{$H+}
+
+uses
+ {$IFDEF UNIX}
+ cthreads,
+ {$ENDIF}
+ Classes,
+ fpg_main,
+ mainfrm;
+
+procedure MainProc;
+var
+ frmMain: TfrmMain;
+begin
+ fpgApplication.Initialize;
+ frmMain:= TfrmMain.Create(nil);
+ try
+ frmMain.Show;
+ fpgApplication.Run;
+ finally
+ frmMain.Free;
+ end;
+end;
+
+begin
+ MainProc;
+end.
+
diff --git a/examples/gui/togglebox/mainfrm.pas b/examples/gui/togglebox/mainfrm.pas
new file mode 100644
index 00000000..ff9a43da
--- /dev/null
+++ b/examples/gui/togglebox/mainfrm.pas
@@ -0,0 +1,44 @@
+unit mainfrm;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, fpg_base, fpg_form, fpg_toggle;
+
+type
+
+ { TfrmMain }
+
+ TfrmMain = class(TfpgForm)
+ private
+ FToggle: TfpgToggle;
+ public
+ constructor Create(AOwner: TComponent); override;
+ end;
+
+
+implementation
+
+{ TfrmMain }
+
+constructor TfrmMain.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ WindowTitle:='Yay a toggle!';
+ SetWidth(300);
+ SetHeight(200);
+
+ FToggle := TfpgToggle.Create(Self);
+ FToggle.SetPosition(10, 10, 200, 20);
+// FToggle.Width:=200;
+
+ //FToggle.ToggleSide:=tsLeft;
+ //FToggle.ToggleWidth:=100;
+ //FToggle.UseAnimation:=False;
+
+end;
+
+end.
+
diff --git a/examples/gui/treeviewtest/treeviewtest.lpi b/examples/gui/treeviewtest/treeviewtest.lpi
index 6c19a1a9..8f925b0d 100644
--- a/examples/gui/treeviewtest/treeviewtest.lpi
+++ b/examples/gui/treeviewtest/treeviewtest.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -46,7 +46,13 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="treeviewtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<CStyleOperator Value="False"/>
@@ -57,7 +63,6 @@
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/video_vlc/frmvlcplayer.pas b/examples/gui/video_vlc/frmvlcplayer.pas
index 7b44c1e1..aeea3e0c 100644
--- a/examples/gui/video_vlc/frmvlcplayer.pas
+++ b/examples/gui/video_vlc/frmvlcplayer.pas
@@ -6,7 +6,7 @@ interface
uses
SysUtils, Classes, fpg_base, fpg_panel, fpg_button, fpg_main, fpg_form,
- fpg_editbtn, fpg_memo, fpg_label, libvlc, vlc, fpg_vlc;
+ fpg_editbtn, fpg_memo, fpg_label, vlc, fpg_vlc;
type
@@ -23,8 +23,8 @@ type
Button3: TfpgButton;
Button4: TfpgButton;
Memo1: TfpgMemo;
- procedure Sync;
{@VFD_HEAD_END: VLCPlayerDemo}
+ procedure Sync;
public
P : TFpgVLCPlayer;
FMsg: String;
diff --git a/examples/gui/video_vlc/testfpguivlc.lpi b/examples/gui/video_vlc/testfpguivlc.lpi
index fc6715f3..7839f71a 100644
--- a/examples/gui/video_vlc/testfpguivlc.lpi
+++ b/examples/gui/video_vlc/testfpguivlc.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -50,17 +50,17 @@
<UnitName Value="frmvlcplayer"/>
</Unit1>
<Unit2>
- <Filename Value="../fpg_vlc.pas"/>
+ <Filename Value="../../../src/3rdparty/libvlc/fpg_vlc.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="fpg_vlc"/>
</Unit2>
<Unit3>
- <Filename Value="../../libvlc/libvlc.pp"/>
+ <Filename Value="../../../src/3rdparty/libvlc/libvlc.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="libvlc"/>
</Unit3>
<Unit4>
- <Filename Value="../../libvlc/vlc.pas"/>
+ <Filename Value="../../../src/3rdparty/libvlc/vlc.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="vlc"/>
</Unit4>
@@ -74,7 +74,7 @@
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="../../../src/3rdparty/libvlc"/>
- <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
+ <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Other>
<CompilerMessages>
diff --git a/examples/gui/wulinetest/wuline_test.lpi b/examples/gui/wulinetest/wuline_test.lpi
index 7a54bb83..55fd3864 100644
--- a/examples/gui/wulinetest/wuline_test.lpi
+++ b/examples/gui/wulinetest/wuline_test.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,10 +41,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="wulinetest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>