summaryrefslogtreecommitdiff
path: root/fluid/align_widget.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-03-19 04:09:32 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-03-19 04:09:32 +0000
commit59004878f3c36ec693737b631f5769f511fd74cb (patch)
treeb50238e6908abf76db0570e3cef65a2d973b1f33 /fluid/align_widget.cxx
parenta218f44b5db233bbbd588b5766ec6f3e5e6cb822 (diff)
Many FLUID updates...
fluid/align_widget.cxx: - Add widget_size_cb() to set default size and size of labels and text for selected widgets. fluid/factory.cxx: - More normalization of menus - "..." when opening a window, Capitalized Words. - cb(): Assign default label/text size and resize to ideal size. - Make sure that all buttons, input, and valuator widgets have default label strings. - Fl_*_Button::ideal_size(): fix ideal width calcs to match widget. fluid/Fl_Menu_Type.cxx: - Fl_Menu_Item_Type::make(): set default label size. fluid/Fl_Type.h: - Add Fl_Widget_Type::default_size global. - Fl_Menu_Item_Type::type_name(): return "Menu_Item". - Fl_Submenu_Type::type_name(): return "Submenu". - Update ideal_size() methods to use a default height that is evenly divisible by 5. - Fl_Choice_Type::ideal_size() and Fl_Menubutton_Type::ideal_size(): fix ideal width calcs to match widget. - Fl_Menu_Bar::ideal_size(): add, returning the window width. fluid/fluid.cxx: - Add "Layout/Widget Size" submenu. - "File/Write code..." becomes "File/Write Code..." and "File/Write strings..." becomes "File/Write Strings..." fluid/fluid.plist: - Bump version number and copyright info. fluid/Fl_Widget_Type.cxx: - Fl_Widget_Type::ideal_size(): add box dw/dh and enforce a minimum size of 15x15. - labelsize_cb(): use Fl_Widget_Type::default_size instead of FL_NORMAL_SIZE. - textsize_cb(): use Fl_Widget_Type::default_size instead of FL_NORMAL_SIZE. fluid/Fl_Window_Type.cxx: - Fl_Window_Type::newdx(): require at least 2 pixels of movement. - Fl_Window_Type::draw_overlay(): adjust bounding box for outside labels above and below. - Fl_Window_Type::handle(): reset dx/dy on FL_PUSH. fluid/function_panel.cxx: fluid/function_panel.fl: fluid/function_panel.h: - Update some of the windows for the "small" size. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/align_widget.cxx')
-rw-r--r--fluid/align_widget.cxx25
1 files changed, 24 insertions, 1 deletions
diff --git a/fluid/align_widget.cxx b/fluid/align_widget.cxx
index 07dcc910f..5d1f9a7e9 100644
--- a/fluid/align_widget.cxx
+++ b/fluid/align_widget.cxx
@@ -29,7 +29,8 @@
/**
* the first behaviour always uses the first selected widget as a reference
- * the second behaviour uses the larges widget (most extreme positions) as a reference
+ * the second behaviour uses the largest widget (most extreme positions) as
+ * a reference.
*/
#define BREAK_ON_FIRST break
//#define BREAK_ON_FIRST
@@ -437,6 +438,28 @@ void align_widget_cb(Fl_Widget*, long how)
}
+// Set default widget sizes...
+void widget_size_cb(Fl_Widget *, long size) {
+ // Update the "normal" text size of new widgets...
+ Fl_Widget_Type::default_size = size;
+
+ // Update any selected widgets...
+ for (Fl_Type *o = Fl_Type::first; o; o = o->next)
+ if (o->selected && o->is_widget()) {
+ Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
+ w->labelsize(size);
+ Fl_Font f;
+ int s = (int)size;
+ Fl_Color c;
+ ((Fl_Widget_Type *)o)->textstuff(2, f, s, c);
+
+ w->redraw();
+
+ modflag = 1;
+ }
+}
+
+
//
// End of "$Id$".
//