diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-11-29 12:57:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-29 12:57:08 +0100 |
| commit | 349b818d3fd4f568160537616857b9ff7d68d3aa (patch) | |
| tree | aa4deb3b74345abf0dd6584bd9e3139c5812e43d /fluid/panels/function_panel.cxx | |
| parent | 725be0116f1d4dbcd64a99b555572341f2d29eda (diff) | |
Fluid: convert modal panels into tabs in the widget panel (#1339)
Diffstat (limited to 'fluid/panels/function_panel.cxx')
| -rw-r--r-- | fluid/panels/function_panel.cxx | 738 |
1 files changed, 0 insertions, 738 deletions
diff --git a/fluid/panels/function_panel.cxx b/fluid/panels/function_panel.cxx index 3703cb157..4fea9aa1e 100644 --- a/fluid/panels/function_panel.cxx +++ b/fluid/panels/function_panel.cxx @@ -25,744 +25,6 @@ #include "widgets/Bin_Button.h" #include "widgets/Node_Browser.h" -/** - Allow widget navigation on text fields with Tab. -*/ -static int use_tab_navigation(int, Fl_Text_Editor*) { - return 0; -} - -Fl_Double_Window *function_panel=(Fl_Double_Window *)0; - -Fl_Choice *f_public_member_choice=(Fl_Choice *)0; - -Fl_Menu_Item menu_f_public_member_choice[] = { - {"private", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"public", 0, 0, (void*)(1), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"protected", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {0,0,0,0,0,0,0,0,0} -}; - -Fl_Choice *f_public_choice=(Fl_Choice *)0; - -Fl_Menu_Item menu_f_public_choice[] = { - {"static", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"global", 0, 0, (void*)(1), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"local", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {0,0,0,0,0,0,0,0,0} -}; - -Fl_Light_Button *f_c_button=(Fl_Light_Button *)0; - -Fl_Input *f_name_input=(Fl_Input *)0; - -Fl_Input *f_return_type_input=(Fl_Input *)0; - -Fl_Text_Editor *f_comment_input=(Fl_Text_Editor *)0; - -Fl_Return_Button *f_panel_ok=(Fl_Return_Button *)0; - -Fl_Button *f_panel_cancel=(Fl_Button *)0; - -Fl_Double_Window* make_function_panel() { - { function_panel = new Fl_Double_Window(343, 232, "Function/Method Properties"); - function_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE)); - { Fl_Group* o = new Fl_Group(10, 10, 270, 20); - { f_public_member_choice = new Fl_Choice(10, 10, 75, 20); - f_public_member_choice->tooltip("Change member access attribute."); - f_public_member_choice->down_box(FL_BORDER_BOX); - f_public_member_choice->labelsize(11); - f_public_member_choice->textsize(11); - f_public_member_choice->when(FL_WHEN_CHANGED); - f_public_member_choice->menu(menu_f_public_member_choice); - } // Fl_Choice* f_public_member_choice - { f_public_choice = new Fl_Choice(10, 10, 75, 20); - f_public_choice->tooltip("Change widget accessibility."); - f_public_choice->down_box(FL_BORDER_BOX); - f_public_choice->labelsize(11); - f_public_choice->textsize(11); - f_public_choice->when(FL_WHEN_CHANGED); - f_public_choice->menu(menu_f_public_choice); - } // Fl_Choice* f_public_choice - { f_c_button = new Fl_Light_Button(95, 10, 120, 20, "C declaration"); - f_c_button->tooltip("Declare with a C interface instead of C++."); - f_c_button->labelsize(11); - } // Fl_Light_Button* f_c_button - { Fl_Box* o = new Fl_Box(235, 10, 45, 20); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - { f_name_input = new Fl_Input(10, 50, 320, 20, "Name(args): (blank for main())"); - f_name_input->tooltip("The name of the function or method."); - f_name_input->labelfont(1); - f_name_input->labelsize(11); - f_name_input->textfont(4); - f_name_input->textsize(11); - f_name_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - f_name_input->when(FL_WHEN_NEVER); - } // Fl_Input* f_name_input - { f_return_type_input = new Fl_Input(10, 90, 320, 20, "Return Type: (blank to return outermost widget)"); - f_return_type_input->tooltip("The return type of the function or method."); - f_return_type_input->labelfont(1); - f_return_type_input->labelsize(11); - f_return_type_input->textfont(4); - f_return_type_input->textsize(11); - f_return_type_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - f_return_type_input->when(FL_WHEN_NEVER); - } // Fl_Input* f_return_type_input - { f_comment_input = new Fl_Text_Editor(10, 125, 320, 65, "Comment:"); - f_comment_input->tooltip("Function comment in Doxygen format"); - f_comment_input->box(FL_DOWN_BOX); - f_comment_input->labelfont(1); - f_comment_input->labelsize(11); - f_comment_input->textfont(4); - f_comment_input->textsize(11); - f_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - Fl_Group::current()->resizable(f_comment_input); - f_comment_input->buffer(new Fl_Text_Buffer()); - f_comment_input->add_key_binding(FL_Tab, 0, use_tab_navigation); - } // Fl_Text_Editor* f_comment_input - { Fl_Group* o = new Fl_Group(10, 200, 320, 20); - { f_panel_ok = new Fl_Return_Button(220, 200, 50, 20, "OK"); - f_panel_ok->tooltip("Apply the changes."); - f_panel_ok->labelsize(11); - f_panel_ok->window()->hotspot(f_panel_ok); - } // Fl_Return_Button* f_panel_ok - { f_panel_cancel = new Fl_Button(280, 200, 50, 20, "Cancel"); - f_panel_cancel->tooltip("Cancel the changes."); - f_panel_cancel->labelsize(11); - } // Fl_Button* f_panel_cancel - { Fl_Box* o = new Fl_Box(10, 200, 205, 20); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - function_panel->set_modal(); - function_panel->end(); - } // Fl_Double_Window* function_panel - return function_panel; -} - -Fl_Double_Window *code_panel=(Fl_Double_Window *)0; - -static void cb_code_panel(Fl_Double_Window*, void*) { - if (Fl::event()==FL_SHORTCUT && Fl::event_key()==FL_Escape) - return; // ignore Escape - code_panel->hide(); // otherwise hide..; -} - -fld::widget::Code_Editor *code_input=(fld::widget::Code_Editor *)0; - -Fl_Return_Button *code_panel_ok=(Fl_Return_Button *)0; - -Fl_Button *code_panel_cancel=(Fl_Button *)0; - -Fl_Double_Window* make_code_panel() { - { Fl_Double_Window* o = code_panel = new Fl_Double_Window(540, 180, "Code Properties"); - code_panel->labelsize(11); - code_panel->callback((Fl_Callback*)cb_code_panel); - { fld::widget::Code_Editor* o = code_input = new fld::widget::Code_Editor(10, 10, 520, 130); - code_input->box(FL_DOWN_BOX); - code_input->color(FL_BACKGROUND2_COLOR); - code_input->selection_color(FL_SELECTION_COLOR); - code_input->labeltype(FL_NORMAL_LABEL); - code_input->labelfont(0); - code_input->labelsize(11); - code_input->labelcolor(FL_FOREGROUND_COLOR); - code_input->textfont(4); - code_input->textsize(11); - code_input->align(Fl_Align(FL_ALIGN_TOP)); - code_input->when(FL_WHEN_RELEASE); - Fl_Group::current()->resizable(code_input); - o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE); - } // fld::widget::Code_Editor* code_input - { Fl_Group* o = new Fl_Group(10, 150, 520, 20); - o->labelsize(11); - { code_panel_ok = new Fl_Return_Button(400, 150, 60, 20, "OK"); - code_panel_ok->labelsize(11); - code_panel_ok->window()->hotspot(code_panel_ok); - } // Fl_Return_Button* code_panel_ok - { code_panel_cancel = new Fl_Button(470, 150, 60, 20, "Cancel"); - code_panel_cancel->labelsize(11); - } // Fl_Button* code_panel_cancel - { Fl_Box* o = new Fl_Box(10, 150, 380, 20); - o->labelsize(11); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - code_panel->set_modal(); - o->size_range(200, 150); - code_panel->end(); - } // Fl_Double_Window* code_panel - // Enable line numbers - code_input->linenumber_width(60); - code_input->linenumber_size(code_input->Fl_Text_Display::textsize()); - return code_panel; -} - -Fl_Double_Window *codeblock_panel=(Fl_Double_Window *)0; - -Fl_Input *code_before_input=(Fl_Input *)0; - -Fl_Input *code_after_input=(Fl_Input *)0; - -Fl_Return_Button *codeblock_panel_ok=(Fl_Return_Button *)0; - -Fl_Button *codeblock_panel_cancel=(Fl_Button *)0; - -Fl_Double_Window* make_codeblock_panel() { - { Fl_Double_Window* o = codeblock_panel = new Fl_Double_Window(300, 115, "Code Block Properties"); - codeblock_panel->labelsize(11); - { code_before_input = new Fl_Input(10, 15, 280, 20, "Conditional code block"); - code_before_input->tooltip("#ifdef or similar conditional code block."); - code_before_input->labelsize(11); - code_before_input->textfont(4); - code_before_input->textsize(11); - code_before_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - code_before_input->when(FL_WHEN_NEVER); - } // Fl_Input* code_before_input - { code_after_input = new Fl_Input(10, 55, 280, 20, "\"{...child code...}\" is inserted here"); - code_after_input->tooltip("#endif or similar conditional code block."); - code_after_input->labelsize(11); - code_after_input->textfont(4); - code_after_input->textsize(11); - code_after_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - code_after_input->when(FL_WHEN_NEVER); - Fl_Group::current()->resizable(code_after_input); - } // Fl_Input* code_after_input - { Fl_Group* o = new Fl_Group(10, 85, 280, 20); - { codeblock_panel_ok = new Fl_Return_Button(160, 85, 60, 20, "OK"); - codeblock_panel_ok->labelsize(11); - codeblock_panel_ok->window()->hotspot(codeblock_panel_ok); - } // Fl_Return_Button* codeblock_panel_ok - { codeblock_panel_cancel = new Fl_Button(230, 85, 60, 20, "Cancel"); - codeblock_panel_cancel->shortcut(0xff1b); - codeblock_panel_cancel->labelsize(11); - } // Fl_Button* codeblock_panel_cancel - { Fl_Box* o = new Fl_Box(10, 85, 140, 20); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - codeblock_panel->set_modal(); - o->size_range(o->w(), o->h(), Fl::w(), o->h()); - codeblock_panel->end(); - } // Fl_Double_Window* codeblock_panel - return codeblock_panel; -} - -Fl_Double_Window *declblock_panel=(Fl_Double_Window *)0; - -Fl_Input *declblock_before_input=(Fl_Input *)0; - -Fl_Input *declblock_after_input=(Fl_Input *)0; - -Fl_Check_Button *declblock_code_source=(Fl_Check_Button *)0; - -Fl_Check_Button *declblock_static_source=(Fl_Check_Button *)0; - -Fl_Check_Button *declblock_code_header=(Fl_Check_Button *)0; - -Fl_Check_Button *declblock_static_header=(Fl_Check_Button *)0; - -Fl_Text_Editor *declblock_comment_input=(Fl_Text_Editor *)0; - -Fl_Return_Button *declblock_panel_ok=(Fl_Return_Button *)0; - -Fl_Button *declblock_panel_cancel=(Fl_Button *)0; - -Fl_Double_Window* make_declblock_panel() { - { Fl_Double_Window* o = declblock_panel = new Fl_Double_Window(300, 355, "Declaration Block Properties"); - declblock_panel->labelsize(11); - declblock_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE)); - { declblock_before_input = new Fl_Input(10, 23, 280, 20, "Start Code:"); - declblock_before_input->tooltip("#ifdef or similar conditional declaration block."); - declblock_before_input->labelfont(1); - declblock_before_input->labelsize(11); - declblock_before_input->textfont(4); - declblock_before_input->textsize(11); - declblock_before_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - declblock_before_input->when(FL_WHEN_NEVER); - } // Fl_Input* declblock_before_input - { Fl_Box* o = new Fl_Box(10, 48, 280, 20, "\"\\n...child code...\\n\" is inserted here"); - o->labelsize(11); - } // Fl_Box* o - { declblock_after_input = new Fl_Input(10, 80, 280, 20, "End Code:"); - declblock_after_input->tooltip("#endif or similar declaration code block."); - declblock_after_input->labelfont(1); - declblock_after_input->labelsize(11); - declblock_after_input->textfont(4); - declblock_after_input->textsize(11); - declblock_after_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - declblock_after_input->when(FL_WHEN_NEVER); - } // Fl_Input* declblock_after_input - { Fl_Group* o = new Fl_Group(10, 105, 280, 120); - { Fl_Box* o = new Fl_Box(10, 105, 270, 20, "Enclose code generated by children in source file:"); - o->labelsize(11); - o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE)); - } // Fl_Box* o - { declblock_code_source = new Fl_Check_Button(20, 125, 260, 20, "implementations"); - declblock_code_source->down_box(FL_DOWN_BOX); - declblock_code_source->labelsize(11); - } // Fl_Check_Button* declblock_code_source - { declblock_static_source = new Fl_Check_Button(20, 145, 260, 20, "static initializations and callbacks"); - declblock_static_source->down_box(FL_DOWN_BOX); - declblock_static_source->labelsize(11); - } // Fl_Check_Button* declblock_static_source - { Fl_Box* o = new Fl_Box(10, 165, 270, 20, "Enclose code in header file:"); - o->labelsize(11); - o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE)); - } // Fl_Box* o - { declblock_code_header = new Fl_Check_Button(20, 185, 260, 20, "forward declarations"); - declblock_code_header->down_box(FL_DOWN_BOX); - declblock_code_header->labelsize(11); - } // Fl_Check_Button* declblock_code_header - { declblock_static_header = new Fl_Check_Button(20, 205, 260, 20, "preprecessor and callback declarations"); - declblock_static_header->down_box(FL_DOWN_BOX); - declblock_static_header->labelsize(11); - } // Fl_Check_Button* declblock_static_header - { Fl_Box* o = new Fl_Box(280, 105, 10, 120); - o->labelsize(11); - o->hide(); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - { declblock_comment_input = new Fl_Text_Editor(10, 242, 280, 65, "Comment:"); - declblock_comment_input->tooltip("Declaration comment in Doxygen format"); - declblock_comment_input->box(FL_DOWN_BOX); - declblock_comment_input->labelfont(1); - declblock_comment_input->labelsize(11); - declblock_comment_input->textfont(4); - declblock_comment_input->textsize(11); - declblock_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - Fl_Group::current()->resizable(declblock_comment_input); - declblock_comment_input->buffer(new Fl_Text_Buffer()); - declblock_comment_input->add_key_binding(FL_Tab, 0, use_tab_navigation); - } // Fl_Text_Editor* declblock_comment_input - { Fl_Group* o = new Fl_Group(10, 321, 280, 20); - { declblock_panel_ok = new Fl_Return_Button(160, 321, 60, 20, "OK"); - declblock_panel_ok->labelsize(11); - declblock_panel_ok->window()->hotspot(declblock_panel_ok); - } // Fl_Return_Button* declblock_panel_ok - { declblock_panel_cancel = new Fl_Button(230, 321, 60, 20, "Cancel"); - declblock_panel_cancel->shortcut(0xff1b); - declblock_panel_cancel->labelsize(11); - } // Fl_Button* declblock_panel_cancel - { Fl_Box* o = new Fl_Box(10, 321, 140, 20); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - declblock_panel->set_modal(); - declblock_panel->size_range(300, 355); - o->size_range(o->w(), o->h(), Fl::w(), o->h()); - declblock_panel->end(); - } // Fl_Double_Window* declblock_panel - return declblock_panel; -} - -Fl_Double_Window *decl_panel=(Fl_Double_Window *)0; - -Fl_Choice *decl_choice=(Fl_Choice *)0; - -Fl_Menu_Item menu_decl_choice[] = { - {"in source file only", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"in header file only", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"\"static\" in source file", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"in source and \"extern\" in header", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {0,0,0,0,0,0,0,0,0} -}; - -Fl_Choice *decl_class_choice=(Fl_Choice *)0; - -Fl_Menu_Item menu_decl_class_choice[] = { - {"private", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"public", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"protected", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {0,0,0,0,0,0,0,0,0} -}; - -fld::widget::Code_Editor *decl_input=(fld::widget::Code_Editor *)0; - -Fl_Text_Editor *decl_comment_input=(Fl_Text_Editor *)0; - -Fl_Return_Button *decl_panel_ok=(Fl_Return_Button *)0; - -Fl_Button *decl_panel_cancel=(Fl_Button *)0; - -Fl_Double_Window* make_decl_panel() { - { decl_panel = new Fl_Double_Window(343, 262, "Declaration Properties"); - decl_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE)); - { Fl_Group* o = new Fl_Group(10, 10, 270, 20); - { Fl_Box* o = new Fl_Box(200, 10, 80, 20); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - { decl_choice = new Fl_Choice(10, 10, 185, 20); - decl_choice->down_box(FL_BORDER_BOX); - decl_choice->labelsize(11); - decl_choice->textsize(11); - decl_choice->menu(menu_decl_choice); - } // Fl_Choice* decl_choice - { decl_class_choice = new Fl_Choice(10, 10, 75, 20); - decl_class_choice->down_box(FL_BORDER_BOX); - decl_class_choice->labelsize(11); - decl_class_choice->textsize(11); - decl_class_choice->menu(menu_decl_class_choice); - } // Fl_Choice* decl_class_choice - o->end(); - } // Fl_Group* o - { Fl_Tile* o = new Fl_Tile(10, 40, 320, 180); - { Fl_Group* o = new Fl_Group(10, 40, 320, 100); - o->box(FL_FLAT_BOX); - { decl_input = new fld::widget::Code_Editor(10, 40, 320, 45, "This can be any declaration, like \"int x;\", an external symbol like \"exter" -"n int foo();\", a #directive like \"#include <foo.h>\", a comment like \"//foo" -"\" or \"/*foo*/\", or typedef like \"typedef char byte;\" or \"using std::list" -";\"."); - decl_input->box(FL_DOWN_FRAME); - decl_input->color(FL_BACKGROUND2_COLOR); - decl_input->selection_color(FL_SELECTION_COLOR); - decl_input->labeltype(FL_NORMAL_LABEL); - decl_input->labelfont(0); - decl_input->labelsize(11); - decl_input->labelcolor(FL_FOREGROUND_COLOR); - decl_input->align(Fl_Align(134)); - decl_input->when(FL_WHEN_RELEASE); - Fl_Group::current()->resizable(decl_input); - } // fld::widget::Code_Editor* decl_input - { Fl_Box* o = new Fl_Box(20, 139, 300, 1); - o->box(FL_BORDER_FRAME); - o->color((Fl_Color)43); - } // Fl_Box* o - o->end(); - Fl_Group::current()->resizable(o); - } // Fl_Group* o - { Fl_Group* o = new Fl_Group(10, 140, 320, 80); - o->box(FL_FLAT_BOX); - { decl_comment_input = new Fl_Text_Editor(10, 155, 320, 64, "Comment:"); - decl_comment_input->tooltip("Declaration comment in Doxygen format"); - decl_comment_input->box(FL_DOWN_BOX); - decl_comment_input->labelfont(1); - decl_comment_input->labelsize(11); - decl_comment_input->textfont(4); - decl_comment_input->textsize(11); - decl_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - Fl_Group::current()->resizable(decl_comment_input); - decl_comment_input->buffer(new Fl_Text_Buffer()); - decl_comment_input->add_key_binding(FL_Tab, 0, use_tab_navigation); - } // Fl_Text_Editor* decl_comment_input - o->end(); - } // Fl_Group* o - o->size_range(0, 320, 100); - o->size_range(1, 320, 60); - o->end(); - Fl_Group::current()->resizable(o); - } // Fl_Tile* o - { Fl_Group* o = new Fl_Group(10, 230, 320, 20); - { decl_panel_ok = new Fl_Return_Button(200, 230, 60, 20, "OK"); - decl_panel_ok->labelsize(11); - decl_panel_ok->window()->hotspot(decl_panel_ok); - } // Fl_Return_Button* decl_panel_ok - { decl_panel_cancel = new Fl_Button(270, 230, 60, 20, "Cancel"); - decl_panel_cancel->shortcut(0xff1b); - decl_panel_cancel->labelsize(11); - } // Fl_Button* decl_panel_cancel - { Fl_Box* o = new Fl_Box(10, 230, 185, 20); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - decl_panel->size_range(343, 262); - decl_panel->end(); - } // Fl_Double_Window* decl_panel - return decl_panel; -} - -Fl_Double_Window *data_panel=(Fl_Double_Window *)0; - -Fl_Choice *data_choice=(Fl_Choice *)0; - -Fl_Menu_Item menu_data_choice[] = { - {"in source file only", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"in header file only", 0, 0, 0, 16, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"\"static\" in source file", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"in source and \"extern\" in header", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {0,0,0,0,0,0,0,0,0} -}; - -Fl_Choice *data_class_choice=(Fl_Choice *)0; - -Fl_Menu_Item menu_data_class_choice[] = { - {"private", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"public", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"protected", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {0,0,0,0,0,0,0,0,0} -}; - -Fl_Choice *data_mode=(Fl_Choice *)0; - -Fl_Menu_Item menu_data_mode[] = { - {"binary mode", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"text mode", 0, 0, (void*)(1), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"compressed binary", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {0,0,0,0,0,0,0,0,0} -}; - -Fl_Input *data_input=(Fl_Input *)0; - -Fl_Input *data_filename=(Fl_Input *)0; - -Fl_Button *data_filebrowser=(Fl_Button *)0; - -Fl_Text_Editor *data_comment_input=(Fl_Text_Editor *)0; - -Fl_Return_Button *data_panel_ok=(Fl_Return_Button *)0; - -Fl_Button *data_panel_cancel=(Fl_Button *)0; - -Fl_Double_Window* make_data_panel() { - { data_panel = new Fl_Double_Window(343, 264, "Inline Data Properties"); - data_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE)); - { Fl_Group* o = new Fl_Group(10, 10, 320, 48); - { Fl_Box* o = new Fl_Box(288, 10, 42, 20); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - { data_choice = new Fl_Choice(10, 10, 185, 20); - data_choice->down_box(FL_BORDER_BOX); - data_choice->labelsize(11); - data_choice->textsize(11); - data_choice->menu(menu_data_choice); - } // Fl_Choice* data_choice - { data_class_choice = new Fl_Choice(10, 10, 75, 20); - data_class_choice->down_box(FL_BORDER_BOX); - data_class_choice->labelsize(11); - data_class_choice->textsize(11); - data_class_choice->menu(menu_data_class_choice); - } // Fl_Choice* data_class_choice - { data_mode = new Fl_Choice(10, 38, 185, 20); - data_mode->tooltip("text mode generates a \"const char*\" and a trailing NUL, compressed mode use" -"s zlib to generate a binary block"); - data_mode->down_box(FL_BORDER_BOX); - data_mode->labelsize(11); - data_mode->textsize(11); - data_mode->menu(menu_data_mode); - } // Fl_Choice* data_mode - o->end(); - } // Fl_Group* o - { data_input = new Fl_Input(10, 78, 320, 20, "Variable Name:"); - data_input->tooltip("Inline Data variables are declared \"const unsigned char []\" in binary mode " -"and \"const char*\" in text mode."); - data_input->labelfont(1); - data_input->labelsize(11); - data_input->textfont(4); - data_input->textsize(11); - data_input->align(Fl_Align(133)); - data_input->when(FL_WHEN_NEVER); - } // Fl_Input* data_input - { data_filename = new Fl_Input(10, 116, 280, 20, "Filename:"); - data_filename->tooltip("Name and path of file that will be inlined."); - data_filename->labelfont(1); - data_filename->labelsize(11); - data_filename->textfont(4); - data_filename->textsize(11); - data_filename->align(Fl_Align(133)); - data_filename->when(FL_WHEN_NEVER); - } // Fl_Input* data_filename - { data_filebrowser = new Fl_Button(290, 116, 40, 20, "@fileopen"); - data_filebrowser->labelcolor((Fl_Color)134); - } // Fl_Button* data_filebrowser - { data_comment_input = new Fl_Text_Editor(10, 156, 320, 65, "Comment:"); - data_comment_input->tooltip("Declaration comment in Doxygen format"); - data_comment_input->box(FL_DOWN_BOX); - data_comment_input->labelfont(1); - data_comment_input->labelsize(11); - data_comment_input->textfont(4); - data_comment_input->textsize(11); - data_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - Fl_Group::current()->resizable(data_comment_input); - data_comment_input->buffer(new Fl_Text_Buffer()); - data_comment_input->add_key_binding(FL_Tab, 0, use_tab_navigation); - } // Fl_Text_Editor* data_comment_input - { Fl_Group* o = new Fl_Group(10, 231, 320, 20); - { data_panel_ok = new Fl_Return_Button(200, 231, 60, 20, "OK"); - data_panel_ok->labelsize(11); - data_panel_ok->window()->hotspot(data_panel_ok); - } // Fl_Return_Button* data_panel_ok - { data_panel_cancel = new Fl_Button(270, 231, 60, 20, "Cancel"); - data_panel_cancel->shortcut(0xff1b); - data_panel_cancel->labelsize(11); - } // Fl_Button* data_panel_cancel - { Fl_Box* o = new Fl_Box(10, 231, 185, 20); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - data_panel->size_range(343, 237); - data_panel->end(); - } // Fl_Double_Window* data_panel - return data_panel; -} - -Fl_Double_Window *class_panel=(Fl_Double_Window *)0; - -Fl_Light_Button *c_public_button=(Fl_Light_Button *)0; - -Fl_Input *c_name_input=(Fl_Input *)0; - -Fl_Input *c_subclass_input=(Fl_Input *)0; - -Fl_Text_Editor *c_comment_input=(Fl_Text_Editor *)0; - -Fl_Return_Button *c_panel_ok=(Fl_Return_Button *)0; - -Fl_Button *c_panel_cancel=(Fl_Button *)0; - -Fl_Double_Window* make_class_panel() { - { class_panel = new Fl_Double_Window(342, 196, "Class Properties"); - class_panel->labelsize(11); - { Fl_Group* o = new Fl_Group(10, 10, 280, 20); - o->hide(); - { c_public_button = new Fl_Light_Button(10, 10, 60, 20, "public"); - c_public_button->tooltip("Make the class publicly accessible."); - c_public_button->labelsize(11); - c_public_button->when(FL_WHEN_NEVER); - c_public_button->hide(); - } // Fl_Light_Button* c_public_button - { Fl_Box* o = new Fl_Box(80, 10, 210, 20); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - { c_name_input = new Fl_Input(10, 20, 320, 20, "Name:"); - c_name_input->tooltip("Name of class."); - c_name_input->labelfont(1); - c_name_input->labelsize(11); - c_name_input->textfont(4); - c_name_input->textsize(11); - c_name_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - c_name_input->when(FL_WHEN_NEVER); - } // Fl_Input* c_name_input - { c_subclass_input = new Fl_Input(10, 55, 320, 20, "Subclass of (text between : and {)"); - c_subclass_input->tooltip("Name of subclass."); - c_subclass_input->labelfont(1); - c_subclass_input->labelsize(11); - c_subclass_input->textfont(4); - c_subclass_input->textsize(11); - c_subclass_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - c_subclass_input->when(FL_WHEN_NEVER); - } // Fl_Input* c_subclass_input - { c_comment_input = new Fl_Text_Editor(10, 90, 320, 65, "Comment:"); - c_comment_input->tooltip("Class comment in Doxygen format"); - c_comment_input->box(FL_DOWN_BOX); - c_comment_input->labelfont(1); - c_comment_input->labelsize(11); - c_comment_input->textfont(4); - c_comment_input->textsize(11); - c_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - Fl_Group::current()->resizable(c_comment_input); - c_comment_input->buffer(new Fl_Text_Buffer()); - c_comment_input->add_key_binding(FL_Tab, 0, use_tab_navigation); - } // Fl_Text_Editor* c_comment_input - { Fl_Group* o = new Fl_Group(10, 165, 320, 20); - { c_panel_ok = new Fl_Return_Button(200, 165, 60, 20, "OK"); - c_panel_ok->labelsize(11); - c_panel_ok->window()->hotspot(c_panel_ok); - } // Fl_Return_Button* c_panel_ok - { c_panel_cancel = new Fl_Button(270, 165, 60, 20, "Cancel"); - c_panel_cancel->shortcut(0xff1b); - c_panel_cancel->labelsize(11); - } // Fl_Button* c_panel_cancel - { Fl_Box* o = new Fl_Box(10, 165, 185, 20); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - class_panel->set_modal(); - class_panel->size_range(343, 188); - class_panel->end(); - } // Fl_Double_Window* class_panel - return class_panel; -} - -Fl_Double_Window *comment_panel=(Fl_Double_Window *)0; - -Fl_Text_Editor *comment_input=(Fl_Text_Editor *)0; - -Fl_Return_Button *comment_panel_ok=(Fl_Return_Button *)0; - -Fl_Button *comment_panel_cancel=(Fl_Button *)0; - -Fl_Light_Button *comment_in_source=(Fl_Light_Button *)0; - -Fl_Light_Button *comment_in_header=(Fl_Light_Button *)0; - -Fl_Menu_Button *comment_predefined=(Fl_Menu_Button *)0; - -Fl_Button *comment_load=(Fl_Button *)0; - -Fl_Double_Window* make_comment_panel() { - { Fl_Double_Window* o = comment_panel = new Fl_Double_Window(550, 280, "Comment Properties"); - comment_panel->labelsize(11); - { Fl_Text_Editor* o = comment_input = new Fl_Text_Editor(110, 10, 430, 230); - comment_input->box(FL_DOWN_BOX); - comment_input->labelsize(11); - comment_input->textfont(4); - comment_input->textsize(11); - comment_input->textcolor((Fl_Color)58); - Fl_Group::current()->resizable(comment_input); - o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE); - o->buffer(new Fl_Text_Buffer()); - } // Fl_Text_Editor* comment_input - { Fl_Group* o = new Fl_Group(110, 250, 430, 20); - o->labelsize(11); - { comment_panel_ok = new Fl_Return_Button(370, 250, 80, 20, "OK"); - comment_panel_ok->labelsize(11); - comment_panel_ok->window()->hotspot(comment_panel_ok); - } // Fl_Return_Button* comment_panel_ok - { comment_panel_cancel = new Fl_Button(460, 250, 80, 20, "Cancel"); - comment_panel_cancel->shortcut(0xff1b); - comment_panel_cancel->labelsize(11); - } // Fl_Button* comment_panel_cancel - { Fl_Box* o = new Fl_Box(110, 250, 250, 20); - o->labelsize(11); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - { Fl_Group* o = new Fl_Group(10, 10, 90, 243); - o->labelsize(11); - { comment_in_source = new Fl_Light_Button(10, 10, 90, 20, "In Source"); - comment_in_source->tooltip("Put the comment into the source (.cxx) file."); - comment_in_source->labelsize(11); - comment_in_source->when(FL_WHEN_NEVER); - } // Fl_Light_Button* comment_in_source - { comment_in_header = new Fl_Light_Button(10, 40, 90, 20, "In Header"); - comment_in_header->tooltip("Put the comment into the header (.h) file."); - comment_in_header->labelsize(11); - comment_in_header->when(FL_WHEN_NEVER); - } // Fl_Light_Button* comment_in_header - { comment_predefined = new Fl_Menu_Button(10, 70, 90, 20, "Predefined"); - comment_predefined->labelsize(11); - comment_predefined->textsize(11); - } // Fl_Menu_Button* comment_predefined - { comment_load = new Fl_Button(10, 100, 90, 20, "Import..."); - comment_load->labelsize(11); - } // Fl_Button* comment_load - { Fl_Box* o = new Fl_Box(10, 132, 90, 121); - o->labelsize(11); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - o->end(); - } // Fl_Group* o - comment_panel->set_modal(); - o->size_range(320, 180); - comment_panel->end(); - } // Fl_Double_Window* comment_panel - return comment_panel; -} - void type_make_cb(Fl_Widget*,void*d) { const char *type_name = (const char*)d; if (Fluid.proj.tree.current && Fluid.proj.tree.current->can_have_children()) |
