diff options
| author | Matthias Melcher <github@matthiasm.com> | 2022-12-30 19:14:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-30 19:14:36 +0100 |
| commit | 44c874b731f9f58c2f50c3c6076371058cbe26e3 (patch) | |
| tree | 2386dfcc700c41a1109fc78b96875c11056abcc9 /fluid/Fl_Window_Type.h | |
| parent | f58a93a159105336136ce6e54ab7fc161e4fa15a (diff) | |
Use `FL_OVERRIDE` for all overridden virtual methods (#611)
FL_OVERRIDE is defined as `override` for C++11 and higher
FL_OVERRIDE is defined as `override` for VisualC 2015 and newer
Don't interfere with Fl_Widget::override()
Diffstat (limited to 'fluid/Fl_Window_Type.h')
| -rw-r--r-- | fluid/Fl_Window_Type.h | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/fluid/Fl_Window_Type.h b/fluid/Fl_Window_Type.h index 8a2d8999a..05af32dc1 100644 --- a/fluid/Fl_Window_Type.h +++ b/fluid/Fl_Window_Type.h @@ -36,7 +36,7 @@ void show_global_settings_cb(Fl_Widget *, void *); class Fl_Window_Type : public Fl_Widget_Type { protected: - Fl_Menu_Item* subtypes() {return window_type_menu;} + Fl_Menu_Item* subtypes() FL_OVERRIDE {return window_type_menu;} friend class Overlay_Window; int mx,my; // mouse position during dragging @@ -51,14 +51,14 @@ protected: void newdx(); void newposition(Fl_Widget_Type *,int &x,int &y,int &w,int &h); int handle(int); - virtual void setlabel(const char *); - void write_code1(); - void write_code2(); - Fl_Widget_Type *_make() {return 0;} // we don't call this - Fl_Widget *widget(int,int,int,int) {return 0;} + void setlabel(const char *) FL_OVERRIDE; + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE; + Fl_Widget_Type *_make() FL_OVERRIDE {return 0;} // we don't call this + Fl_Widget *widget(int,int,int,int) FL_OVERRIDE {return 0;} int recalc; // set by fix_overlay() void moveallchildren(); - int pixmapID() { return 1; } + int pixmapID() FL_OVERRIDE { return 1; } public: @@ -76,30 +76,30 @@ public: { } uchar modal, non_modal; - Fl_Type *make(Strategy strategy); - virtual const char *type_name() {return "Fl_Window";} - virtual const char *alt_type_name() {return "fltk::Window";} + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + const char *type_name() FL_OVERRIDE {return "Fl_Window";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Window";} - void open(); + void open() FL_OVERRIDE; void fix_overlay(); // Update the bounding box, etc uchar *read_image(int &ww, int &hh); // Read an image of the window - virtual void write_properties(); - virtual void read_property(const char *); - virtual int read_fdesign(const char*, const char*); + void write_properties() FL_OVERRIDE; + void read_property(const char *) FL_OVERRIDE; + int read_fdesign(const char*, const char*) FL_OVERRIDE; - void add_child(Fl_Type*, Fl_Type*); - void move_child(Fl_Type*, Fl_Type*); - void remove_child(Fl_Type*); + void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE; + void move_child(Fl_Type*, Fl_Type*) FL_OVERRIDE; + void remove_child(Fl_Type*) FL_OVERRIDE; - int is_parent() const {return 1;} - int is_group() const {return 1;} - int is_window() const {return 1;} + int is_parent() const FL_OVERRIDE {return 1;} + int is_group() const FL_OVERRIDE {return 1;} + int is_window() const FL_OVERRIDE {return 1;} - Fl_Widget *enter_live_mode(int top=0); - void leave_live_mode(); - void copy_properties(); + Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE; + void leave_live_mode() FL_OVERRIDE; + void copy_properties() FL_OVERRIDE; int sr_min_w, sr_min_h, sr_max_w, sr_max_h; @@ -108,7 +108,7 @@ public: class Fl_Widget_Class_Type : private Fl_Window_Type { protected: - Fl_Menu_Item* subtypes() {return 0;} + Fl_Menu_Item* subtypes() FL_OVERRIDE {return 0;} public: Fl_Widget_Class_Type() { @@ -119,18 +119,18 @@ public: char write_public_state; // true when public: has been printed char wc_relative; // if 1, reposition all children, if 2, reposition and resize - virtual void write_properties(); - virtual void read_property(const char *); - - void write_code1(); - void write_code2(); - Fl_Type *make(Strategy strategy); - virtual const char *type_name() {return "widget_class";} - int pixmapID() { return 48; } - int is_parent() const {return 1;} - int is_code_block() const {return 1;} - int is_decl_block() const {return 1;} - int is_class() const {return 1;} + void write_properties() FL_OVERRIDE; + void read_property(const char *) FL_OVERRIDE; + + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE; + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + const char *type_name() FL_OVERRIDE {return "widget_class";} + int pixmapID() FL_OVERRIDE { return 48; } + int is_parent() const FL_OVERRIDE {return 1;} + int is_code_block() const FL_OVERRIDE {return 1;} + int is_decl_block() const FL_OVERRIDE {return 1;} + int is_class() const FL_OVERRIDE {return 1;} }; #endif // _FLUID_FL_WINDOW_TYPE_H |
