diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-10-22 12:33:38 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-10-22 12:33:49 +0200 |
| commit | 05ac0247cbd902f910fa89f8d4f4fde9de904b0f (patch) | |
| tree | 17a88d32364efc4c89d096696fd6b9fbc78c29d3 | |
| parent | 17f61f923b758f4a54c6c9b6a5cb43cae8430159 (diff) | |
FLUID: Moves grid settings into dynamic tab
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 21 | ||||
| -rw-r--r-- | fluid/shell_command.cxx | 2 | ||||
| -rw-r--r-- | fluid/widget_panel.cxx | 242 | ||||
| -rw-r--r-- | fluid/widget_panel.fl | 169 | ||||
| -rw-r--r-- | fluid/widget_panel.h | 20 |
5 files changed, 232 insertions, 222 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index f1e7e5170..ad46187e3 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -2237,17 +2237,6 @@ void flex_margin_group_cb(Fl_Group* g, void* v) { } } -void grid_margin_group_cb(Fl_Group* g, void* v) { - if (v == LOAD) { - if (current_widget->is_a(ID_Grid)) { - g->show(); - } else { - g->hide(); - } - propagate_load(g, v); - } -} - void size_range_group_cb(Fl_Group* g, void* v) { if (v == LOAD) { if (current_widget->is_a(ID_Window)) { @@ -2658,7 +2647,7 @@ static void load_panel() { } } } - if (current_widget && current_widget->parent->is_a(ID_Grid)) { + if (current_widget && current_widget->is_a(ID_Grid)) { if (widget_tab_grid->parent()!=widget_tabs) widget_tabs->add(widget_tab_grid); } else { @@ -2666,6 +2655,14 @@ static void load_panel() { widget_tabs_repo->add(widget_tab_grid); } } + if (current_widget && current_widget->parent && current_widget->parent->is_a(ID_Grid)) { + if (widget_tab_grid_child->parent()!=widget_tabs) + widget_tabs->add(widget_tab_grid_child); + } else { + if (widget_tab_grid_child->parent()==widget_tabs) { + widget_tabs_repo->add(widget_tab_grid_child); + } + } if (numselected) propagate_load(the_panel, LOAD); else diff --git a/fluid/shell_command.cxx b/fluid/shell_command.cxx index 118cf00d3..053f47178 100644 --- a/fluid/shell_command.cxx +++ b/fluid/shell_command.cxx @@ -85,6 +85,8 @@ build workspace document 1 end tell EOD + + powershell -c "$wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('^{ESCAPE}') */ #include "shell_command.h" diff --git a/fluid/widget_panel.cxx b/fluid/widget_panel.cxx index 84bcf75e4..8b5a7c680 100644 --- a/fluid/widget_panel.cxx +++ b/fluid/widget_panel.cxx @@ -116,7 +116,7 @@ Fl_Box *w_when_box=(Fl_Box *)0; Fl_Tabs *widget_tabs_repo=(Fl_Tabs *)0; -Fl_Group *widget_tab_grid=(Fl_Group *)0; +Fl_Group *widget_tab_grid_child=(Fl_Group *)0; Fluid_Coord_Input *widget_grid_row_input=(Fluid_Coord_Input *)0; @@ -138,6 +138,8 @@ Fl_Menu_Item menu_Align[] = { {0,0,0,0,0,0,0,0,0} }; +Fl_Group *widget_tab_grid=(Fl_Group *)0; + Fl_Button *wLiveMode=(Fl_Button *)0; Fl_Button *overlay_button=(Fl_Button *)0; @@ -539,100 +541,6 @@ sized to fit the container."); } // Fl_Box* o o->end(); } // Fl_Group* o - { // This group is only visible for Fl_Grid widgets - Fl_Group* o = new Fl_Group(95, 185, 300, 55, "Grid Margins:\n\n\nLayout:"); - o->labelfont(1); - o->labelsize(11); - o->callback((Fl_Callback*)grid_margin_group_cb); - o->align(Fl_Align(FL_ALIGN_LEFT)); - o->hide(); - { Fl_Value_Input* o = new Fl_Value_Input(95, 185, 45, 20, "Left:"); - o->tooltip("Left margin in group."); - o->labelsize(11); - o->maximum(1000); - o->step(1); - o->textsize(11); - o->callback((Fl_Callback*)grid_margin_left_cb); - o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - } // Fl_Value_Input* o - { Fl_Value_Input* o = new Fl_Value_Input(144, 185, 45, 20, "Top:"); - o->tooltip("Top margin in group."); - o->labelsize(11); - o->maximum(1000); - o->step(1); - o->textsize(11); - o->callback((Fl_Callback*)grid_margin_top_cb); - o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - } // Fl_Value_Input* o - { Fl_Value_Input* o = new Fl_Value_Input(193, 185, 45, 20, "Right:"); - o->tooltip("Right margin in group."); - o->labelsize(11); - o->maximum(1000); - o->step(1); - o->textsize(11); - o->callback((Fl_Callback*)grid_margin_right_cb); - o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - } // Fl_Value_Input* o - { Fl_Value_Input* o = new Fl_Value_Input(242, 185, 45, 20, "Bottom:"); - o->tooltip("Bottom margin in group."); - o->labelsize(11); - o->maximum(1000); - o->step(1); - o->textsize(11); - o->callback((Fl_Callback*)grid_margin_bottom_cb); - o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - } // Fl_Value_Input* o - { Fl_Value_Input* o = new Fl_Value_Input(291, 185, 45, 20, "RowGap:"); - o->tooltip("Gap between children."); - o->labelsize(11); - o->maximum(1000); - o->step(1); - o->textsize(11); - o->callback((Fl_Callback*)grid_row_gap_cb); - o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - } // Fl_Value_Input* o - { Fl_Value_Input* o = new Fl_Value_Input(340, 185, 45, 20, "ColGap:"); - o->tooltip("Gap between children."); - o->labelsize(11); - o->maximum(1000); - o->step(1); - o->textsize(11); - o->callback((Fl_Callback*)grid_col_gap_cb); - o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - } // Fl_Value_Input* o - { Fl_Box* o = new Fl_Box(395, 185, 0, 20); - Fl_Group::current()->resizable(o); - } // Fl_Box* o - { Fluid_Coord_Input* o = new Fluid_Coord_Input(95, 220, 55, 20, "Rows:"); - o->tooltip("Number of horizontal rows in the Grid group"); - o->box(FL_DOWN_BOX); - o->color(FL_BACKGROUND2_COLOR); - o->selection_color(FL_SELECTION_COLOR); - o->labeltype(FL_NORMAL_LABEL); - o->labelfont(0); - o->labelsize(11); - o->labelcolor(FL_FOREGROUND_COLOR); - o->textsize(11); - o->callback((Fl_Callback*)grid_rows_cb); - o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - o->when(FL_WHEN_RELEASE); - } // Fluid_Coord_Input* o - { Fluid_Coord_Input* o = new Fluid_Coord_Input(154, 220, 55, 20, "Columns:"); - o->tooltip("Number of vertical columns in the Grid group"); - o->box(FL_DOWN_BOX); - o->color(FL_BACKGROUND2_COLOR); - o->selection_color(FL_SELECTION_COLOR); - o->labeltype(FL_NORMAL_LABEL); - o->labelfont(0); - o->labelsize(11); - o->labelcolor(FL_FOREGROUND_COLOR); - o->textsize(11); - o->callback((Fl_Callback*)grid_cols_cb); - o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); - o->when(FL_WHEN_RELEASE); - } // Fluid_Coord_Input* o - o->end(); - } // Fl_Group* o { Fl_Group* o = new Fl_Group(95, 185, 300, 20, "Size Range:"); o->labelfont(1); o->labelsize(11); @@ -1138,14 +1046,20 @@ access the Widget pointer and \'v\' to access the user value."); o->end(); Fl_Group::current()->resizable(o); } // Fl_Group* o - { widget_tab_grid = new Fl_Group(10, 30, 400, 330, "Grid"); - widget_tab_grid->labelsize(11); - widget_tab_grid->callback((Fl_Callback*)propagate_load); + { widget_tab_grid_child = new Fl_Group(10, 30, 400, 330, "Grid Child"); + widget_tab_grid_child->labelsize(11); + widget_tab_grid_child->callback((Fl_Callback*)propagate_load); + widget_tab_grid_child->hide(); { Fl_Box* o = new Fl_Box(25, 43, 370, 28, "The Fl_Grid implementation in FLUID is still experimental!"); o->labelfont(1); o->labelsize(11); o->labelcolor((Fl_Color)1); } // Fl_Box* o + { Fl_Box* o = new Fl_Box(96, 74, 155, 20, "-- Widget --"); + o->labelfont(1); + o->labelsize(12); + o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE)); + } // Fl_Box* o { Fl_Group* o = new Fl_Group(96, 110, 314, 20, "Location:"); o->labelfont(1); o->labelsize(11); @@ -1191,11 +1105,6 @@ access the Widget pointer and \'v\' to access the user value."); } // Fl_Box* o o->end(); } // Fl_Group* o - { Fl_Box* o = new Fl_Box(96, 74, 155, 20, "-- Widget --"); - o->labelfont(1); - o->labelsize(12); - o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE)); - } // Fl_Box* o { Fl_Group* o = new Fl_Group(96, 145, 314, 20, "Cell Span:"); o->labelfont(1); o->labelsize(11); @@ -1270,17 +1179,22 @@ access the Widget pointer and \'v\' to access the user value."); } // Fluid_Coord_Input* o o->end(); } // Fl_Group* o - { Fl_Box* o = new Fl_Box(96, 214, 155, 20, "-- Grid --"); + widget_tab_grid_child->end(); + } // Fl_Group* widget_tab_grid_child + { widget_tab_grid = new Fl_Group(10, 30, 400, 330, "Grid"); + widget_tab_grid->labelsize(11); + widget_tab_grid->callback((Fl_Callback*)propagate_load); + { Fl_Box* o = new Fl_Box(25, 43, 370, 28, "The Fl_Grid implementation in FLUID is still experimental!"); o->labelfont(1); - o->labelsize(12); - o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE)); + o->labelsize(11); + o->labelcolor((Fl_Color)1); } // Fl_Box* o - { Fl_Group* o = new Fl_Group(96, 250, 314, 20, "Row:"); + { Fl_Group* o = new Fl_Group(96, 170, 314, 20, "Row:"); o->labelfont(1); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->align(Fl_Align(FL_ALIGN_LEFT)); - { Fluid_Coord_Input* o = new Fluid_Coord_Input(96, 250, 55, 20, "Index"); + { Fluid_Coord_Input* o = new Fluid_Coord_Input(96, 170, 55, 20, "Index"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -1293,7 +1207,7 @@ access the Widget pointer and \'v\' to access the user value."); o->when(FL_WHEN_RELEASE); o->deactivate(); } // Fluid_Coord_Input* o - { Fluid_Coord_Input* o = new Fluid_Coord_Input(156, 250, 55, 20, "Height:"); + { Fluid_Coord_Input* o = new Fluid_Coord_Input(156, 170, 55, 20, "Height:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -1306,7 +1220,7 @@ access the Widget pointer and \'v\' to access the user value."); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); } // Fluid_Coord_Input* o - { Fluid_Coord_Input* o = new Fluid_Coord_Input(216, 250, 55, 20, "Weight:"); + { Fluid_Coord_Input* o = new Fluid_Coord_Input(216, 170, 55, 20, "Weight:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -1319,7 +1233,7 @@ access the Widget pointer and \'v\' to access the user value."); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); } // Fluid_Coord_Input* o - { Fluid_Coord_Input* o = new Fluid_Coord_Input(276, 250, 55, 20, "Gap:"); + { Fluid_Coord_Input* o = new Fluid_Coord_Input(276, 170, 55, 20, "Gap:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -1332,18 +1246,18 @@ access the Widget pointer and \'v\' to access the user value."); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); } // Fluid_Coord_Input* o - { Fl_Box* o = new Fl_Box(400, 250, 1, 20); + { Fl_Box* o = new Fl_Box(400, 170, 1, 20); o->hide(); Fl_Group::current()->resizable(o); } // Fl_Box* o o->end(); } // Fl_Group* o - { Fl_Group* o = new Fl_Group(96, 285, 314, 20, "Column:"); + { Fl_Group* o = new Fl_Group(96, 205, 314, 20, "Column:"); o->labelfont(1); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->align(Fl_Align(FL_ALIGN_LEFT)); - { Fluid_Coord_Input* o = new Fluid_Coord_Input(96, 285, 55, 20, "Index"); + { Fluid_Coord_Input* o = new Fluid_Coord_Input(96, 205, 55, 20, "Index"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -1356,7 +1270,7 @@ access the Widget pointer and \'v\' to access the user value."); o->when(FL_WHEN_RELEASE); o->deactivate(); } // Fluid_Coord_Input* o - { Fluid_Coord_Input* o = new Fluid_Coord_Input(156, 285, 55, 20, "Width:"); + { Fluid_Coord_Input* o = new Fluid_Coord_Input(156, 205, 55, 20, "Width:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -1369,7 +1283,7 @@ access the Widget pointer and \'v\' to access the user value."); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); } // Fluid_Coord_Input* o - { Fluid_Coord_Input* o = new Fluid_Coord_Input(216, 285, 55, 20, "Weight:"); + { Fluid_Coord_Input* o = new Fluid_Coord_Input(216, 205, 55, 20, "Weight:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -1382,7 +1296,7 @@ access the Widget pointer and \'v\' to access the user value."); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); } // Fluid_Coord_Input* o - { Fluid_Coord_Input* o = new Fluid_Coord_Input(276, 285, 55, 20, "Gap:"); + { Fluid_Coord_Input* o = new Fluid_Coord_Input(276, 205, 55, 20, "Gap:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -1395,12 +1309,104 @@ access the Widget pointer and \'v\' to access the user value."); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); } // Fluid_Coord_Input* o - { Fl_Box* o = new Fl_Box(400, 285, 1, 20); + { Fl_Box* o = new Fl_Box(400, 205, 1, 20); o->hide(); Fl_Group::current()->resizable(o); } // Fl_Box* o o->end(); } // Fl_Group* o + { Fl_Group* o = new Fl_Group(96, 97, 300, 55, "Grid Margins:\n\n\nLayout:"); + o->labelfont(1); + o->labelsize(11); + o->callback((Fl_Callback*)propagate_load); + o->align(Fl_Align(FL_ALIGN_LEFT)); + { Fl_Value_Input* o = new Fl_Value_Input(96, 97, 45, 20, "Left:"); + o->tooltip("Left margin in group."); + o->labelsize(11); + o->maximum(1000); + o->step(1); + o->textsize(11); + o->callback((Fl_Callback*)grid_margin_left_cb); + o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); + } // Fl_Value_Input* o + { Fl_Value_Input* o = new Fl_Value_Input(145, 97, 45, 20, "Top:"); + o->tooltip("Top margin in group."); + o->labelsize(11); + o->maximum(1000); + o->step(1); + o->textsize(11); + o->callback((Fl_Callback*)grid_margin_top_cb); + o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); + } // Fl_Value_Input* o + { Fl_Value_Input* o = new Fl_Value_Input(194, 97, 45, 20, "Right:"); + o->tooltip("Right margin in group."); + o->labelsize(11); + o->maximum(1000); + o->step(1); + o->textsize(11); + o->callback((Fl_Callback*)grid_margin_right_cb); + o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); + } // Fl_Value_Input* o + { Fl_Value_Input* o = new Fl_Value_Input(243, 97, 45, 20, "Bottom:"); + o->tooltip("Bottom margin in group."); + o->labelsize(11); + o->maximum(1000); + o->step(1); + o->textsize(11); + o->callback((Fl_Callback*)grid_margin_bottom_cb); + o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); + } // Fl_Value_Input* o + { Fl_Value_Input* o = new Fl_Value_Input(292, 97, 45, 20, "RowGap:"); + o->tooltip("Gap between children."); + o->labelsize(11); + o->maximum(1000); + o->step(1); + o->textsize(11); + o->callback((Fl_Callback*)grid_row_gap_cb); + o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); + } // Fl_Value_Input* o + { Fl_Value_Input* o = new Fl_Value_Input(341, 97, 45, 20, "ColGap:"); + o->tooltip("Gap between children."); + o->labelsize(11); + o->maximum(1000); + o->step(1); + o->textsize(11); + o->callback((Fl_Callback*)grid_col_gap_cb); + o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); + } // Fl_Value_Input* o + { Fl_Box* o = new Fl_Box(396, 97, 0, 20); + Fl_Group::current()->resizable(o); + } // Fl_Box* o + { Fluid_Coord_Input* o = new Fluid_Coord_Input(96, 132, 55, 20, "Rows:"); + o->tooltip("Number of horizontal rows in the Grid group"); + o->box(FL_DOWN_BOX); + o->color(FL_BACKGROUND2_COLOR); + o->selection_color(FL_SELECTION_COLOR); + o->labeltype(FL_NORMAL_LABEL); + o->labelfont(0); + o->labelsize(11); + o->labelcolor(FL_FOREGROUND_COLOR); + o->textsize(11); + o->callback((Fl_Callback*)grid_rows_cb); + o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); + o->when(FL_WHEN_RELEASE); + } // Fluid_Coord_Input* o + { Fluid_Coord_Input* o = new Fluid_Coord_Input(155, 132, 55, 20, "Columns:"); + o->tooltip("Number of vertical columns in the Grid group"); + o->box(FL_DOWN_BOX); + o->color(FL_BACKGROUND2_COLOR); + o->selection_color(FL_SELECTION_COLOR); + o->labeltype(FL_NORMAL_LABEL); + o->labelfont(0); + o->labelsize(11); + o->labelcolor(FL_FOREGROUND_COLOR); + o->textsize(11); + o->callback((Fl_Callback*)grid_cols_cb); + o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); + o->when(FL_WHEN_RELEASE); + } // Fluid_Coord_Input* o + o->end(); + } // Fl_Group* o widget_tab_grid->end(); } // Fl_Group* widget_tab_grid o->hide(); diff --git a/fluid/widget_panel.fl b/fluid/widget_panel.fl index 3b8b659d3..f8876a995 100644 --- a/fluid/widget_panel.fl +++ b/fluid/widget_panel.fl @@ -38,13 +38,13 @@ Function {make_widget_panel()} { code0 {o->size_range(o->w(), o->h());} size_range {420 400 0 0} visible } { Fl_Tabs widget_tabs { - callback {propagate_load((Fl_Group *)o,v);} + callback {propagate_load((Fl_Group *)o,v);} open xywh {10 10 400 350} selection_color 12 labelsize 11 labelcolor 7 when 0 resizable code0 {o->show();} } { Fl_Group {} { label GUI - callback propagate_load open selected + callback propagate_load open xywh {10 30 400 330} labelsize 11 when 0 resizable } { Fl_Group {} { @@ -435,61 +435,6 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11 } } Fl_Group {} { - label {Grid Margins: - - -Layout:} - callback grid_margin_group_cb - comment {This group is only visible for Fl_Grid widgets} open - xywh {95 185 300 55} labelfont 1 labelsize 11 align 4 hide - } { - Fl_Value_Input {} { - label {Left:} - callback grid_margin_left_cb - tooltip {Left margin in group.} xywh {95 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 - } - Fl_Value_Input {} { - label {Top:} - callback grid_margin_top_cb - tooltip {Top margin in group.} xywh {144 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 - } - Fl_Value_Input {} { - label {Right:} - callback grid_margin_right_cb - tooltip {Right margin in group.} xywh {193 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 - } - Fl_Value_Input {} { - label {Bottom:} - callback grid_margin_bottom_cb - tooltip {Bottom margin in group.} xywh {242 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 - } - Fl_Value_Input {} { - label {RowGap:} - callback grid_row_gap_cb - tooltip {Gap between children.} xywh {291 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 - } - Fl_Value_Input {} { - label {ColGap:} - callback grid_col_gap_cb - tooltip {Gap between children.} xywh {340 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 - } - Fl_Box {} { - xywh {395 185 0 20} resizable - } - Fl_Input {} { - label {Rows:} - callback grid_rows_cb - tooltip {Number of horizontal rows in the Grid group} xywh {95 220 55 20} labelsize 11 align 5 textsize 11 - class Fluid_Coord_Input - } - Fl_Input {} { - label {Columns:} - callback grid_cols_cb - tooltip {Number of vertical columns in the Grid group} xywh {154 220 55 20} labelsize 11 align 5 textsize 11 - class Fluid_Coord_Input - } - } - Fl_Group {} { label {Size Range:} callback size_range_group_cb open xywh {95 185 300 20} labelfont 1 labelsize 11 align 4 hide @@ -874,22 +819,26 @@ wCallback->do_callback(wCallback, v);} open } } } - Fl_Tabs widget_tabs_repo { + Fl_Tabs widget_tabs_repo {open selected xywh {10 10 400 350} hide code0 {o->hide();} } { Fl_Group {} {open xywh {10 30 400 330} hide resizable } {} - Fl_Group widget_tab_grid { - label Grid + Fl_Group widget_tab_grid_child { + label {Grid Child} callback propagate_load open - xywh {10 30 400 330} labelsize 11 + xywh {10 30 400 330} labelsize 11 hide } { Fl_Box {} { label {The Fl_Grid implementation in FLUID is still experimental!} xywh {25 43 370 28} labelfont 1 labelsize 11 labelcolor 1 } + Fl_Box {} { + label {-- Widget --} + xywh {96 74 155 20} labelfont 1 labelsize 12 align 20 + } Fl_Group {} { label {Location:} callback propagate_load open @@ -909,7 +858,7 @@ wCallback->do_callback(wCallback, v);} open } Fl_Choice {} { label {Align:} - callback grid_align_cb open + callback grid_align_cb xywh {215 110 185 20} down_box BORDER_BOX labelsize 11 align 5 textsize 11 } { MenuItem {} { @@ -977,13 +926,9 @@ wCallback->do_callback(wCallback, v);} open xywh {400 110 1 20} hide resizable } } - Fl_Box {} { - label {-- Widget --} - xywh {96 74 155 20} labelfont 1 labelsize 12 align 20 - } Fl_Group {} { label {Cell Span:} - callback propagate_load open + callback propagate_load xywh {96 145 314 20} labelfont 1 labelsize 11 align 4 } { Fl_Box {} { @@ -1004,7 +949,7 @@ wCallback->do_callback(wCallback, v);} open } Fl_Group {} { label {Size:} - callback propagate_load open + callback propagate_load xywh {96 180 314 20} labelfont 1 labelsize 11 align 4 } { Fl_Box {} { @@ -1023,72 +968,132 @@ wCallback->do_callback(wCallback, v);} open class Fluid_Coord_Input } } + } + Fl_Group widget_tab_grid { + label Grid + callback propagate_load open + xywh {10 30 400 330} labelsize 11 + } { Fl_Box {} { - label {-- Grid --} - xywh {96 214 155 20} labelfont 1 labelsize 12 align 20 + label {The Fl_Grid implementation in FLUID is still experimental!} + xywh {25 43 370 28} labelfont 1 labelsize 11 labelcolor 1 } Fl_Group {} { label {Row:} callback propagate_load open - xywh {96 250 314 20} labelfont 1 labelsize 11 align 4 + xywh {96 170 314 20} labelfont 1 labelsize 11 align 4 } { Fl_Input {} { label Index - xywh {96 250 55 20} labelsize 11 align 5 textsize 11 deactivate + xywh {96 170 55 20} labelsize 11 align 5 textsize 11 deactivate class Fluid_Coord_Input } Fl_Input {} { label {Height:} callback grid_row_height - xywh {156 250 55 20} labelsize 11 align 5 textsize 11 + xywh {156 170 55 20} labelsize 11 align 5 textsize 11 class Fluid_Coord_Input } Fl_Input {} { label {Weight:} callback grid_row_weight - xywh {216 250 55 20} labelsize 11 align 5 textsize 11 + xywh {216 170 55 20} labelsize 11 align 5 textsize 11 class Fluid_Coord_Input } Fl_Input {} { label {Gap:} callback grid_row_gap - xywh {276 250 55 20} labelsize 11 align 5 textsize 11 + xywh {276 170 55 20} labelsize 11 align 5 textsize 11 class Fluid_Coord_Input } Fl_Box {} { - xywh {400 250 1 20} hide resizable + xywh {400 170 1 20} hide resizable } } Fl_Group {} { label {Column:} callback propagate_load open - xywh {96 285 314 20} labelfont 1 labelsize 11 align 4 + xywh {96 205 314 20} labelfont 1 labelsize 11 align 4 } { Fl_Input {} { label Index - xywh {96 285 55 20} labelsize 11 align 5 textsize 11 deactivate + xywh {96 205 55 20} labelsize 11 align 5 textsize 11 deactivate class Fluid_Coord_Input } Fl_Input {} { label {Width:} callback grid_col_width - xywh {156 285 55 20} labelsize 11 align 5 textsize 11 + xywh {156 205 55 20} labelsize 11 align 5 textsize 11 class Fluid_Coord_Input } Fl_Input {} { label {Weight:} callback grid_col_weight - xywh {216 285 55 20} labelsize 11 align 5 textsize 11 + xywh {216 205 55 20} labelsize 11 align 5 textsize 11 class Fluid_Coord_Input } Fl_Input {} { label {Gap:} callback grid_col_gap - xywh {276 285 55 20} labelsize 11 align 5 textsize 11 + xywh {276 205 55 20} labelsize 11 align 5 textsize 11 class Fluid_Coord_Input } Fl_Box {} { - xywh {400 285 1 20} hide resizable + xywh {400 205 1 20} hide resizable + } + } + Fl_Group {} { + label {Grid Margins: + + +Layout:} + callback propagate_load open + xywh {96 97 300 55} labelfont 1 labelsize 11 align 4 + } { + Fl_Value_Input {} { + label {Left:} + callback grid_margin_left_cb + tooltip {Left margin in group.} xywh {96 97 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 + } + Fl_Value_Input {} { + label {Top:} + callback grid_margin_top_cb + tooltip {Top margin in group.} xywh {145 97 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 + } + Fl_Value_Input {} { + label {Right:} + callback grid_margin_right_cb + tooltip {Right margin in group.} xywh {194 97 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 + } + Fl_Value_Input {} { + label {Bottom:} + callback grid_margin_bottom_cb + tooltip {Bottom margin in group.} xywh {243 97 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 + } + Fl_Value_Input {} { + label {RowGap:} + callback grid_row_gap_cb + tooltip {Gap between children.} xywh {292 97 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 + } + Fl_Value_Input {} { + label {ColGap:} + callback grid_col_gap_cb + tooltip {Gap between children.} xywh {341 97 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11 + } + Fl_Box {} { + xywh {396 97 0 20} resizable + } + Fl_Input {} { + label {Rows:} + callback grid_rows_cb + tooltip {Number of horizontal rows in the Grid group} xywh {96 132 55 20} labelsize 11 align 5 textsize 11 + class Fluid_Coord_Input + } + Fl_Input {} { + label {Columns:} + callback grid_cols_cb + tooltip {Number of vertical columns in the Grid group} xywh {155 132 55 20} labelsize 11 align 5 textsize 11 + class Fluid_Coord_Input } } } diff --git a/fluid/widget_panel.h b/fluid/widget_panel.h index faf8c84ca..723a73b37 100644 --- a/fluid/widget_panel.h +++ b/fluid/widget_panel.h @@ -73,15 +73,6 @@ extern void flex_margin_top_cb(Fl_Value_Input*, void*); extern void flex_margin_right_cb(Fl_Value_Input*, void*); extern void flex_margin_bottom_cb(Fl_Value_Input*, void*); extern void flex_margin_gap_cb(Fl_Value_Input*, void*); -extern void grid_margin_group_cb(Fl_Group*, void*); -extern void grid_margin_left_cb(Fl_Value_Input*, void*); -extern void grid_margin_top_cb(Fl_Value_Input*, void*); -extern void grid_margin_right_cb(Fl_Value_Input*, void*); -extern void grid_margin_bottom_cb(Fl_Value_Input*, void*); -extern void grid_row_gap_cb(Fl_Value_Input*, void*); -extern void grid_col_gap_cb(Fl_Value_Input*, void*); -extern void grid_rows_cb(Fluid_Coord_Input*, void*); -extern void grid_cols_cb(Fluid_Coord_Input*, void*); extern void size_range_group_cb(Fl_Group*, void*); extern void min_w_cb(Fl_Value_Input*, void*); extern void min_h_cb(Fl_Value_Input*, void*); @@ -144,7 +135,7 @@ extern void when_cb(Fl_Menu_Button*, void*); extern void user_data_type_cb(Fl_Input_Choice*, void*); extern Fl_Box *w_when_box; extern Fl_Tabs *widget_tabs_repo; -extern Fl_Group *widget_tab_grid; +extern Fl_Group *widget_tab_grid_child; extern void grid_set_row_cb(Fluid_Coord_Input*, void*); extern Fluid_Coord_Input *widget_grid_row_input; extern void grid_set_col_cb(Fluid_Coord_Input*, void*); @@ -154,12 +145,21 @@ extern void grid_set_rowspan_cb(Fluid_Coord_Input*, void*); extern void grid_set_colspan_cb(Fluid_Coord_Input*, void*); extern void grid_set_min_wdt_cb(Fluid_Coord_Input*, void*); extern void grid_set_min_hgt_cb(Fluid_Coord_Input*, void*); +extern Fl_Group *widget_tab_grid; extern void grid_row_height(Fluid_Coord_Input*, void*); extern void grid_row_weight(Fluid_Coord_Input*, void*); extern void grid_row_gap(Fluid_Coord_Input*, void*); extern void grid_col_width(Fluid_Coord_Input*, void*); extern void grid_col_weight(Fluid_Coord_Input*, void*); extern void grid_col_gap(Fluid_Coord_Input*, void*); +extern void grid_margin_left_cb(Fl_Value_Input*, void*); +extern void grid_margin_top_cb(Fl_Value_Input*, void*); +extern void grid_margin_right_cb(Fl_Value_Input*, void*); +extern void grid_margin_bottom_cb(Fl_Value_Input*, void*); +extern void grid_row_gap_cb(Fl_Value_Input*, void*); +extern void grid_col_gap_cb(Fl_Value_Input*, void*); +extern void grid_rows_cb(Fluid_Coord_Input*, void*); +extern void grid_cols_cb(Fluid_Coord_Input*, void*); extern void live_mode_cb(Fl_Button*, void*); extern Fl_Button *wLiveMode; extern void overlay_cb(Fl_Button*, void*); |
