summaryrefslogtreecommitdiff
path: root/fluid/Fl_Widget_Type.h
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-07-17 18:31:58 +0200
committerMatthias Melcher <github@matthiasm.com>2023-07-17 18:32:13 +0200
commit9794d200b33b438feaf76c960e464b90dd911d58 (patch)
tree5078c3e9261457aff8d94962ab898ca9dd87af11 /fluid/Fl_Widget_Type.h
parent80ad543963431f47f3fd8ae2d06d2fa32341299e (diff)
FLUID: emulating RTTI and fixing type dependencies (Buttons)
Diffstat (limited to 'fluid/Fl_Widget_Type.h')
-rw-r--r--fluid/Fl_Widget_Type.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/fluid/Fl_Widget_Type.h b/fluid/Fl_Widget_Type.h
index e6d2c54a0..07ffc44b5 100644
--- a/fluid/Fl_Widget_Type.h
+++ b/fluid/Fl_Widget_Type.h
@@ -5,7 +5,7 @@
// This should have the widget pointer in it, but it is still in the
// Fl_Type base class.
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2023 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -37,7 +37,10 @@ void selection_changed(Fl_Type* new_current);
Fl_Type *sort(Fl_Type *parent);
void comment_cb(class Fl_Text_Editor* i, void *v);
-class Fl_Widget_Type : public Fl_Type {
+class Fl_Widget_Type : public Fl_Type
+{
+ typedef Fl_Type super;
+
virtual Fl_Widget *widget(int,int,int,int) = 0;
virtual Fl_Widget_Type *_make() = 0; // virtual constructor
void setlabel(const char *) FL_OVERRIDE;
@@ -67,7 +70,6 @@ protected:
Fl_Widget *live_widget;
public:
- const char *xclass; // junk string, used for shortcut
Fl_Widget *o;
int public_;
int bind_image_;
@@ -103,6 +105,7 @@ public:
virtual Fl_Menu_Item *subtypes();
ID id() const FL_OVERRIDE { return ID::Widget_; }
+ bool is_a(ID inID) FL_OVERRIDE { return (inID==ID::Widget_) ? true : super::is_a(inID); }
int is_widget() const FL_OVERRIDE;
int is_public() const FL_OVERRIDE;