diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-07-17 18:31:58 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-07-17 18:32:13 +0200 |
| commit | 9794d200b33b438feaf76c960e464b90dd911d58 (patch) | |
| tree | 5078c3e9261457aff8d94962ab898ca9dd87af11 /fluid/Fl_Widget_Type.cxx | |
| parent | 80ad543963431f47f3fd8ae2d06d2fa32341299e (diff) | |
FLUID: emulating RTTI and fixing type dependencies (Buttons)
Diffstat (limited to 'fluid/Fl_Widget_Type.cxx')
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index a126ad95a..54134b4d3 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -186,7 +186,6 @@ Fl_Widget_Type::Fl_Widget_Type() inactive_name_ = 0; image = 0; inactive = 0; - xclass = 0; o = 0; public_ = 1; bind_image_ = 0; @@ -1047,7 +1046,7 @@ void box_cb(Fl_Choice* i, void *v) { void down_box_cb(Fl_Choice* i, void *v) { if (v == LOAD) { int n; - if (current_widget->is_button() && !current_widget->is_menu_item()) + if (current_widget->is_a(Fl_Type::ID::Button)) n = ((Fl_Button*)(current_widget->o))->down_box(); else if (current_widget->id() == Fl_Type::ID::Input_Choice) n = ((Fl_Input_Choice*)(current_widget->o))->down_box(); @@ -1068,7 +1067,7 @@ void down_box_cb(Fl_Choice* i, void *v) { if (n == ZERO_ENTRY) n = 0; for (Fl_Type *o = Fl_Type::first; o; o = o->next) { if (o->selected) { - if (o->is_button() && !o->is_menu_item()) { + if (o->is_a(Fl_Type::ID::Button)) { Fl_Widget_Type* q = (Fl_Widget_Type*)o; ((Fl_Button*)(q->o))->down_box((Fl_Boxtype)n); if (((Fl_Button*)(q->o))->value()) q->redraw(); |
