diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2005-03-09 21:26:53 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2005-03-09 21:26:53 +0000 |
| commit | fc1a4cf809de316d356672a834b7f2f797032d98 (patch) | |
| tree | 7702d3ae290313a22261baf06892ac148aaa1243 /fluid/Fl_Type.cxx | |
| parent | 2bbee87dc306d6beeb8f0a0a4bd3b6092eb6eee5 (diff) | |
Added a new Type to fluid called 'Comment' to be used for standardized Copyright notices and other comments throughout the source code.
- simply add the 'Comment' type from the 'New' menu or the Widget Bin
- comments in the very first position will be added at the very beginning of the source file or header. Comments at the end are at the very end in source and headers as well.
- if the users enters simple text, FLUID will add '// ' in front of every line. If a line already starts with '//' or a block starts with '/*', the text will be copied verbatim.
- text can be loaded from files
- text can be stored in a database and quickly retrieved later via a pulldown menu. The pulldown menu is customizable.
Enjoy!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4092 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Type.cxx')
| -rw-r--r-- | fluid/Fl_Type.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fluid/Fl_Type.cxx b/fluid/Fl_Type.cxx index f6bda685e..1817374ba 100644 --- a/fluid/Fl_Type.cxx +++ b/fluid/Fl_Type.cxx @@ -60,6 +60,7 @@ static Fl_Pixmap lock_pixmap(lock_xpm); #include "pixmaps/flFunction.xpm" #include "pixmaps/flCode.xpm" #include "pixmaps/flCodeBlock.xpm" +#include "pixmaps/flComment.xpm" #include "pixmaps/flDeclaration.xpm" #include "pixmaps/flDeclarationBlock.xpm" #include "pixmaps/flClass.xpm" @@ -106,6 +107,7 @@ static Fl_Pixmap group_pixmap(flGroup_xpm); static Fl_Pixmap function_pixmap(flFunction_xpm); static Fl_Pixmap code_pixmap(flCode_xpm); static Fl_Pixmap codeblock_pixmap(flCodeBlock_xpm); +static Fl_Pixmap comment_pixmap(flComment_xpm); static Fl_Pixmap declaration_pixmap(flDeclaration_xpm); static Fl_Pixmap declarationblock_pixmap(flDeclarationBlock_xpm); static Fl_Pixmap class_pixmap(flClass_xpm); @@ -151,7 +153,7 @@ Fl_Pixmap *pixmap[] = { 0, &window_pixmap, &button_pixmap, &checkbutton_pixmap, &output_pixmap, &textdisplay_pixmap, &textedit_pixmap, &fileinput_pixmap, &browser_pixmap, /* 27..32 */ &checkbrowser_pixmap, &filebrowser_pixmap, &clock_pixmap, &help_pixmap, &progress_pixmap, /* 33..36 */ &slider_pixmap, &scrollbar_pixmap, &valueslider_pixmap, &adjuster_pixmap, &counter_pixmap, /* 37..41 */ - &dial_pixmap, &roller_pixmap, &valueinput_pixmap, &valueoutput_pixmap, /* 42..45*/ }; + &dial_pixmap, &roller_pixmap, &valueinput_pixmap, &valueoutput_pixmap, &comment_pixmap /* 42..46*/ }; //////////////////////////////////////////////////////////////// @@ -565,7 +567,8 @@ int storestring(const char *n, const char * & p, int nostrip) { } void Fl_Type::name(const char *n) { - if (storestring(n,name_)) { + int nostrip = is_comment(); + if (storestring(n,name_,nostrip)) { if (visible) widget_browser->redraw(); } } @@ -615,6 +618,7 @@ int Fl_Type::is_group() const {return 0;} int Fl_Type::is_window() const {return 0;} int Fl_Type::is_code_block() const {return 0;} int Fl_Type::is_decl_block() const {return 0;} +int Fl_Type::is_comment() const {return 0;} int Fl_Type::is_class() const {return 0;} int Fl_Type::is_public() const {return 1;} |
