diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-10-06 13:47:26 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-10-06 13:47:26 +0200 |
| commit | 068e10326ecb5d13e12c1d2aabdd2b993aca7897 (patch) | |
| tree | 4b46d51903aac23c22681283df09c6dc4ac69a9c /fluid | |
| parent | 6571bd2f28d916b0aa0e0091ff3b84018454ed80 (diff) | |
FLUID: typo
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/alignment_panel.cxx | 44 | ||||
| -rw-r--r-- | fluid/alignment_panel.fl | 45 | ||||
| -rw-r--r-- | fluid/test.fll | 11 | ||||
| -rw-r--r-- | fluid/widget_panel.txt | 182 |
4 files changed, 247 insertions, 35 deletions
diff --git a/fluid/alignment_panel.cxx b/fluid/alignment_panel.cxx index 49348eb24..0afcd63e3 100644 --- a/fluid/alignment_panel.cxx +++ b/fluid/alignment_panel.cxx @@ -907,6 +907,9 @@ static void cb_w_settings_shell_remove(Fl_Button* o, void* v) { } } else { if (!selected) return; + int ret = fl_choice("Delete the shell command\n\"%s\"?\n\nThis can not be undone.", + "Delete", "Cancel", NULL, g_shell_config->list[selected-1]->name.c_str()); + if (ret==1) return; g_shell_config->remove(selected-1); w_settings_shell_list->remove(selected); if (selected <= w_settings_shell_list->size()) @@ -935,11 +938,11 @@ 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}, - {"Import Example Scripts:", 0, 0, 0, 1, (uchar)FL_NORMAL_LABEL, 1, 10, 0}, - {"Compile with fltk-config", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"Build and run", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"Build with Xcode on macOS", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, - {"Build with CMake", 0, 0, 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}, + {"Build with Xcode on macOS", 0, 0, 0, 16, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, + {"Build with CMake", 0, 0, 0, 16, (uchar)FL_NORMAL_LABEL, 0, 11, 0}, {0,0,0,0,0,0,0,0,0} }; @@ -992,7 +995,7 @@ static void cb_Name(Fl_Input* o, void* v) { } } -static void cb_Label(Fl_Input* o, void* v) { +static void cb_Menu(Fl_Input* o, void* v) { int selected = w_settings_shell_list_selected; if (v == LOAD) { if (selected) { @@ -1090,7 +1093,7 @@ Fl_Menu_Item menu_Condition[] = { {0,0,0,0,0,0,0,0,0} }; -static void cb_Label1(Fl_Input* o, void* v) { +static void cb_Label(Fl_Input* o, void* v) { if (v == LOAD) { // o->value(g_shell_command.c_str()); } else { @@ -2621,16 +2624,21 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ { 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, "-"); - w_settings_shell_remove->labelsize(11); + { 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 @@ -2640,6 +2648,7 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ 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(); @@ -2649,6 +2658,7 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ { 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:"); + o->tooltip("file the shell command under this name in the shell command list"); o->labelfont(1); o->labelsize(11); o->textfont(4); @@ -2656,14 +2666,16 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ o->callback((Fl_Callback*)cb_Name); o->when(FL_WHEN_RELEASE | FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY); } // Fl_Input* o - { Fl_Input* o = new Fl_Input(100, 272, 220, 20, "Label:"); + { Fl_Input* o = new Fl_Input(100, 272, 220, 20, "Menu Label:"); + o->tooltip("label text for the Shell menu in the main menu bar"); o->labelfont(1); o->labelsize(11); o->textfont(4); o->textsize(11); - o->callback((Fl_Callback*)cb_Label); + 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); @@ -2676,6 +2688,8 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ 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); @@ -2684,6 +2698,7 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ 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); @@ -2696,7 +2711,7 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ o->labelsize(11); o->textfont(4); o->textsize(11); - o->callback((Fl_Callback*)cb_Label1); + 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:"); @@ -2710,15 +2725,16 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\ } // 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, "@square"); - o->tooltip("open big code editor"); + o->tooltip("open the big code editor"); o->labelsize(11); - o->labelcolor(FL_BACKGROUND_COLOR); + o->labelcolor(FL_DARK3); o->callback((Fl_Callback*)cb_square); } // Fl_Button* o o->end(); diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl index ef9d48455..560a2433d 100644 --- a/fluid/alignment_panel.fl +++ b/fluid/alignment_panel.fl @@ -858,7 +858,7 @@ list:} w_settings_shell_toolbox->do_callback(w_settings_shell_toolbox, LOAD); g_shell_config->rebuild_shell_menu(); }} - xywh {100 200 24 22} labelsize 11 + 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 {++} @@ -886,10 +886,10 @@ if (v==LOAD) { w_settings_shell_toolbox->do_callback(w_settings_shell_toolbox, LOAD); g_shell_config->rebuild_shell_menu(); }} - xywh {124 200 24 22} labelsize 11 deactivate + 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 {-} + label DEL callback {int selected = w_settings_shell_list_selected; if (v==LOAD) { if (selected) { @@ -899,6 +899,9 @@ if (v==LOAD) { } } else { if (!selected) return; + int ret = fl_choice("Delete the shell command\\n\\"%s\\"?\\n\\nThis can not be undone.", + "Delete", "Cancel", NULL, g_shell_config->list[selected-1]->name.c_str()); + if (ret==1) return; g_shell_config->remove(selected-1); w_settings_shell_list->remove(selected); if (selected <= w_settings_shell_list->size()) @@ -910,7 +913,7 @@ if (v==LOAD) { w_settings_shell_toolbox->do_callback(w_settings_shell_toolbox, LOAD); g_shell_config->rebuild_shell_menu(); }} - xywh {148 200 24 22} labelsize 11 deactivate + 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 @@ -919,33 +922,33 @@ if (v==LOAD) { label {Import...} callback {if (v != LOAD) Fd_Shell_Command_List::import_from_file();} - xywh {90 90 100 20} labelsize 11 + 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();} - xywh {10 10 100 20} labelsize 11 divider + tooltip {export selected shell commands to an external file} xywh {10 10 100 20} labelsize 11 divider } MenuItem {} { - label {Import Example Scripts:} - xywh {20 20 100 20} labelfont 1 labelsize 10 deactivate + 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 + xywh {30 30 100 20} labelsize 11 hide } MenuItem {} { label {Build and run} - xywh {40 40 100 20} labelsize 11 + xywh {40 40 100 20} labelsize 11 hide } MenuItem {} { label {Build with Xcode on macOS} - xywh {50 50 100 20} labelsize 11 + xywh {50 50 100 20} labelsize 11 hide } MenuItem {} { label {Build with CMake} - xywh {60 60 100 20} labelsize 11 + xywh {60 60 100 20} labelsize 11 hide } } Fl_Button w_settings_shell_play { @@ -962,7 +965,7 @@ if (v==LOAD) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; cmd->run(); }} - 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 { @@ -994,10 +997,10 @@ if (v == LOAD) { if (cmd->storage == FD_STORE_PROJECT) set_modflag(1); } }} - xywh {100 246 220 20} labelfont 1 labelsize 11 when 13 textfont 4 textsize 11 + tooltip {file the shell command under this name in the shell command list} xywh {100 246 220 20} labelfont 1 labelsize 11 when 13 textfont 4 textsize 11 } Fl_Input {} { - label {Label:} + label {Menu Label:} callback {int selected = w_settings_shell_list_selected; if (v == LOAD) { if (selected) { @@ -1013,7 +1016,7 @@ if (v == LOAD) { if (cmd->storage == FD_STORE_PROJECT) set_modflag(1); } }} - xywh {100 272 220 20} labelfont 1 labelsize 11 textfont 4 textsize 11 + 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 @@ -1033,7 +1036,7 @@ if (v == LOAD) { if (cmd->storage == FD_STORE_PROJECT) set_modflag(1); } }} - xywh {100 297 130 20} labelsize 11 align 16 + tooltip {an optional keyboard shortcut to run this shell command} xywh {100 297 130 20} labelsize 11 align 16 code0 {\#include <FL/Fl_Shortcut_Button.H>} class Fl_Shortcut_Button } @@ -1061,7 +1064,7 @@ if (v == LOAD) { if (cmd->storage == FD_STORE_PROJECT) set_modflag(1); } }} open - xywh {100 322 130 20} down_box BORDER_BOX labelfont 1 labelsize 11 textsize 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} @@ -1093,7 +1096,7 @@ if (v == LOAD) { if (cmd->storage == FD_STORE_PROJECT) set_modflag(1); } }} open - xywh {100 348 130 20} down_box BORDER_BOX labelfont 1 labelsize 11 textsize 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} @@ -1176,7 +1179,7 @@ if (mi) { } w_settings_shell_command->do_callback(w_settings_shell_command, (void*)NULL); }} open - xywh {296 373 24 22} labelsize 11 textsize 11 + tooltip {a list of text replacements available for the shell script} xywh {296 373 24 22} labelsize 11 textsize 11 } { MenuItem {} { label {@@BASENAME@@} @@ -1241,7 +1244,7 @@ w_settings_shell_command->buffer()->text(script_input->buffer()->text()); w_settings_shell_command->do_callback(); BREAK2: script_panel->hide();} - tooltip {open big code editor} xywh {296 395 24 22} labelsize 11 labelcolor 49 + tooltip {open the big code editor} xywh {296 395 24 22} labelsize 11 labelcolor 39 } } Fl_Check_Button {} { diff --git a/fluid/test.fll b/fluid/test.fll new file mode 100644 index 000000000..91dda2f0e --- /dev/null +++ b/fluid/test.fll @@ -0,0 +1,11 @@ +; FLTK preferences file format 1.0 +; vendor: layout.fluid.fltk.org +; application: unknown + +[.] + + +[./Layouts] + +current_suite:My Test +current_preset:1 diff --git a/fluid/widget_panel.txt b/fluid/widget_panel.txt new file mode 100644 index 000000000..7b7903d2c --- /dev/null +++ b/fluid/widget_panel.txt @@ -0,0 +1,182 @@ +# generated by Fast Light User Interface Designer (fluid) version 1.0400 +GUI +Label: +The label text for the widget.\012Use Ctrl-J for newlines. +The label style for the widget. +Image: +The active image for the widget. +Browse... +Click to choose the active image. +store image uncompressed as RGBA data\012or compressed in the original file format +bind the image to the widget, so it will be deleted automatically +Inactive: +The inactive image for the widget. +Browse... +Click to choose the inactive image. +store image uncompressed as RGBA data\012or compressed in the original file format +bind the image to the widget, so it will be deleted automatically +Alignment: +Clip +Clip the label to the inside of the widget. +Wrap +Wrap the label text. +@-1<- +Left-align the label. +@-1-> +Right-align the label. +@-18 +Top-align the label. +@-12 +Bottom-align the label. + Image Alignment +image over text +text over image +text next to image +image next to text +image is backdrop + Inside && Outside +top left +top +top right +left +center +right +bottom left +bottom +bottom right + Outside Alignment +left top +right top +left bottom +right bottom +@-3square +Show the label inside the widget. +Position: +X: +The X position of the widget as a number or formula.\012Formulas can be simple math, including the variables\012x, px, sx, cx, and i +Y: +The Y position of the widget as a number or formula.\012Formulas can be simple math, including the variables\012y, py, sy, cy, and i +Width: +The width of the widget as a number or formula.\012Formulas can be simple math, including the variables\012w, pw, sw, cw, and i +Height: +The height of the widget as a number or formula.\012Formulas can be simple math, including the variables\012h, ph, sh, ch, and i +Children: +When instantiating a widget class, the children can either be fixed in their original position, automatically be repositioned, or both repsositioned and resized to fit the container. +Fixed +Reposition +Resize +Flex Parent: +Size: +Fixed Width or Height for a horizontal or vertical Fl_Flex Parent. +fixed +If checked, the size of the widget stays fixed. +Values: +Size: +The size of the slider. +Minimum: +The minimum value of the widget. +Maximum: +The maximum value of the widget. +Step: +The resolution of the widget value. +Value: +The current widget value. +Margins: +Left: +Left margin in group. +Top: +Top margin in group. +Right: +Right margin in group. +Bottom: +Bottom margin in group. +Gap: +Gap between children. +Size Range: +Minimum Size: +The size of the slider. +The minimum value of the widget. +set +Maximum Size: +The maximum value of the widget. +The resolution of the widget value. +set +Shortcut: +The shortcut key for the widget.\012Use 'Backspace' key to clear. +X Class: +: +The X resource class. +Border +Add a border around the window. +Modal +Make the window modal. +Nonmodal +Make the window non-modal. +Attributes: +Visible +Show the widget. +Active +Activate the widget. +Resizable +Make the widget resizable. +Hotspot +Center the window under this widget. +Tooltip: +The tooltip text for the widget.\012Use Ctrl-J for newlines. +Style +Label Font: +The style of the label text. +The size of the label text. +Label Color +The color of the label text. +Box: +The \042up\042 box of the widget. +Color +The background color of the widget. +Down Box: +The \042down\042 box of the widget. +Select Color +The selection color of the widget. +Text Font: +The value text style. +The value text size. +Text Color +The value text color. +Compact +use compact box types for closely set buttons +C++ +Class: +The widget subclass. +The widget subtype. +Name: +The name of the widget. +Change member access attribute. +private +public +protected +Change widget accessibility. +local +global +Extra Code: +Extra initialization code for the widget. +Extra initialization code for the widget. +Extra initialization code for the widget. +Extra initialization code for the widget. +Comment: +Write a comment that will appear in the source code and in the widget tree overview. +Callback: +The callback function or code for the widget. Use the variable name 'o' to access the Widget pointer and 'v' to access the user value. +User Data: +The user data to pass into the callback code. +When +When to call the callback function. +Type: +The type of the user data. +void* +long +FL_WHEN_NEVER +Live &Resize +Create a live duplicate of the selected widgets to test resizing and menu behavior. +Hide &Overlays +Hide the widget overlay box. +Close |
