From 5326f86cb30e44402361191d67be6922c90b7b61 Mon Sep 17 00:00:00 2001 From: graemeg Date: Mon, 12 May 2008 09:37:45 +0000 Subject: * Updated Lazarus code templates for fpGUI based applications. --- extras/code_templates/lazarus.dci | 54 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) 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 @@ -22,6 +22,57 @@ begin 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. + +[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; @@ -42,7 +93,7 @@ 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. |. } + -- cgit v1.2.3-70-g09d2