diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-04-29 12:19:52 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-04-29 12:38:55 +0100 |
commit | 5d8cef173d81fc0bd88977385b56feb4ec4625ff (patch) | |
tree | 8d250a5841514904d4503744547ad542be9aea44 /extras/mseide_templates | |
parent | b9112094c1d9e319890f902f19f55764cb3f0c49 (diff) | |
download | fpGUI-5d8cef173d81fc0bd88977385b56feb4ec4625ff.tar.xz |
Adds various useful MSEide code templates
Diffstat (limited to 'extras/mseide_templates')
-rw-r--r-- | extras/mseide_templates/fpdoc_element.mct | 16 | ||||
-rw-r--r-- | extras/mseide_templates/fpdoc_link.mct | 8 | ||||
-rw-r--r-- | extras/mseide_templates/fpdoc_module.mct | 23 | ||||
-rw-r--r-- | extras/mseide_templates/fpdoc_ps.mct | 8 | ||||
-rw-r--r-- | extras/mseide_templates/fpdoc_sa.mct | 15 | ||||
-rw-r--r-- | extras/mseide_templates/fpgui_app.mct | 53 | ||||
-rw-r--r-- | extras/mseide_templates/fpgui_app0.mct | 37 | ||||
-rw-r--r-- | extras/mseide_templates/fpgui_app_with_designer.mct | 65 | ||||
-rw-r--r-- | extras/mseide_templates/fpgui_license_header.mct | 26 | ||||
-rw-r--r-- | extras/mseide_templates/general_todo.mct | 8 | ||||
-rw-r--r-- | extras/mseide_templates/general_unitcomment.mct | 25 | ||||
-rw-r--r-- | extras/mseide_templates/tiopf_log_enter.mct | 13 | ||||
-rw-r--r-- | extras/mseide_templates/tiopf_log_exit.mct | 13 |
13 files changed, 310 insertions, 0 deletions
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 + +[] +<element name="${name}"> +<short></short> +<descr></descr> +</element>
\ 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 +[] +<link id=""></link>
\ 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 +[] +<?xml version="1.0" encoding="UTF-8"?> +<fpdoc-descriptions> +<package name="${pkgname}"> + +<module name="${modname}"> +<short></short> +<descr> +</descr> + +</module> + +</package> +</fpdoc-descriptions> 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 +[] +<printshort id=""/>.
\ 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 + +[] +<seealso> +<link id="${linkid}"></link> +</seealso>
\ 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 |