From e8eccde8db246d262d7a9e1c6088cc24e82c84e8 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 19 Jul 2023 20:41:58 +0200 Subject: FLUID: RTTI improvements, 'is_a90' now const, apply RTTI --- fluid/Fl_Type.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'fluid/Fl_Type.h') diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h index 85879fea9..ad8edff01 100644 --- a/fluid/Fl_Type.h +++ b/fluid/Fl_Type.h @@ -182,25 +182,23 @@ public: int msgnum(); // fake rtti: + /** Return 1 if the Type chn have children. */ virtual int is_parent() const {return 0;} + /** Return 1 if the type is a widget or menu item. */ virtual int is_widget() const {return 0;} - /// TODO: Misnamed: This is true if the widget is a button or a menu item with button functionality + /** Return 1 if the type is a widget but not a menu item. */ + virtual int is_true_widget() const {return 0;} + /** Return 1 if a type behaves like a button (Fl_Button and Fl_Menu_Item and derived. */ virtual int is_button() const {return 0;} - virtual int is_menu_item() const {return 0;} virtual int is_group() const {return 0;} - virtual int is_tabs() const {return 0;} - virtual int is_scroll() const {return 0;} - virtual int is_flex() const {return 0;} - virtual int is_window() const {return 0;} virtual int is_code() const {return 0;} virtual int is_code_block() const {return 0;} virtual int is_decl_block() const {return 0;} - virtual int is_comment() const {return 0;} virtual int is_class() const {return 0;} virtual int is_public() const {return 1;} virtual ID id() const { return ID_Base_; } - virtual bool is_a(ID inID) { return (inID==ID_Base_); } + virtual bool is_a(ID inID) const { return (inID==ID_Base_); } const char* class_name(const int need_nest) const; const class Fl_Class_Type* is_in_class() const; -- cgit v1.2.3