diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-07-17 15:55:56 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-07-17 15:56:05 +0200 |
| commit | 80ad543963431f47f3fd8ae2d06d2fa32341299e (patch) | |
| tree | 088f01082e3c8ec26e022372082c9bc2e106e94e /fluid/Fl_Menu_Type.h | |
| parent | 4d94a08bd2fcd681d33bfb51228ace3b432b19ab (diff) | |
FLUID: using symbols instead of integers
Diffstat (limited to 'fluid/Fl_Menu_Type.h')
| -rw-r--r-- | fluid/Fl_Menu_Type.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fluid/Fl_Menu_Type.h b/fluid/Fl_Menu_Type.h index 5aca716c8..f43328363 100644 --- a/fluid/Fl_Menu_Type.h +++ b/fluid/Fl_Menu_Type.h @@ -47,21 +47,21 @@ public: void write_item(Fd_Code_Writer& f); void write_code1(Fd_Code_Writer& f) FL_OVERRIDE; void write_code2(Fd_Code_Writer& f) FL_OVERRIDE; - int pixmapID() FL_OVERRIDE { return 16; } + ID id() const FL_OVERRIDE { return ID::Menu_Item; } }; class Fl_Radio_Menu_Item_Type : public Fl_Menu_Item_Type { public: const char* type_name() FL_OVERRIDE {return "RadioMenuItem";} Fl_Type* make(Strategy strategy) FL_OVERRIDE; - int pixmapID() FL_OVERRIDE { return 55; } + ID id() const FL_OVERRIDE { return ID::Radio_Menu_Item; } }; class Fl_Checkbox_Menu_Item_Type : public Fl_Menu_Item_Type { public: const char* type_name() FL_OVERRIDE {return "CheckMenuItem";} Fl_Type* make(Strategy strategy) FL_OVERRIDE; - int pixmapID() FL_OVERRIDE { return 54; } + ID id() const FL_OVERRIDE { return ID::Checkbox_Menu_Item; } }; class Fl_Submenu_Type : public Fl_Menu_Item_Type { @@ -77,7 +77,7 @@ public: void add_child(Fl_Type*a, Fl_Type*b) FL_OVERRIDE {parent->add_child(a,b);} void move_child(Fl_Type*a, Fl_Type*b) FL_OVERRIDE {parent->move_child(a,b);} void remove_child(Fl_Type*a) FL_OVERRIDE {parent->remove_child(a);} - int pixmapID() FL_OVERRIDE { return 18; } + ID id() const FL_OVERRIDE { return ID::Submenu; } }; class Fl_Menu_Type : public Fl_Widget_Type { @@ -107,6 +107,7 @@ public: Fl_Type* click_test(int x, int y) FL_OVERRIDE; void write_code2(Fd_Code_Writer& f) FL_OVERRIDE; void copy_properties() FL_OVERRIDE; + ID id() const FL_OVERRIDE { return ID::Menu_; } }; extern Fl_Menu_Item button_type_menu[]; @@ -126,7 +127,7 @@ public: Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE { return new Fl_Menu_Button(X,Y,W,H,"menu");} Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Menu_Button_Type();} - int pixmapID() FL_OVERRIDE { return 26; } + ID id() const FL_OVERRIDE { return ID::Menu_Button; } }; extern Fl_Menu_Item dummymenu[]; @@ -153,7 +154,7 @@ public: return myo; } Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Choice_Type();} - int pixmapID() FL_OVERRIDE { return 15; } + ID id() const FL_OVERRIDE { return ID::Choice; } }; class Fl_Input_Choice_Type : public Fl_Menu_Type { @@ -190,7 +191,7 @@ public: } Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Input_Choice_Type();} void build_menu() FL_OVERRIDE; - int pixmapID() FL_OVERRIDE { return 53; } + ID id() const FL_OVERRIDE { return ID::Input_Choice; } void copy_properties() FL_OVERRIDE; }; @@ -205,7 +206,7 @@ public: const char *alt_type_name() FL_OVERRIDE {return "fltk::MenuBar";} Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {return new Fl_Menu_Bar(X,Y,W,H);} Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Menu_Bar_Type();} - int pixmapID() FL_OVERRIDE { return 17; } + ID id() const FL_OVERRIDE { return ID::Menu_Bar; } }; |
