Hi Soroki,
Check out this post. I believe Gamers For Sale (GFS) has been working on somthing very similar...
http://forum.thegamecreators.com/?m=forum_view&t=86737&b=10
You may want to check with GFS to see how it's progressing in case you end up reinventing the wheel.
Also, in DBC th IDE Dark Edit has the ability to insert functions or blocks of code. Here's an excerpt from the help file:
CODE TEMPLATES
While editing your programs, you can press Ctrl-J to pop up the
code template list. This will provide you with common programming
structures - if you click on one, the code will automatically be
inserted for you. For example, you can click on the IF-ELSE-ENDIF
code template, and the editor will type:
IF
ELSE
ENDIF
...and the editor will place the cursor right next to the IF for
you. You will never forget that ENDIF again!
There are many standard code templates, and you can define your own
as well. To define your own, go into the directory where
DarkEDIT.EXE is located. Create a new folder/subdirectory called
TEMPLATES. Within this directory, you can store any DBA source
code file, and the editor will list it as a user defined template.
The editor uses the filename as the template name, so don't be
afraid to use a good, descriptive filename.
You can use code templates if you find yourself typing certain
things over and over again. For example, if you always use a couple
of REM statements to begin your files with credits and comments,
you can make a template for that.
I created a template that I called "Boolean Constants.dba", and in
that file, I put the following code:
True=(1=1)
False=(1=0)
I include that a lot when I program, so I can use True and False in
my IF statements. I can now add that in my code with just a few
keystrokes, and I can be sure that it will not be mis-typed.
When you create your own code templates, you can tell the Code
Template function where you want to place the cursor by typing
a "|" (pipe character.) For example, IF-ENDIF would be:
IF |
ENDIF
... and the cursor appears right after the IF.
CREDITS
DarkEDIT was written in Borland Delphi 4 (www.inprise.com), and it
would not be possible without the Dream Memo component (www.dream-ocm.com).
This component allowed DarkEDIT to appear so quickly. It was
programmed entirely by Guy Savoie (guy@nmisoftware.com). The
features are a result of the responses from a great group of beta
testers from the DarkBASIC forum. Thank you all for your hard work!
KNOWN ISSUES
* The portion of the software that makes the lists of functions
expects functions to start in the first column. If it starts after
another command and a colon, it will not be listed. This would be a
pretty unusual way to program, so it should not be a problem. The
label portion expects label lines to end with the colon. (no rem
statements afterward)
For those that use DarkEDIT, it might be very useful If you created a template folder and inside it put a series of functions or blocks of code. It could be zipped up and then to install it, one could just copy the folder to the proper directory.
Enjoy your day.