summaryrefslogtreecommitdiff
path: root/examples/gui/customstyles
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gui/customstyles')
-rw-r--r--examples/gui/customstyles/customstyles.lpi11
-rw-r--r--examples/gui/customstyles/customstyles.lpr3
-rw-r--r--examples/gui/customstyles/extrafpc.cfg4
-rw-r--r--examples/gui/customstyles/frm_test.pas42
-rw-r--r--examples/gui/customstyles/mystyle.pas4
5 files changed, 52 insertions, 12 deletions
diff --git a/examples/gui/customstyles/customstyles.lpi b/examples/gui/customstyles/customstyles.lpi
index b2996aeb..36fef016 100644
--- a/examples/gui/customstyles/customstyles.lpi
+++ b/examples/gui/customstyles/customstyles.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -52,7 +52,13 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <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/customstyles.lpr b/examples/gui/customstyles/customstyles.lpr
index 419e6456..16b00ac8 100644
--- a/examples/gui/customstyles/customstyles.lpr
+++ b/examples/gui/customstyles/customstyles.lpr
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2011 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -25,7 +25,6 @@
quotes.
}
-
program customstyles;
{$mode objfpc}{$H+}
diff --git a/examples/gui/customstyles/extrafpc.cfg b/examples/gui/customstyles/extrafpc.cfg
index 775d592f..7c0fe0a0 100644
--- a/examples/gui/customstyles/extrafpc.cfg
+++ b/examples/gui/customstyles/extrafpc.cfg
@@ -3,3 +3,7 @@
-Xs
-XX
-CX
+#ifdef mswindows
+-WG
+#endif
+
diff --git a/examples/gui/customstyles/frm_test.pas b/examples/gui/customstyles/frm_test.pas
index 6eb30b35..1cefa10a 100644
--- a/examples/gui/customstyles/frm_test.pas
+++ b/examples/gui/customstyles/frm_test.pas
@@ -1,3 +1,20 @@
+{
+ fpGUI - Free Pascal GUI Toolkit
+
+ Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ distribution, for details of the copyright.
+
+ See the file COPYING.modifiedLGPL, included in this distribution,
+ for details about redistributing fpGUI.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ Description:
+ Demo form showing some widgets in different states, and how the themes
+ paint them.
+}
unit frm_test;
{$mode objfpc}{$H+}
@@ -5,8 +22,16 @@ unit frm_test;
interface
uses
- SysUtils, Classes, fpg_base, fpg_main, fpg_widget,
- fpg_form, fpg_edit, fpg_label, fpg_button, fpg_menu,
+ SysUtils,
+ Classes,
+ fpg_base,
+ fpg_main,
+ fpg_widget,
+ fpg_form,
+ fpg_edit,
+ fpg_label,
+ fpg_button,
+ fpg_menu,
fpg_memo;
type
@@ -33,6 +58,7 @@ type
Label1: TfpgLabel;
{@VFD_HEAD_END: TestForm}
procedure CloseClicked(Sender: TObject);
+ procedure HelpAboutClicked(Sender: TObject);
public
procedure AfterCreate; override;
end;
@@ -42,7 +68,8 @@ type
implementation
uses
- fpg_stylemanager;
+ fpg_stylemanager,
+ fpg_dialogs;
{@VFD_NEWFORM_IMPL}
@@ -51,6 +78,11 @@ begin
Close;
end;
+procedure TTestForm.HelpAboutClicked(Sender: TObject);
+begin
+ TfpgMessageDialog.AboutFPGui('');
+end;
+
procedure TTestForm.AfterCreate;
var
miSubMenu: TfpgMenuItem;
@@ -198,7 +230,7 @@ begin
AddMenuItem('-', '', nil);
AddMenuItem('Save && Reload', '', nil);
AddMenuItem('-', '', nil);
- AddMenuItem('&Quit', 'Ctrl+Q', nil);
+ AddMenuItem('&Quit', 'Ctrl+Q', @CloseClicked);
end;
pmEdit := TfpgPopupMenu.Create(self);
@@ -219,7 +251,7 @@ begin
begin
Name := 'pmHelp';
SetPosition(204, 196, 120, 24);
- AddMenuItem('About...', '', nil);
+ AddMenuItem('About...', '', @HelpAboutClicked);
end;
pmSubMenu1 := TfpgPopupMenu.Create(self);
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+}