diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-07-19 17:44:44 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-07-19 17:45:28 +0200 |
| commit | f8a327877699a8565d36b2f0b1cbe074f224fba4 (patch) | |
| tree | 00673ec9887fa97a108a56910c97df6b37c6ff8c /fluid/align_widget.cxx | |
| parent | 9ee8cdc727e7c510c28b51318b953d82aa1dd936 (diff) | |
FLUID: emulated RTTI for all types
Complete type hierarchy in Fl_Types doc
Window now derives correctly from Group
Menu Items now correctly (functionally in FLUID) derived form Button
Menu Buttons have a better hierarchy
Fixing two possible crash bugs where Input_Choice was assumed to be a Menu_
Hoping I have not degraded the original code!
Diffstat (limited to 'fluid/align_widget.cxx')
| -rw-r--r-- | fluid/align_widget.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fluid/align_widget.cxx b/fluid/align_widget.cxx index 20a85a394..ecfea0dc4 100644 --- a/fluid/align_widget.cxx +++ b/fluid/align_widget.cxx @@ -60,7 +60,7 @@ void align_widget_cb(Fl_Widget*, long how) } Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(left, w->y(), w->w(), w->h()); } else { @@ -95,7 +95,7 @@ void align_widget_cb(Fl_Widget*, long how) } Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize((center2-w->w())/2, w->y(), w->w(), w->h()); } else { @@ -127,7 +127,7 @@ void align_widget_cb(Fl_Widget*, long how) } Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(right-w->w(), w->y(), w->w(), w->h()); } else { @@ -158,7 +158,7 @@ void align_widget_cb(Fl_Widget*, long how) } Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(w->x(), top, w->w(), w->h()); } else { @@ -193,7 +193,7 @@ void align_widget_cb(Fl_Widget*, long how) } Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(w->x(), (center2-w->h())/2, w->w(), w->h()); } else { @@ -225,7 +225,7 @@ void align_widget_cb(Fl_Widget*, long how) } Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize( w->x(), bot-w->h(), w->w(), w->h()); } else { @@ -265,7 +265,7 @@ void align_widget_cb(Fl_Widget*, long how) } Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(left+wsum+wdt*cnt/n, w->y(), w->w(), w->h()); } else { @@ -307,7 +307,7 @@ void align_widget_cb(Fl_Widget*, long how) } Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(w->x(), top+hsum+hgt*cnt/n, w->w(), w->h()); } else { @@ -342,7 +342,7 @@ void align_widget_cb(Fl_Widget*, long how) } Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(w->x(), w->y(), wdt, w->h()); } else { @@ -373,7 +373,7 @@ void align_widget_cb(Fl_Widget*, long how) } Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize( w->x(), w->y(), w->w(), hgt); } else { @@ -406,7 +406,7 @@ void align_widget_cb(Fl_Widget*, long how) } Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize( w->x(), w->y(), wdt, hgt); } else { @@ -434,7 +434,7 @@ void align_widget_cb(Fl_Widget*, long how) else center2 = 2*p->x()+p->w(); if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button() && !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize((center2-w->w())/2, w->y(), w->w(), w->h()); } else { @@ -461,7 +461,7 @@ void align_widget_cb(Fl_Widget*, long how) else center2 = 2*p->y()+p->h(); if (o->next && o->next->level > o->level && !o->next->selected && - !o->is_menu_button()) { + !o->is_a(Fl_Type::ID_Menu_Manager_)) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(w->x(), (center2-w->h())/2, w->w(), w->h()); } else { |
