diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-05-12 09:37:45 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-05-12 09:37:45 +0000 |
commit | 5326f86cb30e44402361191d67be6922c90b7b61 (patch) | |
tree | 061dc1c66f71f29d4d22fc61fe994bfbb39b726e | |
parent | 969fb0eb15a4f30cdd50f0cd2f9d824556c93bf6 (diff) | |
download | fpGUI-5326f86cb30e44402361191d67be6922c90b7b61.tar.xz |
* Updated Lazarus code templates for fpGUI based applications.
-rw-r--r-- | extras/code_templates/lazarus.dci | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/extras/code_templates/lazarus.dci b/extras/code_templates/lazarus.dci index d3dd368c..169fe8ac 100644 --- a/extras/code_templates/lazarus.dci +++ b/extras/code_templates/lazarus.dci @@ -40,9 +40,60 @@ begin MainProc; end. +[fpguiapp2 | fpGUI with UI Designer template application] +uses + {$IFDEF UNIX}{$IFDEF UseCThreads} + cthreads, + {$ENDIF}{$ENDIF} + Classes, fpgfx, gui_form; + +type + + TMainForm = class(TfpgForm) + public + {@VFD_HEAD_BEGIN: MainForm} + {@VFD_HEAD_END: MainForm} + procedure AfterCreate; override; + end; + +{@VFD_NEWFORM_DECL} + + + +{@VFD_NEWFORM_IMPL} + +procedure TMainForm.AfterCreate; +begin + {@VFD_BODY_BEGIN: MainForm} + Name := 'MainForm'; + SetPosition(316, 186, 300, 250); + WindowTitle := 'MainForm'; + + {@VFD_BODY_END: MainForm} +end; + + +procedure MainProc; +var + frm: TMainForm; +begin + fpgApplication.Initialize; + frm := TMainForm.Create(nil); + try + frm.Show; + fpgApplication.Run; + finally + frm.Free; + end; +end; + +begin + MainProc; +end. + [fpguihdr | fpGUI unit header] { - fpGUI - Free Pascal GUI Library + fpGUI - Free Pascal GUI Toolkit Copyright (C) 2006 - 2008 See the file AUTHORS.txt, included in this distribution, for details of the copyright. @@ -58,3 +109,4 @@ end. |. } + |