summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--fluid/widget_panel.cxx98
-rw-r--r--fluid/widget_panel.fl180
-rw-r--r--fluid/widget_panel.h8
4 files changed, 145 insertions, 143 deletions
diff --git a/CHANGES b/CHANGES
index a06c307c3..91a4ad0bd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
CHANGES IN FLTK 1.1.3
- Documentation updates.
+ - The FLUID widget panel wasn't sorted, so keyboard
+ navigation was strange.
- Fl_Scroll didn't compute the location of labels to the
right or below when determining the area to erase.
- Added backward-compatibility macro for
diff --git a/fluid/widget_panel.cxx b/fluid/widget_panel.cxx
index e42a63fb6..fa3ffd3ef 100644
--- a/fluid/widget_panel.cxx
+++ b/fluid/widget_panel.cxx
@@ -65,38 +65,6 @@ Fl_Double_Window* make_widget_panel() {
}
o->end();
}
- { Fl_Value_Input* o = new Fl_Value_Input(95, 150, 60, 20, "X:");
- o->tooltip("The X position of the widget.");
- o->labelsize(10);
- o->maximum(2048);
- o->step(1);
- o->callback((Fl_Callback*)x_cb);
- o->align(FL_ALIGN_TOP_LEFT);
- }
- { Fl_Value_Input* o = new Fl_Value_Input(155, 150, 60, 20, "Y:");
- o->tooltip("The Y position of the widget.");
- o->labelsize(10);
- o->maximum(2048);
- o->step(1);
- o->callback((Fl_Callback*)y_cb);
- o->align(FL_ALIGN_TOP_LEFT);
- }
- { Fl_Value_Input* o = new Fl_Value_Input(215, 150, 60, 20, "Width:");
- o->tooltip("The width of the widget.");
- o->labelsize(10);
- o->maximum(2048);
- o->step(1);
- o->callback((Fl_Callback*)w_cb);
- o->align(FL_ALIGN_TOP_LEFT);
- }
- { Fl_Value_Input* o = new Fl_Value_Input(275, 150, 60, 20, "Height:");
- o->tooltip("The height of the widget.");
- o->labelsize(10);
- o->maximum(2048);
- o->step(1);
- o->callback((Fl_Callback*)h_cb);
- o->align(FL_ALIGN_TOP_LEFT);
- }
{ Fl_Group* o = new Fl_Group(95, 115, 300, 21, "Alignment:");
o->callback((Fl_Callback*)propagate_load);
o->align(FL_ALIGN_LEFT);
@@ -153,9 +121,41 @@ Fl_Double_Window* make_widget_panel() {
}
o->end();
}
+ { Fl_Value_Input* o = new Fl_Value_Input(95, 150, 60, 20, "X:");
+ o->tooltip("The X position of the widget.");
+ o->labelsize(10);
+ o->maximum(2048);
+ o->step(1);
+ o->callback((Fl_Callback*)x_cb);
+ o->align(FL_ALIGN_TOP_LEFT);
+ }
{ Fl_Box* o = new Fl_Box(95, 150, 0, 20, "Position:");
o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
}
+ { Fl_Value_Input* o = new Fl_Value_Input(155, 150, 60, 20, "Y:");
+ o->tooltip("The Y position of the widget.");
+ o->labelsize(10);
+ o->maximum(2048);
+ o->step(1);
+ o->callback((Fl_Callback*)y_cb);
+ o->align(FL_ALIGN_TOP_LEFT);
+ }
+ { Fl_Value_Input* o = new Fl_Value_Input(215, 150, 60, 20, "Width:");
+ o->tooltip("The width of the widget.");
+ o->labelsize(10);
+ o->maximum(2048);
+ o->step(1);
+ o->callback((Fl_Callback*)w_cb);
+ o->align(FL_ALIGN_TOP_LEFT);
+ }
+ { Fl_Value_Input* o = new Fl_Value_Input(275, 150, 60, 20, "Height:");
+ o->tooltip("The height of the widget.");
+ o->labelsize(10);
+ o->maximum(2048);
+ o->step(1);
+ o->callback((Fl_Callback*)h_cb);
+ o->align(FL_ALIGN_TOP_LEFT);
+ }
{ Fl_Box* o = new Fl_Box(95, 185, 0, 20, "Values:");
o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
}
@@ -206,6 +206,11 @@ Fl_Double_Window* make_widget_panel() {
}
{ Fl_Group* o = new Fl_Group(95, 235, 300, 20);
o->callback((Fl_Callback*)propagate_load);
+ { Fl_Input* o = new Fl_Input(95, 235, 115, 20, "X Class:");
+ o->tooltip("The X resource class.");
+ o->callback((Fl_Callback*)xclass_cb);
+ Fl_Group::current()->resizable(o);
+ }
{ Fl_Light_Button* o = new Fl_Light_Button(210, 235, 60, 20, "Border");
o->tooltip("Add a border around the window.");
o->selection_color(1);
@@ -225,11 +230,6 @@ Fl_Double_Window* make_widget_panel() {
o->callback((Fl_Callback*)non_modal_cb);
o->align(132|FL_ALIGN_INSIDE);
}
- { Fl_Input* o = new Fl_Input(95, 235, 115, 20, "X Class:");
- o->tooltip("The X resource class.");
- o->callback((Fl_Callback*)xclass_cb);
- Fl_Group::current()->resizable(o);
- }
o->end();
}
{ Fl_Group* o = new Fl_Group(95, 260, 301, 20);
@@ -240,6 +240,9 @@ Fl_Double_Window* make_widget_panel() {
o->labelsize(10);
o->callback((Fl_Callback*)visible_cb);
}
+ { Fl_Box* o = new Fl_Box(95, 260, 0, 20, "Attributes:");
+ o->align(FL_ALIGN_LEFT);
+ }
{ Fl_Light_Button* o = new Fl_Light_Button(165, 260, 70, 20, "Active");
o->tooltip("Activate the widget.");
o->selection_color(1);
@@ -263,9 +266,6 @@ Fl_Double_Window* make_widget_panel() {
{ Fl_Box* o = new Fl_Box(376, 260, 20, 20);
Fl_Group::current()->resizable(o);
}
- { Fl_Box* o = new Fl_Box(95, 260, 0, 20, "Attributes:");
- o->align(FL_ALIGN_LEFT);
- }
o->end();
}
{ Fl_Input* o = new Fl_Input(95, 285, 300, 20, "Tooltip:");
@@ -457,10 +457,6 @@ Fl_Double_Window* make_widget_panel() {
o->end();
Fl_Group::current()->resizable(o);
}
- { Fl_Box* o = new Fl_Box(95, 325, 100, 0, "label");
- o->hide();
- o->deactivate();
- }
{ Fl_Group* o = new Fl_Group(100, 270, 295, 45);
o->callback((Fl_Callback*)propagate_load);
{ Fl_Group* o = new Fl_Group(100, 270, 295, 20);
@@ -499,12 +495,19 @@ Fl_Double_Window* make_widget_panel() {
}
o->end();
}
+ { Fl_Box* o = new Fl_Box(95, 325, 100, 0, "label");
+ o->hide();
+ o->deactivate();
+ }
o->end();
}
o->end();
Fl_Group::current()->resizable(o);
}
{ Fl_Group* o = new Fl_Group(10, 335, 395, 25);
+ { Fl_Box* o = new Fl_Box(12, 335, 12, 25);
+ Fl_Group::current()->resizable(o);
+ }
{ Fl_Button* o = new Fl_Button(50, 335, 100, 25, "No &Overlay");
o->tooltip("Hide the widget overlay box.");
o->labelcolor(1);
@@ -513,14 +516,11 @@ Fl_Double_Window* make_widget_panel() {
{ Fl_Button* o = new Fl_Button(155, 335, 80, 25, "Revert");
o->callback((Fl_Callback*)revert_cb);
}
- { Fl_Button* o = new Fl_Button(325, 335, 80, 25, "Cancel");
- o->callback((Fl_Callback*)cancel_cb);
- }
{ Fl_Return_Button* o = new Fl_Return_Button(240, 335, 80, 25, "OK");
o->callback((Fl_Callback*)ok_cb);
}
- { Fl_Box* o = new Fl_Box(12, 335, 12, 25);
- Fl_Group::current()->resizable(o);
+ { Fl_Button* o = new Fl_Button(325, 335, 80, 25, "Cancel");
+ o->callback((Fl_Callback*)cancel_cb);
}
o->end();
}
diff --git a/fluid/widget_panel.fl b/fluid/widget_panel.fl
index a875c5b01..ccefc8742 100644
--- a/fluid/widget_panel.fl
+++ b/fluid/widget_panel.fl
@@ -5,7 +5,7 @@ code_name {.cxx}
Function {make_widget_panel()} {open
} {
Fl_Window {} {open
- xywh {366 151 415 370} type Double resizable hotspot visible
+ xywh {851 210 415 370} type Double resizable hotspot visible
} {
Fl_Tabs {} {
callback {propagate_load((Fl_Group *)o,v);} open
@@ -13,240 +13,240 @@ Function {make_widget_panel()} {open
} {
Fl_Group {} {
label GUI
- callback propagate_load
+ callback propagate_load open
xywh {10 30 395 295} when 0 hide resizable
} {
Fl_Group {} {
- callback propagate_load open
+ callback propagate_load open selected
xywh {95 40 301 280} resizable
} {
Fl_Group {} {
- callback propagate_load
+ callback propagate_load open selected
xywh {95 40 300 20}
} {
Fl_Input {} {
label {Label:}
- callback label_cb
+ callback label_cb selected
tooltip {The label text for the widget.} xywh {95 40 195 20} when 1 resizable
}
Fl_Choice {} {
- callback labeltype_cb open
+ callback labeltype_cb open selected
tooltip {The label style for the widget.} xywh {290 40 105 20} box THIN_UP_BOX down_box BORDER_BOX
code0 {extern Fl_Menu_Item labeltypemenu[];}
code1 {o->menu(labeltypemenu);}
} {}
}
Fl_Group {} {
- callback propagate_load
+ callback propagate_load open selected
xywh {95 65 300 20}
} {
Fl_Input {} {
label {Image:}
- callback image_cb
+ callback image_cb selected
tooltip {The active image for the widget.} xywh {95 65 195 20} resizable
}
Fl_Button {} {
label {Browse...}
- callback image_browse_cb
+ callback image_browse_cb selected
tooltip {Click to choose the active image.} xywh {290 65 105 20}
}
}
Fl_Group {} {
- callback propagate_load
+ callback propagate_load open selected
xywh {95 90 300 20}
} {
Fl_Input {} {
label {Inactive:}
- callback inactive_cb
+ callback inactive_cb selected
tooltip {The inactive image for the widget.} xywh {95 90 195 20} resizable
}
Fl_Button {} {
label {Browse...}
- callback inactive_browse_cb
+ callback inactive_browse_cb selected
tooltip {Click to choose the inactive image.} xywh {290 90 105 20}
}
}
- Fl_Value_Input {} {
- label {X:}
- callback x_cb
- tooltip {The X position of the widget.} xywh {95 150 60 20} labelsize 10 align 5 maximum 2048 step 1
- }
- Fl_Value_Input {} {
- label {Y:}
- callback y_cb
- tooltip {The Y position of the widget.} xywh {155 150 60 20} labelsize 10 align 5 maximum 2048 step 1
- }
- Fl_Value_Input {} {
- label {Width:}
- callback w_cb
- tooltip {The width of the widget.} xywh {215 150 60 20} labelsize 10 align 5 maximum 2048 step 1
- }
- Fl_Value_Input {} {
- label {Height:}
- callback h_cb
- tooltip {The height of the widget.} xywh {275 150 60 20} labelsize 10 align 5 maximum 2048 step 1
- }
Fl_Group {} {
label {Alignment:}
- callback propagate_load
+ callback propagate_load open selected
xywh {95 115 300 21} align 4
} {
Fl_Button {} {
label clip
user_data FL_ALIGN_CLIP
- callback align_cb
+ callback align_cb selected
tooltip {Clip the label to the inside of the widget.} xywh {95 115 40 20} type Toggle labelsize 8
}
Fl_Button {} {
label wrap
user_data FL_ALIGN_WRAP
- callback align_cb
+ callback align_cb selected
tooltip {Wrap the label text.} xywh {135 115 40 20} type Toggle labelsize 8
}
Fl_Button {} {
label {text
image}
user_data FL_ALIGN_TEXT_OVER_IMAGE
- callback align_cb
+ callback align_cb selected
tooltip {Show the label text over the image.} xywh {175 115 55 20} type Toggle labelsize 8
}
Fl_Button {} {
label {@-1<-}
user_data FL_ALIGN_LEFT
- callback align_cb
+ callback align_cb selected
tooltip {Left-align the label.} xywh {295 115 20 20} type Toggle labelcolor 8
}
Fl_Button {} {
label {@-1->}
user_data FL_ALIGN_RIGHT
- callback align_cb
+ callback align_cb selected
tooltip {Right-align the label.} xywh {315 115 20 20} type Toggle labelcolor 8
}
Fl_Button {} {
label {@-18}
user_data FL_ALIGN_TOP
- callback align_cb
+ callback align_cb selected
tooltip {Top-align the label.} xywh {335 115 20 20} type Toggle labelcolor 8
}
Fl_Button {} {
label {@-12}
user_data FL_ALIGN_BOTTOM
- callback align_cb
+ callback align_cb selected
tooltip {Bottom-align the label.} xywh {355 115 20 20} type Toggle labelcolor 8
}
Fl_Button {} {
label {@-3square}
user_data FL_ALIGN_INSIDE
- callback align_cb
+ callback align_cb selected
tooltip {Show the label inside the widget.} xywh {375 115 20 20} type Toggle labelcolor 8
}
- Fl_Box {} {
+ Fl_Box {} {selected
xywh {256 116 20 20} resizable
}
}
+ Fl_Value_Input {} {
+ label {X:}
+ callback x_cb selected
+ tooltip {The X position of the widget.} xywh {95 150 60 20} labelsize 10 align 5 maximum 2048 step 1
+ }
Fl_Box {} {
- label {Position:}
+ label {Position:} selected
xywh {95 150 0 20} align 24
}
+ Fl_Value_Input {} {
+ label {Y:}
+ callback y_cb selected
+ tooltip {The Y position of the widget.} xywh {155 150 60 20} labelsize 10 align 5 maximum 2048 step 1
+ }
+ Fl_Value_Input {} {
+ label {Width:}
+ callback w_cb selected
+ tooltip {The width of the widget.} xywh {215 150 60 20} labelsize 10 align 5 maximum 2048 step 1
+ }
+ Fl_Value_Input {} {
+ label {Height:}
+ callback h_cb selected
+ tooltip {The height of the widget.} xywh {275 150 60 20} labelsize 10 align 5 maximum 2048 step 1
+ }
Fl_Box {} {
- label {Values:}
+ label {Values:} selected
xywh {95 185 0 20} align 24
}
Fl_Value_Input {} {
label {Size:}
- callback slider_size_cb
+ callback slider_size_cb selected
tooltip {The size of the slider.} xywh {95 185 60 20} labelsize 10 align 5 step 0.010101
}
Fl_Value_Input {} {
label {Minimum:}
- callback min_cb
+ callback min_cb selected
tooltip {The minimum value of the widget.} xywh {155 185 60 20} labelsize 10 align 5
}
Fl_Value_Input {} {
label {Maximum:}
- callback max_cb
+ callback max_cb selected
tooltip {The maximum value of the widget.} xywh {215 185 60 20} labelsize 10 align 5 value 1
}
Fl_Value_Input {} {
label {Step:}
- callback step_cb
+ callback step_cb selected
tooltip {The resolution of the widget value.} xywh {275 185 60 20} labelsize 10 align 5
}
Fl_Value_Input {} {
label {Value:}
- callback value_cb
+ callback value_cb selected
tooltip {The current widget value.} xywh {335 185 60 20} labelsize 10 align 5
}
Fl_Button {} {
label {Shortcut:}
- callback shortcut_in_cb
+ callback shortcut_in_cb selected
tooltip {The shortcut key for the widget.} xywh {95 210 300 20} box DOWN_BOX color 7 selection_color 7 align 4
code0 {\#include "Shortcut_Button.h"}
class Shortcut_Button
}
Fl_Group {} {
- callback propagate_load
+ callback propagate_load open selected
xywh {95 235 300 20}
} {
+ Fl_Input {} {
+ label {X Class:}
+ callback xclass_cb selected
+ tooltip {The X resource class.} xywh {95 235 115 20} resizable
+ }
Fl_Light_Button {} {
label Border
- callback border_cb
+ callback border_cb selected
tooltip {Add a border around the window.} xywh {210 235 60 20} selection_color 1 labelsize 10
}
Fl_Light_Button {} {
label Modal
- callback modal_cb
+ callback modal_cb selected
tooltip {Make the window modal.} xywh {270 235 55 20} selection_color 1 labelsize 10
}
Fl_Light_Button {} {
label Nonmodal
- callback non_modal_cb
+ callback non_modal_cb selected
tooltip {Make the window non-modal.} xywh {325 235 70 20} selection_color 1 labelsize 9 align 148
}
- Fl_Input {} {
- label {X Class:}
- callback xclass_cb
- tooltip {The X resource class.} xywh {95 235 115 20} resizable
- }
}
Fl_Group {} {
- callback propagate_load open
+ callback propagate_load open selected
xywh {95 260 301 20}
} {
Fl_Light_Button {} {
label Visible
- callback visible_cb
+ callback visible_cb selected
tooltip {Show the widget.} xywh {95 260 70 20} selection_color 1 labelsize 10
}
+ Fl_Box {} {
+ label {Attributes:} selected
+ xywh {95 260 0 20} align 4
+ }
Fl_Light_Button {} {
label Active
- callback active_cb
+ callback active_cb selected
tooltip {Activate the widget.} xywh {165 260 70 20} selection_color 1 labelsize 10
}
Fl_Light_Button {} {
label Resizable
- callback resizable_cb
+ callback resizable_cb selected
tooltip {Make the widget resizable.} xywh {235 260 70 20} selection_color 1 labelsize 10 when 1
}
Fl_Light_Button {} {
label Hotspot
- callback hotspot_cb
+ callback hotspot_cb selected
tooltip {Center the window under this widget.} xywh {305 260 70 20} selection_color 1 labelsize 10 when 1
}
- Fl_Box {} {
+ Fl_Box {} {selected
xywh {376 260 20 20} resizable
}
- Fl_Box {} {
- label {Attributes:}
- xywh {95 260 0 20} align 4
- }
}
Fl_Input {} {
label {Tooltip:}
- callback tooltip_cb
+ callback tooltip_cb selected
tooltip {The tooltip text for the widget.} xywh {95 285 300 20}
}
- Fl_Box {} {
+ Fl_Box {} {selected
xywh {95 308 300 12} resizable
}
}
@@ -257,7 +257,7 @@ image}
xywh {10 30 395 295} when 0 hide
} {
Fl_Group {} {
- callback propagate_load
+ callback propagate_load open
xywh {100 40 295 276} resizable
} {
Fl_Group {} {
@@ -265,7 +265,7 @@ image}
xywh {100 40 295 95}
} {
Fl_Group {} {
- callback propagate_load
+ callback propagate_load open
xywh {100 40 295 20}
} {
Fl_Choice {} {
@@ -286,7 +286,7 @@ image}
}
}
Fl_Group {} {
- callback propagate_load
+ callback propagate_load open
xywh {100 65 295 20}
} {
Fl_Choice {} {
@@ -303,7 +303,7 @@ image}
}
}
Fl_Group {} {
- callback propagate_load
+ callback propagate_load open
xywh {100 90 295 20}
} {
Fl_Choice {} {
@@ -320,7 +320,7 @@ image}
}
}
Fl_Group {} {
- callback propagate_load
+ callback propagate_load open
xywh {100 115 295 20}
} {
Fl_Choice {} {
@@ -352,7 +352,7 @@ image}
xywh {10 30 395 295} when 0
} {
Fl_Group {} {
- callback propagate_load
+ callback propagate_load open
xywh {100 40 295 132}
} {
Fl_Group {} {
@@ -413,19 +413,15 @@ image}
} {
Fl_Text_Editor {} {
label {Callback:}
- callback callback_cb selected
+ callback callback_cb
tooltip {The callback function or code for the widget.} xywh {102 177 291 86} box NO_BOX align 4 textfont 4 resizable
code0 {o->buffer(new Fl_Text_Buffer());}
code1 {o->textfont(FL_COURIER);}
code2 {o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);}
}
}
- Fl_Box {} {
- label label
- xywh {95 325 100 0} hide deactivate
- }
Fl_Group {} {
- callback propagate_load
+ callback propagate_load open
xywh {100 270 295 45}
} {
Fl_Group {} {
@@ -461,11 +457,18 @@ image}
}
}
}
+ Fl_Box {} {
+ label label
+ xywh {95 325 100 0} hide deactivate
+ }
}
}
Fl_Group {} {
xywh {10 335 395 25}
} {
+ Fl_Box {} {
+ xywh {12 335 12 25} resizable
+ }
Fl_Button {} {
label {No &Overlay}
callback overlay_cb
@@ -476,18 +479,15 @@ image}
callback revert_cb
xywh {155 335 80 25}
}
- Fl_Button {} {
- label Cancel
- callback cancel_cb
- xywh {325 335 80 25}
- }
Fl_Return_Button {} {
label OK
callback ok_cb
xywh {240 335 80 25}
}
- Fl_Box {} {
- xywh {12 335 12 25} resizable
+ Fl_Button {} {
+ label Cancel
+ callback cancel_cb
+ xywh {325 335 80 25}
}
}
}
diff --git a/fluid/widget_panel.h b/fluid/widget_panel.h
index 96da542ba..0ba760eed 100644
--- a/fluid/widget_panel.h
+++ b/fluid/widget_panel.h
@@ -17,13 +17,13 @@ extern void image_cb(Fl_Input*, void*);
extern void image_browse_cb(Fl_Button*, void*);
extern void inactive_cb(Fl_Input*, void*);
extern void inactive_browse_cb(Fl_Button*, void*);
+extern void align_cb(Fl_Button*, void*);
+#include <FL/Fl_Box.H>
#include <FL/Fl_Value_Input.H>
extern void x_cb(Fl_Value_Input*, void*);
extern void y_cb(Fl_Value_Input*, void*);
extern void w_cb(Fl_Value_Input*, void*);
extern void h_cb(Fl_Value_Input*, void*);
-extern void align_cb(Fl_Button*, void*);
-#include <FL/Fl_Box.H>
extern void slider_size_cb(Fl_Value_Input*, void*);
extern void min_cb(Fl_Value_Input*, void*);
extern void max_cb(Fl_Value_Input*, void*);
@@ -31,11 +31,11 @@ extern void step_cb(Fl_Value_Input*, void*);
extern void value_cb(Fl_Value_Input*, void*);
#include "Shortcut_Button.h"
extern void shortcut_in_cb(Shortcut_Button*, void*);
+extern void xclass_cb(Fl_Input*, void*);
#include <FL/Fl_Light_Button.H>
extern void border_cb(Fl_Light_Button*, void*);
extern void modal_cb(Fl_Light_Button*, void*);
extern void non_modal_cb(Fl_Light_Button*, void*);
-extern void xclass_cb(Fl_Input*, void*);
extern void visible_cb(Fl_Light_Button*, void*);
extern void active_cb(Fl_Light_Button*, void*);
extern void resizable_cb(Fl_Light_Button*, void*);
@@ -68,8 +68,8 @@ extern void user_data_type_cb(Fl_Input*, void*);
extern void when_button_cb(Fl_Light_Button*, void*);
extern void overlay_cb(Fl_Button*, void*);
extern void revert_cb(Fl_Button*, void*);
-extern void cancel_cb(Fl_Button*, void*);
#include <FL/Fl_Return_Button.H>
extern void ok_cb(Fl_Return_Button*, void*);
+extern void cancel_cb(Fl_Button*, void*);
Fl_Double_Window* make_widget_panel();
#endif