summaryrefslogtreecommitdiff
path: root/extras/code_templates
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-27 12:57:16 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-27 12:57:16 +0000
commit316a16c5f3337ad23ecdfdd6444c0b72af3f2406 (patch)
treea4209a054dc20164758f01c619533b09ca120acc /extras/code_templates
parent4fd4e5cc02054005ce8a9aae976350aefc54a94e (diff)
downloadfpGUI-316a16c5f3337ad23ecdfdd6444c0b72af3f2406.tar.xz
* Implemented List Mediators with tiOPF support and added a demo.
* Added a quick workaround for the InvertCaret function causing a AV. * MenuBar now keeps the current menu focused even if you open more than 2 levels deep of Popup Menus. * Added some TODO entries to Widgets. Also published some missing properties. * Fixed repainting issue with TfpgComobBox when you set the Width from code and made the component focusable. Not sure why it wasn't! * Updated Lazarus IDE code template for new fpGUI applications.
Diffstat (limited to 'extras/code_templates')
-rw-r--r--extras/code_templates/lazarus.dci55
1 files changed, 22 insertions, 33 deletions
diff --git a/extras/code_templates/lazarus.dci b/extras/code_templates/lazarus.dci
index a21c6190..888b0b1e 100644
--- a/extras/code_templates/lazarus.dci
+++ b/extras/code_templates/lazarus.dci
@@ -1,50 +1,39 @@
[fpguiapp | fpGUI template application]
uses
- fpGFX, fpGUI;
+ {$IFDEF UNIX}{$IFDEF UseCThreads}
+ cthreads,
+ {$ENDIF}{$ENDIF}
+ Classes, fpgfx, gui_form;
type
- TMainForm = class(TForm)
- private
- FMainLayout: TBoxLayout;
- lblTemplate: TLabel;
+ TMainForm = class(TfpgForm)
public
- procedure AfterConstruction; override;
+ constructor Create(AOwner: TComponent); override;
end;
-
{ TMainForm }
-procedure TMainForm.AfterConstruction;
+constructor TMainForm.Create(AOwner: TComponent);
begin
- inherited AfterConstruction;
- Name := 'MainForm';
- BorderWidth := 8;
- Text := 'fpGUI Template Application';
-
- FMainLayout := TBoxLayout.Create(self);
- FMainLayout.Spacing := 8;
- FMainLayout.Orientation := Vertical;
- FMainLayout.VertAlign := vertFill;
- InsertChild(FMainLayout);
-
- lblTemplate := TLabel.Create('MainForm', self);
- FMainLayout.InsertChild(lblTemplate);
-
- // Create other components here
-
+ inherited Create(AOwner);
+ WindowTitle := 'My Title';
+ WindowPosition := wpUser;
+ SetPosition(100, 100, 300, 200);
end;
+procedure MainProc;
var
- MainForm: TMainForm;
+ frm: TMainForm;
begin
- GFApplication.Initialize;
- MainForm := TMainForm.Create(GFApplication);
- try
- MainForm.Show;
- GFApplication.Run;
- finally
- MainForm.Free;
- end;
+ fpgApplication.Initialize;
+ frm := TMainForm.Create(nil);
+ frm.Show;
+ fpgApplication.Run;
+end;
+
+begin
+ MainProc;
end.
+