diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-03-08 13:46:31 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-03-08 13:46:31 +0000 |
| commit | 29e022cc46b35da484592af581a1c16bfd5f1530 (patch) | |
| tree | 003d50fbd3e145169bab85d04c8207b54d816481 /fluid/Fl_Type.h | |
| parent | 8769b2f7fa5c7fe195338e9cc70b89aa3edeff32 (diff) | |
Use grid size for window resizing.
Save work on project settings dialog.
Ideal spacing for group-derived widgets is 10 pixels, except for
tabs which has a Y spacing of 25 (for the normal label size)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Type.h')
| -rw-r--r-- | fluid/Fl_Type.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h index 77c7ee340..72574a5bc 100644 --- a/fluid/Fl_Type.h +++ b/fluid/Fl_Type.h @@ -34,6 +34,7 @@ #include <FL/Fl_Widget.H> #include <FL/Fl_Menu.H> #include "Fluid_Image.h" +#include <FL/fl_draw.H> class Fl_Type { @@ -338,6 +339,7 @@ public: class Fl_Group_Type : public Fl_Widget_Type { public: + virtual void ideal_spacing(int &x, int &y) { x = y = 10; } virtual const char *type_name() {return "Fl_Group";} Fl_Widget *widget(int X,int Y,int W,int H) { igroup *g = new igroup(X,Y,W,H); Fl_Group::current(0); return g;} @@ -368,6 +370,11 @@ extern const char tabs_type_name[]; class Fl_Tabs_Type : public Fl_Group_Type { public: + virtual void ideal_spacing(int &x, int &y) { + x = 10; + fl_font(o->labelfont(), o->labelsize()); + y = fl_height() + o->labelsize() - 6; + } virtual const char *type_name() {return tabs_type_name;} Fl_Widget *widget(int X,int Y,int W,int H) { itabs *g = new itabs(X,Y,W,H); Fl_Group::current(0); return g;} @@ -437,6 +444,7 @@ class Fl_Window_Type : public Fl_Widget_Type { public: + Fl_Window_Type() { drag = dx = dy = 0; } uchar modal, non_modal; Fl_Type *make(); |
