From 5d8cef173d81fc0bd88977385b56feb4ec4625ff Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 29 Apr 2013 12:19:52 +0100 Subject: Adds various useful MSEide code templates --- extras/mseide_templates/fpdoc_element.mct | 16 ++++++ extras/mseide_templates/fpdoc_link.mct | 8 +++ extras/mseide_templates/fpdoc_module.mct | 23 ++++++++ extras/mseide_templates/fpdoc_ps.mct | 8 +++ extras/mseide_templates/fpdoc_sa.mct | 15 +++++ extras/mseide_templates/fpgui_app.mct | 53 ++++++++++++++++++ extras/mseide_templates/fpgui_app0.mct | 37 ++++++++++++ .../mseide_templates/fpgui_app_with_designer.mct | 65 ++++++++++++++++++++++ extras/mseide_templates/fpgui_license_header.mct | 26 +++++++++ extras/mseide_templates/general_todo.mct | 8 +++ extras/mseide_templates/general_unitcomment.mct | 25 +++++++++ extras/mseide_templates/tiopf_log_enter.mct | 13 +++++ extras/mseide_templates/tiopf_log_exit.mct | 13 +++++ 13 files changed, 310 insertions(+) create mode 100644 extras/mseide_templates/fpdoc_element.mct create mode 100644 extras/mseide_templates/fpdoc_link.mct create mode 100644 extras/mseide_templates/fpdoc_module.mct create mode 100644 extras/mseide_templates/fpdoc_ps.mct create mode 100644 extras/mseide_templates/fpdoc_sa.mct create mode 100644 extras/mseide_templates/fpgui_app.mct create mode 100644 extras/mseide_templates/fpgui_app0.mct create mode 100644 extras/mseide_templates/fpgui_app_with_designer.mct create mode 100644 extras/mseide_templates/fpgui_license_header.mct create mode 100644 extras/mseide_templates/general_todo.mct create mode 100644 extras/mseide_templates/general_unitcomment.mct create mode 100644 extras/mseide_templates/tiopf_log_enter.mct create mode 100644 extras/mseide_templates/tiopf_log_exit.mct (limited to 'extras/mseide_templates') diff --git a/extras/mseide_templates/fpdoc_element.mct b/extras/mseide_templates/fpdoc_element.mct new file mode 100644 index 00000000..07ac1678 --- /dev/null +++ b/extras/mseide_templates/fpdoc_element.mct @@ -0,0 +1,16 @@ +[header] +name=docelem +comment=Documentation Element +select=0 +indent=0 +cursorcol=15 +cursorrow=0 +params=1 + name +paramdefaults=1 + +[] + + + + \ No newline at end of file diff --git a/extras/mseide_templates/fpdoc_link.mct b/extras/mseide_templates/fpdoc_link.mct new file mode 100644 index 00000000..78d1b80a --- /dev/null +++ b/extras/mseide_templates/fpdoc_link.mct @@ -0,0 +1,8 @@ +[header] +name=doclink +comment=Documentation Link tag +noselect=1 +cursorrow=0 +cursorcol=10 +[] + \ No newline at end of file diff --git a/extras/mseide_templates/fpdoc_module.mct b/extras/mseide_templates/fpdoc_module.mct new file mode 100644 index 00000000..786ab4ed --- /dev/null +++ b/extras/mseide_templates/fpdoc_module.mct @@ -0,0 +1,23 @@ +[header] +name=docmod +comment=Documentation Module (new XML file) +noselect=1 +cursorrow=5 +cursorcol=7 +params=2 + pkgname + modname +[] + + + + + + + + + + + + + diff --git a/extras/mseide_templates/fpdoc_ps.mct b/extras/mseide_templates/fpdoc_ps.mct new file mode 100644 index 00000000..aeeaf6ab --- /dev/null +++ b/extras/mseide_templates/fpdoc_ps.mct @@ -0,0 +1,8 @@ +[header] +name=docps +comment=Documentation PrintShort tag +noselect=1 +cursorrow=0 +cursorcol=16 +[] +. \ No newline at end of file diff --git a/extras/mseide_templates/fpdoc_sa.mct b/extras/mseide_templates/fpdoc_sa.mct new file mode 100644 index 00000000..60414c76 --- /dev/null +++ b/extras/mseide_templates/fpdoc_sa.mct @@ -0,0 +1,15 @@ +[header] +name=docsa +comment=Documentation SeeAlso tag +select=0 +indent=0 +cursorcol=22 +cursorrow=1 +params=1 + linkid +paramdefaults=1 + +[] + + + \ No newline at end of file diff --git a/extras/mseide_templates/fpgui_app.mct b/extras/mseide_templates/fpgui_app.mct new file mode 100644 index 00000000..413adb7d --- /dev/null +++ b/extras/mseide_templates/fpgui_app.mct @@ -0,0 +1,53 @@ +[header] +name=fpguiapp1 +comment=fpGUI template application (with form) +select=0 +indent=0 +cursorcol=0 +cursorrow=0 +params=0 +paramdefaults=0 +[] +{$mode objfpc}{$h+} +{$ifdef mswindows}{$apptype gui}{$endif} + +uses + {$IFDEF UNIX}{$IFDEF UseCThreads} + cthreads, + {$ENDIF}{$ENDIF} + Classes, fpg_main, fpg_form; + +type + TMainForm = class(TfpgForm) + public + constructor Create(AOwner: TComponent); override; + end; + +{ TMainForm } + +constructor TMainForm.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + WindowTitle := 'My Title'; + WindowPosition := wpUser; + SetPosition(100, 100, 300, 200); +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. diff --git a/extras/mseide_templates/fpgui_app0.mct b/extras/mseide_templates/fpgui_app0.mct new file mode 100644 index 00000000..542cd09d --- /dev/null +++ b/extras/mseide_templates/fpgui_app0.mct @@ -0,0 +1,37 @@ +[header] +name=fpguiapp +comment=fpGUI template application (no forms) +select=0 +indent=0 +cursorcol=0 +cursorrow=0 +params=0 +paramdefaults=0 +[] +{$mode objfpc}{$h+} +{$ifdef mswindows}{$apptype gui}{$endif} + +uses + {$IFDEF UNIX}{$IFDEF UseCThreads} + cthreads, + {$ENDIF}{$ENDIF} + Classes, fpg_main, frm_main; + + +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. diff --git a/extras/mseide_templates/fpgui_app_with_designer.mct b/extras/mseide_templates/fpgui_app_with_designer.mct new file mode 100644 index 00000000..68665213 --- /dev/null +++ b/extras/mseide_templates/fpgui_app_with_designer.mct @@ -0,0 +1,65 @@ +[header] +name=fpguiapp2 +comment=fpGUI with UI Designer template application +select=0 +indent=0 +cursorcol=0 +cursorrow=0 +params=0 +paramdefaults=0 +[] +{$mode objfpc}{$h+} +{$ifdef mswindows}{$apptype gui}{$endif} + +uses + {$IFDEF UNIX}{$IFDEF UseCThreads} + cthreads, + {$ENDIF}{$ENDIF} + Classes, fpg_main, fpg_form; + +type + + TMainForm = class(TfpgForm) + private + {@VFD_HEAD_BEGIN: MainForm} + {@VFD_HEAD_END: MainForm} + public + procedure AfterCreate; override; + end; + +{@VFD_NEWFORM_DECL} + + + +{@VFD_NEWFORM_IMPL} + +procedure TMainForm.AfterCreate; +begin + {%region 'Auto-generated GUI code' -fold} + {@VFD_BODY_BEGIN: MainForm} + Name := 'MainForm'; + SetPosition(316, 186, 300, 250); + WindowTitle := 'MainForm'; + + {@VFD_BODY_END: MainForm} + {%endregion} +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. diff --git a/extras/mseide_templates/fpgui_license_header.mct b/extras/mseide_templates/fpgui_license_header.mct new file mode 100644 index 00000000..93a5bbdb --- /dev/null +++ b/extras/mseide_templates/fpgui_license_header.mct @@ -0,0 +1,26 @@ +[header] +name=fpguihdr +comment=fpGUI unit header +select=0 +indent=0 +cursorcol=6 +cursorrow=14 +params=0 +paramdefaults=0 +[] +{ + 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: + +} \ No newline at end of file diff --git a/extras/mseide_templates/general_todo.mct b/extras/mseide_templates/general_todo.mct new file mode 100644 index 00000000..4278bbe5 --- /dev/null +++ b/extras/mseide_templates/general_todo.mct @@ -0,0 +1,8 @@ +[header] +name=todo +comment=Add a todo comment item +noselect=1 +cursorrow=0 +cursorcol=9 +[] +{ TODO : } \ No newline at end of file diff --git a/extras/mseide_templates/general_unitcomment.mct b/extras/mseide_templates/general_unitcomment.mct new file mode 100644 index 00000000..d86a43d6 --- /dev/null +++ b/extras/mseide_templates/general_unitcomment.mct @@ -0,0 +1,25 @@ +[header] +name=cu +comment=Unit header comment +select=0 +indent=0 +cursorcol=6 +cursorrow=11 +params=1 + project +paramdefaults=1 + fpGUI +[] +{ + This file is part of the ${project} project. + + See the file license.txt, included in this distribution, + for details about redistributing ${project}. + + 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: + . +} \ No newline at end of file diff --git a/extras/mseide_templates/tiopf_log_enter.mct b/extras/mseide_templates/tiopf_log_enter.mct new file mode 100644 index 00000000..fe27d895 --- /dev/null +++ b/extras/mseide_templates/tiopf_log_enter.mct @@ -0,0 +1,13 @@ +[header] +name=logenter +comment=tiOPF Log call +select=0 +indent=0 +cursorcol=33 +cursorrow=0 +params=1 + procedure +paramdefaults=1 + * +[] +Log('>> '+Classname+'.${procedure} - ' + Name, lsDebug); \ No newline at end of file diff --git a/extras/mseide_templates/tiopf_log_exit.mct b/extras/mseide_templates/tiopf_log_exit.mct new file mode 100644 index 00000000..2e284dd4 --- /dev/null +++ b/extras/mseide_templates/tiopf_log_exit.mct @@ -0,0 +1,13 @@ +[header] +name=logexit +comment=tiOPF Log: method exit +select=0 +indent=0 +cursorcol=33 +cursorrow=0 +params=1 + procedure +paramdefaults=1 + * +[] +Log('<< '+Classname+'.${procedure} - ' + Name, lsDebug); \ No newline at end of file -- cgit v1.2.3-70-g09d2