From 9794d200b33b438feaf76c960e464b90dd911d58 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 17 Jul 2023 18:31:58 +0200 Subject: FLUID: emulating RTTI and fixing type dependencies (Buttons) --- fluid/Fl_Widget_Type.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'fluid/Fl_Widget_Type.h') 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; -- cgit v1.2.3