From d93b991e5c8c5322839def653c042f27aff3d500 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 12 Oct 2023 00:09:29 +0200 Subject: [PATCH] FLUID: Settings dialog is now resizable --- fluid/alignment_panel.cxx | 447 ++++++++++++++++++++------------ fluid/alignment_panel.fl | 529 ++++++++++++++++++++++---------------- 2 files changed, 582 insertions(+), 394 deletions(-) diff --git a/fluid/alignment_panel.cxx b/fluid/alignment_panel.cxx index fdb4acd9c..513238320 100644 --- a/fluid/alignment_panel.cxx +++ b/fluid/alignment_panel.cxx @@ -195,6 +195,10 @@ static Fl_Image *image_general_64() { return image; } +static void cb_(Fl_Group* o, void* v) { + propagate_load(o, v); +} + Fl_Scheme_Choice *scheme_choice=(Fl_Scheme_Choice *)0; Fl_Check_Button *tooltips_button=(Fl_Check_Button *)0; @@ -230,6 +234,10 @@ static void cb_show_comments_button(Fl_Check_Button*, void*) { redraw_browser(); } +static void cb_1(Fl_Group* o, void* v) { + propagate_load(o, v); +} + Fl_Spinner *recent_spinner=(Fl_Spinner *)0; static void cb_recent_spinner(Fl_Spinner*, void*) { @@ -445,7 +453,7 @@ Fl_Menu_Item menu_layout_choice[] = { {0,0,0,0,0,0,0,0,0} }; -static void cb_(Fl_Button*, void* v) { +static void cb_2(Fl_Button*, void* v) { // Clone the current layout suite if (v == LOAD) return; @@ -703,7 +711,7 @@ static void cb_Gap(Fl_Value_Input* o, void* v) { } } -static void cb_1(Fl_Value_Input* o, void* v) { +static void cb_3(Fl_Value_Input* o, void* v) { if (v == LOAD) { o->value((double)layout->widget_min_h); } else { @@ -711,7 +719,7 @@ static void cb_1(Fl_Value_Input* o, void* v) { } } -static void cb_2(Fl_Value_Input* o, void* v) { +static void cb_4(Fl_Value_Input* o, void* v) { if (v == LOAD) { o->value((double)layout->widget_inc_h); } else { @@ -719,7 +727,7 @@ static void cb_2(Fl_Value_Input* o, void* v) { } } -static void cb_3(Fl_Value_Input* o, void* v) { +static void cb_5(Fl_Value_Input* o, void* v) { if (v == LOAD) { o->value((double)layout->widget_gap_y); } else { @@ -727,7 +735,7 @@ static void cb_3(Fl_Value_Input* o, void* v) { } } -static void cb_4(Fl_Choice* o, void* v) { +static void cb_6(Fl_Choice* o, void* v) { if (v == LOAD) { o->value(layout->labelfont+1); } else { @@ -735,7 +743,7 @@ static void cb_4(Fl_Choice* o, void* v) { } } -static void cb_5(Fl_Value_Input* o, void* v) { +static void cb_7(Fl_Value_Input* o, void* v) { if (v == LOAD) { o->value(layout->labelsize); } else { @@ -743,7 +751,7 @@ static void cb_5(Fl_Value_Input* o, void* v) { } } -static void cb_6(Fl_Choice* o, void* v) { +static void cb_8(Fl_Choice* o, void* v) { if (v == LOAD) { o->value(layout->textfont+1); } else { @@ -751,7 +759,7 @@ static void cb_6(Fl_Choice* o, void* v) { } } -static void cb_7(Fl_Value_Input* o, void* v) { +static void cb_9(Fl_Value_Input* o, void* v) { if (v == LOAD) { o->value(layout->textsize); } else { @@ -761,10 +769,6 @@ static void cb_7(Fl_Value_Input* o, void* v) { Fl_Group *w_settings_shell_tab=(Fl_Group *)0; -static void cb_w_settings_shell_tab(Fl_Group* o, void* v) { - propagate_load(o, v); -} - static const unsigned char idata_shell_64[] = {137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,96,0,0,0,64,8,4,0,0,0, 79,61,186,133,0,0,2,233,73,68,65,84,104,222,237,154,207,107,19,65,20,199,63, @@ -847,7 +851,7 @@ static void cb_w_settings_shell_toolbox(Fl_Group* o, void* v) { } } -static void cb_8(Fl_Button*, void* v) { +static void cb_a(Fl_Button*, void* v) { if (v != LOAD) { int selected = w_settings_shell_list_selected; Fd_Shell_Command *cmd = new Fd_Shell_Command("new shell command"); @@ -937,7 +941,7 @@ static void cb_Export(Fl_Menu_*, void* v) { Fl_Menu_Item menu_w_settings_shell_menu[] = { {"Import...", 0, (Fl_Callback*)cb_Import, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"Export selected...", 0, (Fl_Callback*)cb_Export, 0, 128, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, + {"Export selected...", 0, (Fl_Callback*)cb_Export, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, {"Example Scripts:", 0, 0, 0, 17, (uchar)FL_NORMAL_LABEL, 1, 10, 0}, {"Compile with fltk-config", 0, 0, 0, 16, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, {"Build and run", 0, 0, 0, 16, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, @@ -1013,6 +1017,10 @@ static void cb_Menu(Fl_Input* o, void* v) { } } +static void cb_b(Fl_Group* o, void* v) { + propagate_load(o, v); +} + static void cb_Shortcut(Fl_Shortcut_Button* o, void* v) { int selected = w_settings_shell_list_selected; if (v == LOAD) { @@ -2081,6 +2089,10 @@ static void cb_i18n_pos_file_input(Fl_Input* o, void* v) { } } +static void cb_c(Fl_Group* o, void* v) { + propagate_load(o, v); +} + Fl_Int_Input *i18n_pos_set_input=(Fl_Int_Input *)0; static void cb_i18n_pos_set_input(Fl_Int_Input* o, void* v) { @@ -2111,20 +2123,28 @@ Fl_Double_Window* make_settings_window() { { Fl_Group* o = new Fl_Group(10, 60, 320, 480, "General"); o->image( image_general_64() ); o->labelsize(11); - { scheme_choice = new Fl_Scheme_Choice(120, 78, 120, 25, "Scheme: "); - scheme_choice->box(FL_UP_BOX); - scheme_choice->down_box(FL_BORDER_BOX); - scheme_choice->color(FL_BACKGROUND_COLOR); - scheme_choice->selection_color(FL_SELECTION_COLOR); - scheme_choice->labeltype(FL_NORMAL_LABEL); - scheme_choice->labelfont(1); - scheme_choice->labelsize(11); - scheme_choice->labelcolor(FL_FOREGROUND_COLOR); - scheme_choice->callback((Fl_Callback*)scheme_cb); - scheme_choice->align(Fl_Align(FL_ALIGN_LEFT)); - scheme_choice->when(FL_WHEN_RELEASE); - init_scheme(); - } // Fl_Scheme_Choice* scheme_choice + { Fl_Group* o = new Fl_Group(120, 78, 130, 25); + o->callback((Fl_Callback*)cb_); + { scheme_choice = new Fl_Scheme_Choice(120, 78, 120, 25, "Scheme: "); + scheme_choice->box(FL_UP_BOX); + scheme_choice->down_box(FL_BORDER_BOX); + scheme_choice->color(FL_BACKGROUND_COLOR); + scheme_choice->selection_color(FL_SELECTION_COLOR); + scheme_choice->labeltype(FL_NORMAL_LABEL); + scheme_choice->labelfont(1); + scheme_choice->labelsize(11); + scheme_choice->labelcolor(FL_FOREGROUND_COLOR); + scheme_choice->callback((Fl_Callback*)scheme_cb); + scheme_choice->align(Fl_Align(FL_ALIGN_LEFT)); + scheme_choice->when(FL_WHEN_RELEASE); + init_scheme(); + } // Fl_Scheme_Choice* scheme_choice + { Fl_Box* o = new Fl_Box(240, 78, 10, 25); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o + o->end(); + } // Fl_Group* o { Fl_Box* o = new Fl_Box(120, 115, 0, 20, "Options: "); o->labelfont(1); o->labelsize(11); @@ -2170,18 +2190,26 @@ Fl_Double_Window* make_settings_window() { fluid_prefs.get("show_comments", show_comments, 1); show_comments_button->value(show_comments); } // Fl_Check_Button* show_comments_button - { recent_spinner = new Fl_Spinner(120, 225, 40, 20, "# Recent Files:"); - recent_spinner->labelfont(1); - recent_spinner->labelsize(11); - recent_spinner->maximum(10); - recent_spinner->textsize(11); - recent_spinner->callback((Fl_Callback*)cb_recent_spinner); - recent_spinner->when(FL_WHEN_CHANGED); - int c; - fluid_prefs.get("recent_files", c, 5); - recent_spinner->maximum(10); - recent_spinner->value(c); - } // Fl_Spinner* recent_spinner + { Fl_Group* o = new Fl_Group(120, 225, 50, 20); + o->callback((Fl_Callback*)cb_1); + { recent_spinner = new Fl_Spinner(120, 225, 40, 20, "# Recent Files:"); + recent_spinner->labelfont(1); + recent_spinner->labelsize(11); + recent_spinner->maximum(10); + recent_spinner->textsize(11); + recent_spinner->callback((Fl_Callback*)cb_recent_spinner); + recent_spinner->when(FL_WHEN_CHANGED); + int c; + fluid_prefs.get("recent_files", c, 5); + recent_spinner->maximum(10); + recent_spinner->value(c); + } // Fl_Spinner* recent_spinner + { Fl_Box* o = new Fl_Box(160, 225, 10, 20); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o + o->end(); + } // Fl_Group* o { use_external_editor_button = new Fl_Check_Button(120, 275, 200, 20, "Use for Code Nodes"); use_external_editor_button->down_box(FL_DOWN_BOX); use_external_editor_button->labelsize(11); @@ -2222,18 +2250,30 @@ ps"); restricted_button->callback((Fl_Callback*)toggle_restricted_cb); o->value(show_restricted); } // Fl_Check_Button* restricted_button + { Fl_Box* o = new Fl_Box(120, 530, 200, 10); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o o->image()->scale(36, 24); o->end(); + Fl_Group::current()->resizable(o); } // Fl_Group* o { Fl_Group* o = w_settings_project_tab = new Fl_Group(10, 60, 320, 480, "Project"); w_settings_project_tab->image( image_document_64() ); w_settings_project_tab->labelsize(11); w_settings_project_tab->callback((Fl_Callback*)cb_w_settings_project_tab); w_settings_project_tab->hide(); - { Fl_Box* o = new Fl_Box(100, 78, 220, 30, "Use \"name.ext\" to set a file name or just \".ext\" to set extension."); - o->labelsize(11); - o->align(Fl_Align(132|FL_ALIGN_INSIDE)); - } // Fl_Box* o + { Fl_Group* o = new Fl_Group(100, 78, 220, 30); + { Fl_Box* o = new Fl_Box(100, 78, 210, 30, "Use \"name.ext\" to set a file name\nor just \".ext\" to set extension."); + o->labelsize(11); + o->align(Fl_Align(132|FL_ALIGN_INSIDE)); + } // Fl_Box* o + { Fl_Box* o = new Fl_Box(310, 78, 10, 30); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o + o->end(); + } // Fl_Group* o { header_file_input = new Fl_Input(100, 112, 220, 20, "Header File:"); header_file_input->tooltip("The name of the generated header file."); header_file_input->box(FL_THIN_DOWN_BOX); @@ -2285,6 +2325,10 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ avoid_early_includes_button->labelsize(11); avoid_early_includes_button->callback((Fl_Callback*)cb_avoid_early_includes_button); } // Fl_Check_Button* avoid_early_includes_button + { Fl_Box* o = new Fl_Box(100, 530, 220, 10); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o o->image()->scale(36, 24); w_settings_project_tab->end(); } // Fl_Group* w_settings_project_tab @@ -2304,7 +2348,7 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ layout_choice->menu(menu_layout_choice); } // Fl_Choice* layout_choice { Fl_Button* o = new Fl_Button(272, 78, 24, 24, "+"); - o->callback((Fl_Callback*)cb_); + o->callback((Fl_Callback*)cb_2); } // Fl_Button* o { w_layout_menu = new Fl_Menu_Button(296, 78, 24, 24); w_layout_menu->callback((Fl_Callback*)cb_w_layout_menu); @@ -2535,14 +2579,14 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ o->maximum(32767); o->step(1); o->textsize(11); - o->callback((Fl_Callback*)cb_1); + o->callback((Fl_Callback*)cb_3); } // Fl_Value_Input* o { Fl_Value_Input* o = new Fl_Value_Input(145, 440, 55, 20); o->labelsize(11); o->maximum(32767); o->step(1); o->textsize(11); - o->callback((Fl_Callback*)cb_2); + o->callback((Fl_Callback*)cb_4); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); } // Fl_Value_Input* o { Fl_Value_Input* o = new Fl_Value_Input(205, 440, 55, 20); @@ -2550,7 +2594,7 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ o->maximum(32767); o->step(1); o->textsize(11); - o->callback((Fl_Callback*)cb_3); + o->callback((Fl_Callback*)cb_5); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); } // Fl_Value_Input* o { Fl_Group* o = new Fl_Group(85, 465, 201, 20, "Label Font:"); @@ -2564,7 +2608,7 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ o->labelfont(1); o->labelsize(11); o->textsize(11); - o->callback((Fl_Callback*)cb_4); + o->callback((Fl_Callback*)cb_6); Fl_Group::current()->resizable(o); o->menu(fontmenu_w_default); } // Fl_Choice* o @@ -2576,7 +2620,7 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ o->step(1); o->value(14); o->textsize(11); - o->callback((Fl_Callback*)cb_5); + o->callback((Fl_Callback*)cb_7); } // Fl_Value_Input* o o->end(); } // Fl_Group* o @@ -2591,7 +2635,7 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ o->labelfont(1); o->labelsize(11); o->textsize(11); - o->callback((Fl_Callback*)cb_6); + o->callback((Fl_Callback*)cb_8); o->menu(fontmenu_w_default); } // Fl_Choice* o { Fl_Value_Input* o = new Fl_Value_Input(235, 490, 50, 20); @@ -2601,60 +2645,73 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ o->step(1); o->value(14); o->textsize(11); - o->callback((Fl_Callback*)cb_7); + o->callback((Fl_Callback*)cb_9); } // Fl_Value_Input* o o->end(); } // Fl_Group* o + { Fl_Box* o = new Fl_Box(325, 535, 5, 5); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o o->image()->scale(36, 24); w_settings_layout_tab->end(); } // Fl_Group* w_settings_layout_tab { Fl_Group* o = w_settings_shell_tab = new Fl_Group(10, 60, 320, 480, "Shell"); w_settings_shell_tab->image( image_shell_64() ); w_settings_shell_tab->labelsize(11); - w_settings_shell_tab->callback((Fl_Callback*)cb_w_settings_shell_tab); + w_settings_shell_tab->callback((Fl_Callback*)propagate_load); w_settings_shell_tab->hide(); - { w_settings_shell_list = new Fl_Browser(100, 90, 220, 110, "Shell \ncommand \nlist:"); - w_settings_shell_list->type(3); - w_settings_shell_list->labelfont(1); - w_settings_shell_list->labelsize(11); - w_settings_shell_list->textsize(13); - w_settings_shell_list->callback((Fl_Callback*)cb_w_settings_shell_list); - w_settings_shell_list->align(Fl_Align(FL_ALIGN_LEFT)); - } // Fl_Browser* w_settings_shell_list - { w_settings_shell_toolbox = new Fl_Group(100, 200, 220, 22); - w_settings_shell_toolbox->callback((Fl_Callback*)cb_w_settings_shell_toolbox); - { Fl_Button* o = new Fl_Button(100, 200, 24, 22, "+"); - o->tooltip("insert a new shell command into the list after the selected command"); - o->labelfont(1); - o->labelsize(11); - o->callback((Fl_Callback*)cb_8); - } // Fl_Button* o - { w_settings_shell_dup = new Fl_Button(124, 200, 24, 22, "++"); - w_settings_shell_dup->tooltip("duplicate the selected shell command and insert it into the list"); - w_settings_shell_dup->labelfont(1); - w_settings_shell_dup->labelsize(11); - w_settings_shell_dup->callback((Fl_Callback*)cb_w_settings_shell_dup); - w_settings_shell_dup->deactivate(); - } // Fl_Button* w_settings_shell_dup - { w_settings_shell_remove = new Fl_Button(148, 200, 24, 22, "DEL"); - w_settings_shell_remove->tooltip("remove the selected shell command - this can not be undone"); - w_settings_shell_remove->labelsize(10); - w_settings_shell_remove->callback((Fl_Callback*)cb_w_settings_shell_remove); - w_settings_shell_remove->deactivate(); - } // Fl_Button* w_settings_shell_remove - { w_settings_shell_menu = new Fl_Menu_Button(172, 200, 24, 22); - w_settings_shell_menu->labelsize(11); - w_settings_shell_menu->textsize(11); - w_settings_shell_menu->menu(menu_w_settings_shell_menu); - } // Fl_Menu_Button* w_settings_shell_menu - { w_settings_shell_play = new Fl_Button(270, 200, 50, 22, "Run"); - w_settings_shell_play->tooltip("run the selected shell command"); - w_settings_shell_play->labelsize(11); - w_settings_shell_play->callback((Fl_Callback*)cb_w_settings_shell_play); - w_settings_shell_play->deactivate(); - } // Fl_Button* w_settings_shell_play - w_settings_shell_toolbox->end(); - } // Fl_Group* w_settings_shell_toolbox + { Fl_Group* o = new Fl_Group(10, 90, 320, 132); + o->callback((Fl_Callback*)propagate_load); + { w_settings_shell_list = new Fl_Browser(100, 90, 220, 110, "Shell \ncommand \nlist:"); + w_settings_shell_list->type(3); + w_settings_shell_list->labelfont(1); + w_settings_shell_list->labelsize(11); + w_settings_shell_list->textsize(13); + w_settings_shell_list->callback((Fl_Callback*)cb_w_settings_shell_list); + w_settings_shell_list->align(Fl_Align(FL_ALIGN_LEFT)); + Fl_Group::current()->resizable(w_settings_shell_list); + } // Fl_Browser* w_settings_shell_list + { w_settings_shell_toolbox = new Fl_Group(100, 200, 220, 22); + w_settings_shell_toolbox->callback((Fl_Callback*)cb_w_settings_shell_toolbox); + { Fl_Button* o = new Fl_Button(100, 200, 24, 22, "+"); + o->tooltip("insert a new shell command into the list after the selected command"); + o->labelfont(1); + o->labelsize(11); + o->callback((Fl_Callback*)cb_a); + } // Fl_Button* o + { w_settings_shell_dup = new Fl_Button(124, 200, 24, 22, "++"); + w_settings_shell_dup->tooltip("duplicate the selected shell command and insert it into the list"); + w_settings_shell_dup->labelfont(1); + w_settings_shell_dup->labelsize(11); + w_settings_shell_dup->callback((Fl_Callback*)cb_w_settings_shell_dup); + w_settings_shell_dup->deactivate(); + } // Fl_Button* w_settings_shell_dup + { w_settings_shell_remove = new Fl_Button(148, 200, 24, 22, "DEL"); + w_settings_shell_remove->tooltip("remove the selected shell command - this can not be undone"); + w_settings_shell_remove->labelsize(10); + w_settings_shell_remove->callback((Fl_Callback*)cb_w_settings_shell_remove); + w_settings_shell_remove->deactivate(); + } // Fl_Button* w_settings_shell_remove + { w_settings_shell_menu = new Fl_Menu_Button(172, 200, 24, 22); + w_settings_shell_menu->labelsize(11); + w_settings_shell_menu->textsize(11); + w_settings_shell_menu->menu(menu_w_settings_shell_menu); + } // Fl_Menu_Button* w_settings_shell_menu + { Fl_Box* o = new Fl_Box(253, 200, 13, 22); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o + { w_settings_shell_play = new Fl_Button(270, 200, 50, 22, "Run"); + w_settings_shell_play->tooltip("run the selected shell command"); + w_settings_shell_play->labelsize(11); + w_settings_shell_play->callback((Fl_Callback*)cb_w_settings_shell_play); + w_settings_shell_play->deactivate(); + } // Fl_Button* w_settings_shell_play + w_settings_shell_toolbox->end(); + } // Fl_Group* w_settings_shell_toolbox + o->end(); + } // Fl_Group* o { w_settings_shell_cmd = new Fl_Group(10, 235, 320, 291); w_settings_shell_cmd->callback((Fl_Callback*)cb_w_settings_shell_cmd); { Fl_Input* o = new Fl_Input(100, 246, 220, 20, "Name:"); @@ -2674,38 +2731,46 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ o->textsize(11); o->callback((Fl_Callback*)cb_Menu); } // Fl_Input* o - { Fl_Shortcut_Button* o = new Fl_Shortcut_Button(100, 297, 130, 20, "Shortcut"); - o->tooltip("an optional keyboard shortcut to run this shell command"); - o->box(FL_UP_BOX); - o->color(FL_BACKGROUND_COLOR); - o->selection_color(FL_BACKGROUND_COLOR); - o->labeltype(FL_NORMAL_LABEL); - o->labelfont(0); - o->labelsize(11); - o->labelcolor(FL_FOREGROUND_COLOR); - o->callback((Fl_Callback*)cb_Shortcut); - o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); - o->when(FL_WHEN_RELEASE); - } // Fl_Shortcut_Button* o - { Fl_Choice* o = new Fl_Choice(100, 322, 130, 20, "Store:"); - o->tooltip("store this shell command as a user setting or save it with the .fl project fi\ + { Fl_Group* o = new Fl_Group(100, 297, 140, 71); + o->callback((Fl_Callback*)cb_b); + { Fl_Shortcut_Button* o = new Fl_Shortcut_Button(100, 297, 130, 20, "Shortcut"); + o->tooltip("an optional keyboard shortcut to run this shell command"); + o->box(FL_UP_BOX); + o->color(FL_BACKGROUND_COLOR); + o->selection_color(FL_BACKGROUND_COLOR); + o->labeltype(FL_NORMAL_LABEL); + o->labelfont(0); + o->labelsize(11); + o->labelcolor(FL_FOREGROUND_COLOR); + o->callback((Fl_Callback*)cb_Shortcut); + o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); + o->when(FL_WHEN_RELEASE); + } // Fl_Shortcut_Button* o + { Fl_Choice* o = new Fl_Choice(100, 322, 130, 20, "Store:"); + o->tooltip("store this shell command as a user setting or save it with the .fl project fi\ le"); - o->down_box(FL_BORDER_BOX); - o->labelfont(1); - o->labelsize(11); - o->textsize(11); - o->callback((Fl_Callback*)cb_Store); - o->menu(menu_Store); - } // Fl_Choice* o - { Fl_Choice* o = new Fl_Choice(100, 348, 130, 20, "Condition:"); - o->tooltip("add this command to the main menu bar only if this condition is true"); - o->down_box(FL_BORDER_BOX); - o->labelfont(1); - o->labelsize(11); - o->textsize(11); - o->callback((Fl_Callback*)cb_Condition); - o->menu(menu_Condition); - } // Fl_Choice* o + o->down_box(FL_BORDER_BOX); + o->labelfont(1); + o->labelsize(11); + o->textsize(11); + o->callback((Fl_Callback*)cb_Store); + o->menu(menu_Store); + } // Fl_Choice* o + { Fl_Choice* o = new Fl_Choice(100, 348, 130, 20, "Condition:"); + o->tooltip("add this command to the main menu bar only if this condition is true"); + o->down_box(FL_BORDER_BOX); + o->labelfont(1); + o->labelsize(11); + o->textsize(11); + o->callback((Fl_Callback*)cb_Condition); + o->menu(menu_Condition); + } // Fl_Choice* o + { Fl_Box* o = new Fl_Box(230, 297, 10, 71); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o + o->end(); + } // Fl_Group* o { Fl_Input* o = new Fl_Input(230, 348, 90, 20, "Label:"); o->labelfont(1); o->labelsize(11); @@ -2714,29 +2779,39 @@ le"); o->callback((Fl_Callback*)cb_Label); o->hide(); } // Fl_Input* o - { Fl_Text_Editor* o = w_settings_shell_command = new Fl_Text_Editor(100, 373, 196, 80, "Shell script:"); - w_settings_shell_command->labelfont(1); - w_settings_shell_command->labelsize(11); - w_settings_shell_command->textfont(4); - w_settings_shell_command->textsize(12); - w_settings_shell_command->callback((Fl_Callback*)cb_w_settings_shell_command); - w_settings_shell_command->align(Fl_Align(FL_ALIGN_LEFT)); - o->buffer(new Fl_Text_Buffer); - } // Fl_Text_Editor* w_settings_shell_command - { Fl_Group* o = new Fl_Group(296, 373, 24, 44); - { w_settings_shell_text_macros = new Fl_Menu_Button(296, 373, 24, 22); - w_settings_shell_text_macros->tooltip("a list of text replacements available for the shell script"); - w_settings_shell_text_macros->labelsize(11); - w_settings_shell_text_macros->textsize(11); - w_settings_shell_text_macros->callback((Fl_Callback*)cb_w_settings_shell_text_macros); - w_settings_shell_text_macros->menu(menu_w_settings_shell_text_macros); - } // Fl_Menu_Button* w_settings_shell_text_macros - { Fl_Button* o = new Fl_Button(296, 395, 24, 22, "@+1fd_zoom"); - o->tooltip("open the big code editor"); - o->labelsize(11); - o->callback((Fl_Callback*)cb_1fd_zoom); - } // Fl_Button* o + { Fl_Group* o = new Fl_Group(100, 373, 220, 80); + o->callback((Fl_Callback*)propagate_load); + { Fl_Text_Editor* o = w_settings_shell_command = new Fl_Text_Editor(100, 373, 196, 80, "Shell script:"); + w_settings_shell_command->labelfont(1); + w_settings_shell_command->labelsize(11); + w_settings_shell_command->textfont(4); + w_settings_shell_command->textsize(12); + w_settings_shell_command->callback((Fl_Callback*)cb_w_settings_shell_command); + w_settings_shell_command->align(Fl_Align(FL_ALIGN_LEFT)); + Fl_Group::current()->resizable(w_settings_shell_command); + o->buffer(new Fl_Text_Buffer); + } // Fl_Text_Editor* w_settings_shell_command + { Fl_Group* o = new Fl_Group(296, 373, 24, 80); + { w_settings_shell_text_macros = new Fl_Menu_Button(296, 373, 24, 22); + w_settings_shell_text_macros->tooltip("a list of text replacements available for the shell script"); + w_settings_shell_text_macros->labelsize(11); + w_settings_shell_text_macros->textsize(11); + w_settings_shell_text_macros->callback((Fl_Callback*)cb_w_settings_shell_text_macros); + w_settings_shell_text_macros->menu(menu_w_settings_shell_text_macros); + } // Fl_Menu_Button* w_settings_shell_text_macros + { Fl_Button* o = new Fl_Button(296, 395, 24, 22, "@+1fd_zoom"); + o->tooltip("open the big code editor"); + o->labelsize(11); + o->callback((Fl_Callback*)cb_1fd_zoom); + } // Fl_Button* o + { Fl_Box* o = new Fl_Box(296, 417, 24, 10); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o + o->end(); + } // Fl_Group* o o->end(); + Fl_Group::current()->resizable(o); } // Fl_Group* o { Fl_Check_Button* o = new Fl_Check_Button(100, 458, 220, 20, "save .fl project file"); o->tooltip("save the project to the .fl file before running the command"); @@ -2757,6 +2832,7 @@ le"); o->callback((Fl_Callback*)cb_save2); } // Fl_Check_Button* o w_settings_shell_cmd->end(); + Fl_Group::current()->resizable(w_settings_shell_cmd); } // Fl_Group* w_settings_shell_cmd { Fl_Box* o = w_settings_shell_fd_project = new Fl_Box(20, 70, 16, 15); w_settings_shell_fd_project->bind_image( image_fd_project() ); @@ -2780,15 +2856,23 @@ le"); w_settings_i18n_tab->labelsize(11); w_settings_i18n_tab->callback((Fl_Callback*)cb_w_settings_i18n_tab); w_settings_i18n_tab->hide(); - { i18n_type_chooser = new Fl_Choice(100, 78, 160, 20, "i18n Library:"); - i18n_type_chooser->tooltip("Type of internationalization to use."); - i18n_type_chooser->box(FL_THIN_UP_BOX); - i18n_type_chooser->down_box(FL_BORDER_BOX); - i18n_type_chooser->labelsize(11); - i18n_type_chooser->textsize(11); - i18n_type_chooser->callback((Fl_Callback*)i18n_type_cb); - i18n_type_chooser->menu(menu_i18n_type_chooser); - } // Fl_Choice* i18n_type_chooser + { Fl_Group* o = new Fl_Group(100, 78, 170, 20); + o->callback((Fl_Callback*)propagate_load); + { i18n_type_chooser = new Fl_Choice(100, 78, 160, 20, "i18n Library:"); + i18n_type_chooser->tooltip("Type of internationalization to use."); + i18n_type_chooser->box(FL_THIN_UP_BOX); + i18n_type_chooser->down_box(FL_BORDER_BOX); + i18n_type_chooser->labelsize(11); + i18n_type_chooser->textsize(11); + i18n_type_chooser->callback((Fl_Callback*)i18n_type_cb); + i18n_type_chooser->menu(menu_i18n_type_chooser); + } // Fl_Choice* i18n_type_chooser + { Fl_Box* o = new Fl_Box(260, 78, 10, 20); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o + o->end(); + } // Fl_Group* o { i18n_gnu_group = new Fl_Group(100, 103, 220, 95); i18n_gnu_group->callback((Fl_Callback*)cb_i18n_gnu_group); { i18n_gnu_include_input = new Fl_Input(100, 103, 220, 20, "#include:"); @@ -2856,27 +2940,48 @@ le FLTK_GETTEXT_FOUND"); i18n_pos_file_input->textsize(11); i18n_pos_file_input->callback((Fl_Callback*)cb_i18n_pos_file_input); } // Fl_Input* i18n_pos_file_input - { i18n_pos_set_input = new Fl_Int_Input(100, 178, 80, 20, "Set:"); - i18n_pos_set_input->tooltip("The message set number."); - i18n_pos_set_input->type(2); - i18n_pos_set_input->box(FL_THIN_DOWN_BOX); - i18n_pos_set_input->labelsize(11); - i18n_pos_set_input->textfont(4); - i18n_pos_set_input->textsize(11); - i18n_pos_set_input->callback((Fl_Callback*)cb_i18n_pos_set_input); - } // Fl_Int_Input* i18n_pos_set_input + { Fl_Group* o = new Fl_Group(100, 178, 90, 20); + o->callback((Fl_Callback*)cb_c); + { i18n_pos_set_input = new Fl_Int_Input(100, 178, 80, 20, "Set:"); + i18n_pos_set_input->tooltip("The message set number."); + i18n_pos_set_input->type(2); + i18n_pos_set_input->box(FL_THIN_DOWN_BOX); + i18n_pos_set_input->labelsize(11); + i18n_pos_set_input->textfont(4); + i18n_pos_set_input->textsize(11); + i18n_pos_set_input->callback((Fl_Callback*)cb_i18n_pos_set_input); + } // Fl_Int_Input* i18n_pos_set_input + { Fl_Box* o = new Fl_Box(180, 178, 10, 20); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o + o->end(); + } // Fl_Group* o i18n_posix_group->end(); } // Fl_Group* i18n_posix_group + { Fl_Box* o = new Fl_Box(100, 530, 220, 10); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o o->image()->scale(36, 24); w_settings_i18n_tab->end(); } // Fl_Group* w_settings_i18n_tab w_settings_tabs->end(); + Fl_Group::current()->resizable(w_settings_tabs); } // Fl_Tabs* w_settings_tabs - { Fl_Button* o = new Fl_Button(230, 550, 100, 20, "Close"); - o->tooltip("Close this dialog."); - o->labelsize(11); - o->callback((Fl_Callback*)cb_Close); - } // Fl_Button* o + { Fl_Group* o = new Fl_Group(10, 550, 320, 20); + { Fl_Button* o = new Fl_Button(230, 550, 100, 20, "Close"); + o->tooltip("Close this dialog."); + o->labelsize(11); + o->callback((Fl_Callback*)cb_Close); + } // Fl_Button* o + { Fl_Box* o = new Fl_Box(220, 550, 10, 20); + o->hide(); + Fl_Group::current()->resizable(o); + } // Fl_Box* o + o->end(); + } // Fl_Group* o + settings_window->size_range(340, 580); settings_window->end(); } // Fl_Double_Window* settings_window w_settings_tabs->do_callback(w_settings_tabs, LOAD); diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl index fdea176b9..3abf133c7 100644 --- a/fluid/alignment_panel.fl +++ b/fluid/alignment_panel.fl @@ -149,24 +149,32 @@ Function {make_settings_window()} {open } { Fl_Window settings_window { label {FLUID Settings} open - xywh {392 362 340 580} type Double align 80 visible + xywh {392 362 340 580} type Double align 80 resizable size_range {340 580 0 0} visible } { Fl_Tabs w_settings_tabs { callback {propagate_load(o, v);} open - xywh {10 10 320 530} selection_color 12 labelsize 11 labelcolor 255 + xywh {10 10 320 530} selection_color 12 labelsize 11 labelcolor 255 resizable } { Fl_Group {} { label General open selected - image {icons/general_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 + image {icons/general_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 resizable code0 {o->image()->scale(36, 24);} } { - Fl_Choice scheme_choice { - label {Scheme: } - callback scheme_cb open - xywh {120 78 120 25} down_box BORDER_BOX labelfont 1 labelsize 11 - code0 {init_scheme();} - class Fl_Scheme_Choice - } {} + Fl_Group {} { + callback {propagate_load(o, v);} open + xywh {120 78 130 25} + } { + Fl_Choice scheme_choice { + label {Scheme: } + callback scheme_cb open + xywh {120 78 120 25} down_box BORDER_BOX labelfont 1 labelsize 11 + code0 {init_scheme();} + class Fl_Scheme_Choice + } {} + Fl_Box {} { + xywh {240 78 10 25} hide resizable + } + } Fl_Box {} { label {Options: } xywh {120 115 0 20} labelfont 1 labelsize 11 align 4 @@ -214,15 +222,23 @@ redraw_browser();} code1 {fluid_prefs.get("show_comments", show_comments, 1);} code2 {show_comments_button->value(show_comments);} } - Fl_Spinner recent_spinner { - label {\# Recent Files:} - callback {fluid_prefs.set("recent_files", recent_spinner->value()); + Fl_Group {} { + callback {propagate_load(o, v);} open + xywh {120 225 50 20} + } { + Fl_Spinner recent_spinner { + label {\# Recent Files:} + callback {fluid_prefs.set("recent_files", recent_spinner->value()); load_history();} - xywh {120 225 40 20} labelfont 1 labelsize 11 when 1 maximum 10 textsize 11 - code0 {int c;} - code1 {fluid_prefs.get("recent_files", c, 5);} - code2 {recent_spinner->maximum(10);} - code3 {recent_spinner->value(c);} + xywh {120 225 40 20} labelfont 1 labelsize 11 when 1 maximum 10 textsize 11 + code0 {int c;} + code1 {fluid_prefs.get("recent_files", c, 5);} + code2 {recent_spinner->maximum(10);} + code3 {recent_spinner->value(c);} + } + Fl_Box {} { + xywh {160 225 10 20} hide resizable + } } Fl_Check_Button use_external_editor_button { label {Use for Code Nodes} @@ -264,6 +280,9 @@ Examples: tooltip {show overlapping and out of bounds areas, show unfilled areas in Fl_Pack groups} xywh {120 320 200 20} down_box DOWN_BOX labelsize 11 code0 {o->value(show_restricted);} } + Fl_Box {} { + xywh {120 530 200 10} hide resizable + } } Fl_Group w_settings_project_tab { label Project @@ -271,9 +290,17 @@ Examples: image {icons/document_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide code0 {o->image()->scale(36, 24);} } { - Fl_Box {} { - label {Use "name.ext" to set a file name or just ".ext" to set extension.} - xywh {100 78 220 30} labelsize 11 align 148 + Fl_Group {} {open + xywh {100 78 220 30} + } { + Fl_Box {} { + label {Use "name.ext" to set a file name +or just ".ext" to set extension.} + xywh {100 78 210 30} labelsize 11 align 148 + } + Fl_Box {} { + xywh {310 78 10 30} hide resizable + } } Fl_Input header_file_input { label {Header File:} @@ -353,6 +380,9 @@ Examples: }} tooltip {Do not emit \#include until it is needed by another include file.} xywh {100 255 220 20} down_box DOWN_BOX labelsize 11 } + Fl_Box {} { + xywh {100 530 220 10} hide resizable + } } Fl_Group w_settings_layout_tab { label Layout @@ -796,18 +826,25 @@ g_layout_list.update_dialogs();} tooltip {The value text size.} xywh {235 490 50 20} labelsize 11 maximum 1000 step 1 value 14 textsize 11 } } + Fl_Box {} { + xywh {325 535 5 5} hide resizable + } } Fl_Group w_settings_shell_tab { label Shell - callback {propagate_load(o, v);} open + callback propagate_load open image {icons/shell_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide code0 {o->image()->scale(36, 24);} } { - Fl_Browser w_settings_shell_list { - label {Shell + Fl_Group {} { + callback propagate_load open + xywh {10 90 320 132} + } { + Fl_Browser w_settings_shell_list { + label {Shell command list:} - callback {if (v == LOAD) { + callback {if (v == LOAD) { // load from g_shell_config if (g_shell_config) { o->clear(); @@ -832,17 +869,17 @@ list:} w_settings_shell_cmd->do_callback(w_settings_shell_cmd, LOAD); w_settings_shell_toolbox->do_callback(w_settings_shell_toolbox, LOAD); }} - xywh {100 90 220 110} type Multi labelfont 1 labelsize 11 align 4 textsize 13 - } - Fl_Group w_settings_shell_toolbox { - callback {if (v==LOAD) { + xywh {100 90 220 110} type Multi labelfont 1 labelsize 11 align 4 textsize 13 resizable + } + Fl_Group w_settings_shell_toolbox { + callback {if (v==LOAD) { propagate_load(o, v); }} open - xywh {100 200 220 22} - } { - Fl_Button {} { - label {+} - callback {if (v != LOAD) { + xywh {100 200 220 22} + } { + Fl_Button {} { + label {+} + callback {if (v != LOAD) { int selected = w_settings_shell_list_selected; Fd_Shell_Command *cmd = new Fd_Shell_Command("new shell command"); g_shell_config->insert(selected, cmd); @@ -858,11 +895,11 @@ list:} w_settings_shell_toolbox->do_callback(w_settings_shell_toolbox, LOAD); g_shell_config->rebuild_shell_menu(); }} - tooltip {insert a new shell command into the list after the selected command} xywh {100 200 24 22} labelfont 1 labelsize 11 - } - Fl_Button w_settings_shell_dup { - label {++} - callback {int selected = w_settings_shell_list_selected; + tooltip {insert a new shell command into the list after the selected command} xywh {100 200 24 22} labelfont 1 labelsize 11 + } + Fl_Button w_settings_shell_dup { + label {++} + callback {int selected = w_settings_shell_list_selected; if (v==LOAD) { if (selected) { o->activate(); @@ -886,11 +923,11 @@ if (v==LOAD) { w_settings_shell_toolbox->do_callback(w_settings_shell_toolbox, LOAD); g_shell_config->rebuild_shell_menu(); }} - tooltip {duplicate the selected shell command and insert it into the list} xywh {124 200 24 22} labelfont 1 labelsize 11 deactivate - } - Fl_Button w_settings_shell_remove { - label DEL - callback {int selected = w_settings_shell_list_selected; + tooltip {duplicate the selected shell command and insert it into the list} xywh {124 200 24 22} labelfont 1 labelsize 11 deactivate + } + Fl_Button w_settings_shell_remove { + label DEL + callback {int selected = w_settings_shell_list_selected; if (v==LOAD) { if (selected) { o->activate(); @@ -913,47 +950,50 @@ if (v==LOAD) { w_settings_shell_toolbox->do_callback(w_settings_shell_toolbox, LOAD); g_shell_config->rebuild_shell_menu(); }} - tooltip {remove the selected shell command - this can not be undone} xywh {148 200 24 22} labelsize 10 deactivate - } - Fl_Menu_Button w_settings_shell_menu {open - xywh {172 200 24 22} labelsize 11 textsize 11 - } { - MenuItem {} { - label {Import...} - callback {if (v != LOAD) + tooltip {remove the selected shell command - this can not be undone} xywh {148 200 24 22} labelsize 10 deactivate + } + Fl_Menu_Button w_settings_shell_menu {open + xywh {172 200 24 22} labelsize 11 textsize 11 + } { + MenuItem {} { + label {Import...} + callback {if (v != LOAD) Fd_Shell_Command_List::import_from_file();} - tooltip {import shell commands from an external file} xywh {90 90 100 20} labelsize 11 - } - MenuItem {} { - label {Export selected...} - callback {if (v != LOAD) + tooltip {import shell commands from an external file} xywh {90 90 100 20} labelsize 11 + } + MenuItem {} { + label {Export selected...} + callback {if (v != LOAD) Fd_Shell_Command_List::export_selected();} - tooltip {export selected shell commands to an external file} xywh {10 10 100 20} labelsize 11 divider + tooltip {export selected shell commands to an external file} xywh {10 10 100 20} labelsize 11 + } + MenuItem {} { + label {Example Scripts:} + xywh {20 20 100 20} labelfont 1 labelsize 10 hide deactivate + } + MenuItem {} { + label {Compile with fltk-config} + xywh {30 30 100 20} labelsize 11 hide + } + MenuItem {} { + label {Build and run} + xywh {40 40 100 20} labelsize 11 hide + } + MenuItem {} { + label {Build with Xcode on macOS} + xywh {50 50 100 20} labelsize 11 hide + } + MenuItem {} { + label {Build with CMake} + xywh {60 60 100 20} labelsize 11 hide + } } - MenuItem {} { - label {Example Scripts:} - xywh {20 20 100 20} labelfont 1 labelsize 10 hide deactivate + Fl_Box {} { + xywh {253 200 13 22} hide resizable } - MenuItem {} { - label {Compile with fltk-config} - xywh {30 30 100 20} labelsize 11 hide - } - MenuItem {} { - label {Build and run} - xywh {40 40 100 20} labelsize 11 hide - } - MenuItem {} { - label {Build with Xcode on macOS} - xywh {50 50 100 20} labelsize 11 hide - } - MenuItem {} { - label {Build with CMake} - xywh {60 60 100 20} labelsize 11 hide - } - } - Fl_Button w_settings_shell_play { - label Run - callback {int selected = w_settings_shell_list_selected; + Fl_Button w_settings_shell_play { + label Run + callback {int selected = w_settings_shell_list_selected; if (v==LOAD) { if (selected) { o->activate(); @@ -965,7 +1005,8 @@ if (v==LOAD) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; cmd->run(); }} - tooltip {run the selected shell command} xywh {270 200 50 22} labelsize 11 deactivate + tooltip {run the selected shell command} xywh {270 200 50 22} labelsize 11 deactivate + } } } Fl_Group w_settings_shell_cmd { @@ -978,7 +1019,7 @@ if (v==LOAD) { } propagate_load(o, v); }} open - xywh {10 235 320 291} + xywh {10 235 320 291} resizable } { Fl_Input {} { label {Name:} @@ -1018,9 +1059,13 @@ if (v == LOAD) { }} tooltip {label text for the Shell menu in the main menu bar} xywh {100 272 220 20} labelfont 1 labelsize 11 textfont 4 textsize 11 } - Fl_Button {} { - label Shortcut - callback {int selected = w_settings_shell_list_selected; + Fl_Group {} { + callback {propagate_load(o, v);} open + xywh {100 297 140 71} + } { + Fl_Button {} { + label Shortcut + callback {int selected = w_settings_shell_list_selected; if (v == LOAD) { if (selected) { o->value(g_shell_config->list[selected-1]->shortcut); @@ -1036,13 +1081,13 @@ if (v == LOAD) { if (cmd->storage == FD_STORE_PROJECT) set_modflag(1); } }} - tooltip {an optional keyboard shortcut to run this shell command} xywh {100 297 130 20} labelsize 11 align 16 - code0 {\#include } - class Fl_Shortcut_Button - } - Fl_Choice {} { - label {Store:} - callback {int selected = w_settings_shell_list_selected; + tooltip {an optional keyboard shortcut to run this shell command} xywh {100 297 130 20} labelsize 11 align 16 + code0 {\#include } + class Fl_Shortcut_Button + } + Fl_Choice {} { + label {Store:} + callback {int selected = w_settings_shell_list_selected; if (v == LOAD) { if (selected) { Fd_Tool_Store ts = g_shell_config->list[selected-1]->storage; @@ -1064,22 +1109,22 @@ if (v == LOAD) { if (cmd->storage == FD_STORE_PROJECT) set_modflag(1); } }} open - tooltip {store this shell command as a user setting or save it with the .fl project file} xywh {100 322 130 20} down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 - } { - MenuItem {} { - label {@fd_user User Setting} - user_data FD_STORE_USER user_data_type long - xywh {0 0 100 20} labelsize 11 + tooltip {store this shell command as a user setting or save it with the .fl project file} xywh {100 322 130 20} down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 + } { + MenuItem {} { + label {@fd_user User Setting} + user_data FD_STORE_USER user_data_type long + xywh {0 0 100 20} labelsize 11 + } + MenuItem {} { + label {@fd_project Project File} + user_data FD_STORE_PROJECT user_data_type long + xywh {0 0 100 20} labelsize 11 + } } - MenuItem {} { - label {@fd_project Project File} - user_data FD_STORE_PROJECT user_data_type long - xywh {0 0 100 20} labelsize 11 - } - } - Fl_Choice {} { - label {Condition:} - callback {int selected = w_settings_shell_list_selected; + Fl_Choice {} { + label {Condition:} + callback {int selected = w_settings_shell_list_selected; if (v == LOAD) { if (selected) { int cond = g_shell_config->list[selected-1]->condition; @@ -1096,37 +1141,41 @@ if (v == LOAD) { if (cmd->storage == FD_STORE_PROJECT) set_modflag(1); } }} open - tooltip {add this command to the main menu bar only if this condition is true} xywh {100 348 130 20} down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 - } { - MenuItem {} { - label {all platforms} - user_data {Fd_Shell_Command::ALWAYS} user_data_type long - xywh {0 0 100 20} labelsize 11 + tooltip {add this command to the main menu bar only if this condition is true} xywh {100 348 130 20} down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 + } { + MenuItem {} { + label {all platforms} + user_data {Fd_Shell_Command::ALWAYS} user_data_type long + xywh {0 0 100 20} labelsize 11 + } + MenuItem {} { + label {MS Windows only} + user_data {Fd_Shell_Command::WIN_ONLY} user_data_type long + xywh {0 0 100 20} labelsize 11 + } + MenuItem {} { + label {Linux only} + user_data {Fd_Shell_Command::UX_ONLY} user_data_type long + xywh {0 0 100 20} labelsize 11 + } + MenuItem {} { + label {macOS only} + user_data {Fd_Shell_Command::MAC_ONLY} user_data_type long + xywh {0 0 100 20} labelsize 11 + } + MenuItem {} { + label {Linux and macOS} + user_data {Fd_Shell_Command::MAC_AND_UX_ONLY} user_data_type long + xywh {0 0 100 20} labelsize 11 + } + MenuItem {} { + label {don't use} + user_data {Fd_Shell_Command::NEVER} user_data_type long + xywh {0 0 100 20} labelsize 11 + } } - MenuItem {} { - label {MS Windows only} - user_data {Fd_Shell_Command::WIN_ONLY} user_data_type long - xywh {0 0 100 20} labelsize 11 - } - MenuItem {} { - label {Linux only} - user_data {Fd_Shell_Command::UX_ONLY} user_data_type long - xywh {0 0 100 20} labelsize 11 - } - MenuItem {} { - label {macOS only} - user_data {Fd_Shell_Command::MAC_ONLY} user_data_type long - xywh {0 0 100 20} labelsize 11 - } - MenuItem {} { - label {Linux and macOS} - user_data {Fd_Shell_Command::MAC_AND_UX_ONLY} user_data_type long - xywh {0 0 100 20} labelsize 11 - } - MenuItem {} { - label {don't use} - user_data {Fd_Shell_Command::NEVER} user_data_type long - xywh {0 0 100 20} labelsize 11 + Fl_Box {} { + xywh {230 297 10 71} hide resizable } } Fl_Input {} { @@ -1138,9 +1187,13 @@ if (v == LOAD) { }} xywh {230 348 90 20} labelfont 1 labelsize 11 textfont 4 textsize 11 hide } - Fl_Text_Editor w_settings_shell_command { - label {Shell script:} - callback {int selected = w_settings_shell_list_selected; + Fl_Group {} { + callback propagate_load open + xywh {100 373 220 80} resizable + } { + Fl_Text_Editor w_settings_shell_command { + label {Shell script:} + callback {int selected = w_settings_shell_list_selected; if (v == LOAD) { if (selected) { o->buffer()->text(g_shell_config->list[selected-1]->command.c_str()); @@ -1154,14 +1207,14 @@ if (v == LOAD) { if (cmd->storage == FD_STORE_PROJECT) set_modflag(1); } }} - xywh {100 373 196 80} labelfont 1 labelsize 11 align 4 textfont 4 textsize 12 - code0 {o->buffer(new Fl_Text_Buffer);} - } - Fl_Group {} {open - xywh {296 373 24 44} - } { - Fl_Menu_Button w_settings_shell_text_macros { - callback {const Fl_Menu_Item *mi = o->mvalue(); + xywh {100 373 196 80} labelfont 1 labelsize 11 align 4 textfont 4 textsize 12 resizable + code0 {o->buffer(new Fl_Text_Buffer);} + } + Fl_Group {} {open + xywh {296 373 24 80} + } { + Fl_Menu_Button w_settings_shell_text_macros { + callback {const Fl_Menu_Item *mi = o->mvalue(); if (mi) { char buffer[256]; fl_strlcpy(buffer, mi->label(), 255); @@ -1179,57 +1232,57 @@ if (mi) { } w_settings_shell_command->do_callback(w_settings_shell_command, (void*)NULL); }} open - tooltip {a list of text replacements available for the shell script} xywh {296 373 24 22} labelsize 11 textsize 11 - } { - MenuItem {} { - label {@@BASENAME@@} - xywh {80 80 100 20} labelfont 4 labelsize 11 + tooltip {a list of text replacements available for the shell script} xywh {296 373 24 22} labelsize 11 textsize 11 + } { + MenuItem {} { + label {@@BASENAME@@} + xywh {80 80 100 20} labelfont 4 labelsize 11 + } + MenuItem {} { + label {@@PROJECTFILE_PATH@@} + xywh {0 0 100 20} labelfont 4 labelsize 11 + } + MenuItem {} { + label {@@PROJECTFILE_NAME@@} + xywh {10 10 100 20} labelfont 4 labelsize 11 + } + MenuItem {} { + label {@@CODEFILE_PATH@@} + xywh {20 20 100 20} labelfont 4 labelsize 11 + } + MenuItem {} { + label {@@CODEFILE_NAME@@} + xywh {30 30 100 20} labelfont 4 labelsize 11 + } + MenuItem {} { + label {@@HEADERFILE_PATH@@} + xywh {40 40 100 20} labelfont 4 labelsize 11 + } + MenuItem {} { + label {@@HEADERFILE_NAME@@} + xywh {50 50 100 20} labelfont 4 labelsize 11 + } + MenuItem {} { + label {@@TEXTFILE_PATH@@} + xywh {60 60 100 20} labelfont 4 labelsize 11 + } + MenuItem {} { + label {@@TEXTFILE_NAME@@} + xywh {70 70 100 20} labelfont 4 labelsize 11 + } + MenuItem {} { + label {@@FLTK_CONFIG@@} + comment {Not yet implemented} + xywh {70 70 100 20} labelfont 4 labelsize 11 hide + } + MenuItem {} { + label {@@TMPDIR@@} + xywh {70 70 100 20} labelfont 4 labelsize 11 + } } - MenuItem {} { - label {@@PROJECTFILE_PATH@@} - xywh {0 0 100 20} labelfont 4 labelsize 11 - } - MenuItem {} { - label {@@PROJECTFILE_NAME@@} - xywh {10 10 100 20} labelfont 4 labelsize 11 - } - MenuItem {} { - label {@@CODEFILE_PATH@@} - xywh {20 20 100 20} labelfont 4 labelsize 11 - } - MenuItem {} { - label {@@CODEFILE_NAME@@} - xywh {30 30 100 20} labelfont 4 labelsize 11 - } - MenuItem {} { - label {@@HEADERFILE_PATH@@} - xywh {40 40 100 20} labelfont 4 labelsize 11 - } - MenuItem {} { - label {@@HEADERFILE_NAME@@} - xywh {50 50 100 20} labelfont 4 labelsize 11 - } - MenuItem {} { - label {@@TEXTFILE_PATH@@} - xywh {60 60 100 20} labelfont 4 labelsize 11 - } - MenuItem {} { - label {@@TEXTFILE_NAME@@} - xywh {70 70 100 20} labelfont 4 labelsize 11 - } - MenuItem {} { - label {@@FLTK_CONFIG@@} - comment {Not yet implemented} - xywh {70 70 100 20} labelfont 4 labelsize 11 hide - } - MenuItem {} { - label {@@TMPDIR@@} - xywh {70 70 100 20} labelfont 4 labelsize 11 - } - } - Fl_Button {} { - label {@+1fd_zoom} - callback {if (!script_panel) make_script_panel(); + Fl_Button {} { + label {@+1fd_zoom} + callback {if (!script_panel) make_script_panel(); script_input->buffer()->text(w_settings_shell_command->buffer()->text()); script_panel->show(); @@ -1244,7 +1297,11 @@ w_settings_shell_command->buffer()->text(script_input->buffer()->text()); w_settings_shell_command->do_callback(); BREAK2: script_panel->hide();} - tooltip {open the big code editor} xywh {296 395 24 22} labelsize 11 + tooltip {open the big code editor} xywh {296 395 24 22} labelsize 11 + } + Fl_Box {} { + xywh {296 417 24 10} hide resizable + } } } Fl_Check_Button {} { @@ -1328,26 +1385,34 @@ if (v == LOAD) { } Fl_Group w_settings_i18n_tab { label Locale - callback {propagate_load(o, v);} + callback {propagate_load(o, v);} open image {icons/language_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide code0 {o->image()->scale(36, 24);} } { - Fl_Choice i18n_type_chooser { - label {i18n Library:} - callback i18n_type_cb open - tooltip {Type of internationalization to use.} xywh {100 78 160 20} box THIN_UP_BOX down_box BORDER_BOX labelsize 11 textsize 11 + Fl_Group {} { + callback propagate_load open + xywh {100 78 170 20} } { - MenuItem {} { - label None - xywh {0 -11 100 20} labelsize 11 + Fl_Choice i18n_type_chooser { + label {i18n Library:} + callback i18n_type_cb open + tooltip {Type of internationalization to use.} xywh {100 78 160 20} box THIN_UP_BOX down_box BORDER_BOX labelsize 11 textsize 11 + } { + MenuItem {} { + label None + xywh {0 -11 100 20} labelsize 11 + } + MenuItem {} { + label {GNU gettext} + xywh {0 -11 100 20} labelsize 11 + } + MenuItem {} { + label {POSIX catgets} + xywh {0 -11 100 20} labelsize 11 + } } - MenuItem {} { - label {GNU gettext} - xywh {0 -11 100 20} labelsize 11 - } - MenuItem {} { - label {POSIX catgets} - xywh {0 -11 100 20} labelsize 11 + Fl_Box {} { + xywh {260 78 10 20} hide resizable } } Fl_Group i18n_gnu_group { @@ -1436,27 +1501,45 @@ if (v == LOAD) { }} tooltip {The name of the message catalog.} xywh {100 153 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 } - Fl_Input i18n_pos_set_input { - label {Set:} - callback {if (v == LOAD) { + Fl_Group {} { + callback {propagate_load(o, v);} open + xywh {100 178 90 20} + } { + Fl_Input i18n_pos_set_input { + label {Set:} + callback {if (v == LOAD) { o->value(g_project.i18n_pos_set.c_str()); } else { undo_checkpoint(); g_project.i18n_pos_set = o->value(); set_modflag(1); }} - tooltip {The message set number.} xywh {100 178 80 20} type Int box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + tooltip {The message set number.} xywh {100 178 80 20} type Int box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + } + Fl_Box {} { + xywh {180 178 10 20} hide resizable + } } } + Fl_Box {} { + xywh {100 530 220 10} hide resizable + } } } - Fl_Button {} { - label Close - callback {if (g_shell_config) + Fl_Group {} {open + xywh {10 550 320 20} + } { + Fl_Button {} { + label Close + callback {if (g_shell_config) g_shell_config->write(fluid_prefs, FD_STORE_USER); g_layout_list.write(fluid_prefs, FD_STORE_USER); settings_window->hide();} - tooltip {Close this dialog.} xywh {230 550 100 20} labelsize 11 + tooltip {Close this dialog.} xywh {230 550 100 20} labelsize 11 + } + Fl_Box {} { + xywh {220 550 10 20} hide resizable + } } } code {w_settings_tabs->do_callback(w_settings_tabs, LOAD);} {}