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 | |
| 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')
| -rw-r--r-- | fluid/CodeEditor.h | 4 | ||||
| -rw-r--r-- | fluid/Fl_Function_Type.h | 168 | ||||
| -rw-r--r-- | fluid/Fl_Group_Type.cxx | 2 | ||||
| -rw-r--r-- | fluid/Fl_Group_Type.h | 156 | ||||
| -rw-r--r-- | fluid/Fl_Menu_Type.h | 134 | ||||
| -rw-r--r-- | fluid/Fl_Widget_Type.h | 28 | ||||
| -rw-r--r-- | fluid/Fl_Window_Type.cxx | 8 | ||||
| -rw-r--r-- | fluid/Fl_Window_Type.h | 72 | ||||
| -rw-r--r-- | fluid/Shortcut_Button.h | 8 | ||||
| -rw-r--r-- | fluid/factory.cxx | 420 | ||||
| -rw-r--r-- | fluid/widget_browser.h | 20 |
11 files changed, 510 insertions, 510 deletions
diff --git a/fluid/CodeEditor.h b/fluid/CodeEditor.h index e55bff8f6..f8e7f8299 100644 --- a/fluid/CodeEditor.h +++ b/fluid/CodeEditor.h @@ -62,8 +62,8 @@ public: CodeViewer(int X, int Y, int W, int H, const char *L=0); protected: - int handle(int ev) { return Fl_Text_Display::handle(ev); } - void draw(); + int handle(int ev) FL_OVERRIDE{ return Fl_Text_Display::handle(ev); } + void draw() FL_OVERRIDE; }; // ---- DesignViewer declaration diff --git a/fluid/Fl_Function_Type.h b/fluid/Fl_Function_Type.h index 2f0892047..638458d83 100644 --- a/fluid/Fl_Function_Type.h +++ b/fluid/Fl_Function_Type.h @@ -49,21 +49,21 @@ class Fl_Function_Type : public Fl_Type { public: Fl_Function_Type(); ~Fl_Function_Type(); - Fl_Type *make(Strategy strategy); - void write_code1(); - void write_code2(); - void open(); + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE; + void open() FL_OVERRIDE; int ismain() {return name_ == 0;} - virtual const char *type_name() {return "Function";} - virtual const char *title() { + const char *type_name() FL_OVERRIDE {return "Function";} + const char *title() FL_OVERRIDE { return name() ? name() : "main()"; } - int is_parent() const {return 1;} - int is_code_block() const {return 1;} - virtual int is_public() const; - int pixmapID() { return 7; } - void write_properties(); - void read_property(const char *); + int is_parent() const FL_OVERRIDE {return 1;} + int is_code_block() const FL_OVERRIDE {return 1;} + int is_public() const FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 7; } + void write_properties() FL_OVERRIDE; + void read_property(const char *) FL_OVERRIDE; int has_signature(const char *, const char*) const; }; @@ -77,16 +77,16 @@ class Fl_Code_Type : public Fl_Type { public: Fl_Code_Type(); - Fl_Type *make(Strategy strategy); - void write(); - void write_code1(); - void write_code2() { } - void open(); - virtual const char *type_name() {return "code";} - int is_code_block() const {return 0;} - int is_code() const {return 1;} - int pixmapID() { return 8; } - virtual int is_public() const { return -1; } + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + void write() FL_OVERRIDE; + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE { } + void open() FL_OVERRIDE; + const char *type_name() FL_OVERRIDE {return "code";} + int is_code_block() const FL_OVERRIDE {return 0;} + int is_code() const FL_OVERRIDE {return 1;} + int pixmapID() FL_OVERRIDE { return 8; } + int is_public() const FL_OVERRIDE { return -1; } int is_editing(); int reap_editor(); int handle_editor_changes(); @@ -100,17 +100,17 @@ class Fl_CodeBlock_Type : public Fl_Type { public: Fl_CodeBlock_Type(); ~Fl_CodeBlock_Type(); - Fl_Type *make(Strategy strategy); - void write_code1(); - void write_code2(); - void open(); - virtual const char *type_name() {return "codeblock";} - int is_code_block() const {return 1;} - int is_parent() const {return 1;} - virtual int is_public() const { return -1; } - int pixmapID() { return 9; } - void write_properties(); - void read_property(const char *); + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE; + void open() FL_OVERRIDE; + const char *type_name() FL_OVERRIDE {return "codeblock";} + int is_code_block() const FL_OVERRIDE {return 1;} + int is_parent() const FL_OVERRIDE {return 1;} + int is_public() const FL_OVERRIDE { return -1; } + int pixmapID() FL_OVERRIDE { return 9; } + void write_properties() FL_OVERRIDE; + void read_property(const char *) FL_OVERRIDE; }; // ---- Fl_Decl_Type declaration @@ -123,15 +123,15 @@ protected: public: Fl_Decl_Type(); - Fl_Type *make(Strategy strategy); - void write_code1(); - void write_code2() { } - void open(); - virtual const char *type_name() {return "decl";} - void write_properties(); - void read_property(const char *); - virtual int is_public() const; - int pixmapID() { return 10; } + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE { } + void open() FL_OVERRIDE; + const char *type_name() FL_OVERRIDE {return "decl";} + void write_properties() FL_OVERRIDE; + void read_property(const char *) FL_OVERRIDE; + int is_public() const FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 10; } }; // ---- Fl_Data_Type declaration @@ -143,14 +143,14 @@ class Fl_Data_Type : public Fl_Decl_Type { public: Fl_Data_Type(); ~Fl_Data_Type(); - Fl_Type *make(Strategy strategy); - void write_code1(); - void write_code2() {} - void open(); - virtual const char *type_name() {return "data";} - void write_properties(); - void read_property(const char *); - int pixmapID() { return 49; } + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE {} + void open() FL_OVERRIDE; + const char *type_name() FL_OVERRIDE {return "data";} + void write_properties() FL_OVERRIDE; + void read_property(const char *) FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 49; } }; // ---- Fl_DeclBlock_Type declaration @@ -162,17 +162,17 @@ class Fl_DeclBlock_Type : public Fl_Type { public: Fl_DeclBlock_Type(); ~Fl_DeclBlock_Type(); - Fl_Type *make(Strategy strategy); - void write_code1(); - void write_code2(); - void open(); - virtual const char *type_name() {return "declblock";} - void write_properties(); - void read_property(const char *); - int is_parent() const {return 1;} - int is_decl_block() const {return 1;} - virtual int is_public() const; - int pixmapID() { return 11; } + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE; + void open() FL_OVERRIDE; + const char *type_name() FL_OVERRIDE {return "declblock";} + void write_properties() FL_OVERRIDE; + void read_property(const char *) FL_OVERRIDE; + int is_parent() const FL_OVERRIDE {return 1;} + int is_decl_block() const FL_OVERRIDE {return 1;} + int is_public() const FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 11; } }; // ---- Fl_Comment_Type declaration @@ -183,17 +183,17 @@ class Fl_Comment_Type : public Fl_Type { public: Fl_Comment_Type(); - Fl_Type *make(Strategy strategy); - void write_code1(); - void write_code2() { } - void open(); - virtual const char *type_name() {return "comment";} - virtual const char *title(); // string for browser - void write_properties(); - void read_property(const char *); - virtual int is_public() const { return 1; } - virtual int is_comment() const { return 1; } - int pixmapID() { return 46; } + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE { } + void open() FL_OVERRIDE; + const char *type_name() FL_OVERRIDE {return "comment";} + const char *title() FL_OVERRIDE; // string for browser + void write_properties() FL_OVERRIDE; + void read_property(const char *) FL_OVERRIDE; + int is_public() const FL_OVERRIDE { return 1; } + int is_comment() const FL_OVERRIDE { return 1; } + int pixmapID() FL_OVERRIDE { return 46; } }; // ---- Fl_Class_Type declaration @@ -210,18 +210,18 @@ public: char write_public_state; // true when public: has been printed Fl_Class_Type* parent_class; // save class if nested // - Fl_Type *make(Strategy strategy); - void write_code1(); - void write_code2(); - void open(); - virtual const char *type_name() {return "class";} - int is_parent() const {return 1;} - int is_decl_block() const {return 1;} - int is_class() const {return 1;} - virtual int is_public() const; - int pixmapID() { return 12; } - void write_properties(); - void read_property(const char *); + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE; + void open() FL_OVERRIDE; + const char *type_name() FL_OVERRIDE {return "class";} + int is_parent() const FL_OVERRIDE {return 1;} + int is_decl_block() const FL_OVERRIDE {return 1;} + int is_class() const FL_OVERRIDE {return 1;} + int is_public() const FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 12; } + void write_properties() FL_OVERRIDE; + void read_property(const char *) FL_OVERRIDE; // class prefix attribute access void prefix(const char* p); diff --git a/fluid/Fl_Group_Type.cxx b/fluid/Fl_Group_Type.cxx index 624f520d8..68f33d49d 100644 --- a/fluid/Fl_Group_Type.cxx +++ b/fluid/Fl_Group_Type.cxx @@ -419,7 +419,7 @@ class Fluid_Table : public Fl_Table { // Fl_Table calls this function to draw each visible cell in the table. // It's up to us to use FLTK's drawing functions to draw the cells the way we want. // - void draw_cell(TableContext context, int ROW=0, int COL=0, int X=0, int Y=0, int W=0, int H=0) { + void draw_cell(TableContext context, int ROW=0, int COL=0, int X=0, int Y=0, int W=0, int H=0) FL_OVERRIDE { static char s[40]; switch ( context ) { case CONTEXT_STARTPAGE: // before page is drawn.. diff --git a/fluid/Fl_Group_Type.h b/fluid/Fl_Group_Type.h index f0ab0f8ce..d6a77a497 100644 --- a/fluid/Fl_Group_Type.h +++ b/fluid/Fl_Group_Type.h @@ -29,86 +29,86 @@ void ungroup_cb(Fl_Widget *, void *); class igroup : public Fl_Group { public: - void resize(int,int,int,int); + void resize(int,int,int,int) FL_OVERRIDE; void full_resize(int X, int Y, int W, int H) { Fl_Group::resize(X, Y, W, H); } igroup(int X,int Y,int W,int H) : Fl_Group(X,Y,W,H) {Fl_Group::current(0);} }; class itabs : public Fl_Tabs { public: - void resize(int,int,int,int); + void resize(int,int,int,int) FL_OVERRIDE; void full_resize(int X, int Y, int W, int H) { Fl_Group::resize(X, Y, W, H); } itabs(int X,int Y,int W,int H) : Fl_Tabs(X,Y,W,H) {} }; class iwizard : public Fl_Wizard { public: - void resize(int,int,int,int); + void resize(int,int,int,int) FL_OVERRIDE; void full_resize(int X, int Y, int W, int H) { Fl_Group::resize(X, Y, W, H); } iwizard(int X,int Y,int W,int H) : Fl_Wizard(X,Y,W,H) {} }; class Fl_Group_Type : public Fl_Widget_Type { public: - virtual const char *type_name() {return "Fl_Group";} - virtual const char *alt_type_name() {return "fltk::Group";} - Fl_Widget *widget(int X,int Y,int W,int H) { + const char *type_name() FL_OVERRIDE {return "Fl_Group";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Group";} + Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE { igroup *g = new igroup(X,Y,W,H); Fl_Group::current(0); return g;} - Fl_Widget_Type *_make() {return new Fl_Group_Type();} - Fl_Type *make(Strategy strategy); - void write_code1(); - void write_code2(); - void add_child(Fl_Type*, Fl_Type*); - void move_child(Fl_Type*, Fl_Type*); - void remove_child(Fl_Type*); - int is_parent() const {return 1;} - int is_group() const {return 1;} - int pixmapID() { return 6; } - - virtual Fl_Widget *enter_live_mode(int top=0); - virtual void leave_live_mode(); - virtual void copy_properties(); + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Group_Type();} + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE; + 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 FL_OVERRIDE {return 1;} + int is_group() const FL_OVERRIDE {return 1;} + int pixmapID() FL_OVERRIDE { return 6; } + + Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE; + void leave_live_mode() FL_OVERRIDE; + void copy_properties() FL_OVERRIDE; }; extern const char pack_type_name[]; extern Fl_Menu_Item pack_type_menu[]; class Fl_Pack_Type : public Fl_Group_Type { - Fl_Menu_Item *subtypes() {return pack_type_menu;} + Fl_Menu_Item *subtypes() FL_OVERRIDE {return pack_type_menu;} public: - virtual const char *type_name() {return pack_type_name;} - virtual const char *alt_type_name() {return "fltk::PackedGroup";} - Fl_Widget_Type *_make() {return new Fl_Pack_Type();} - int pixmapID() { return 22; } - void copy_properties(); + const char *type_name() FL_OVERRIDE {return pack_type_name;} + const char *alt_type_name() FL_OVERRIDE {return "fltk::PackedGroup";} + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Pack_Type();} + int pixmapID() FL_OVERRIDE { return 22; } + void copy_properties() FL_OVERRIDE; }; extern const char flex_type_name[]; extern Fl_Menu_Item flex_type_menu[]; class Fl_Flex_Type : public Fl_Group_Type { - Fl_Menu_Item *subtypes() {return flex_type_menu;} + Fl_Menu_Item *subtypes() FL_OVERRIDE {return flex_type_menu;} int fixedSizeTupleSize; /* number of pairs in array */ int *fixedSizeTuple; /* [ index, size, index2, size2, ... ] */ int suspend_auto_layout; public: Fl_Flex_Type() : fixedSizeTupleSize(0), fixedSizeTuple(NULL), suspend_auto_layout(0) { } - virtual const char *type_name() {return flex_type_name;} - virtual const char *alt_type_name() {return "fltk::FlexGroup";} - Fl_Widget_Type *_make() { return new Fl_Flex_Type(); } - Fl_Widget *widget(int X,int Y,int W,int H) { + const char *type_name() FL_OVERRIDE {return flex_type_name;} + const char *alt_type_name() FL_OVERRIDE {return "fltk::FlexGroup";} + Fl_Widget_Type *_make() FL_OVERRIDE { return new Fl_Flex_Type(); } + Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE { Fl_Flex *g = new Fl_Flex(X,Y,W,H); Fl_Group::current(0); return g;} - int pixmapID() { return 56; } - void write_properties(); - void read_property(const char *); - Fl_Widget *enter_live_mode(int top=0); - void copy_properties(); - void postprocess_read(); - void write_code2(); - void add_child(Fl_Type*, Fl_Type*); - void move_child(Fl_Type*, Fl_Type*); - void remove_child(Fl_Type*); - int is_flex() const {return 1;} + int pixmapID() FL_OVERRIDE { return 56; } + void write_properties() FL_OVERRIDE; + void read_property(const char *) FL_OVERRIDE; + Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE; + void copy_properties() FL_OVERRIDE; + void postprocess_read() FL_OVERRIDE; + void write_code2() FL_OVERRIDE; + 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_flex() const FL_OVERRIDE {return 1;} void change_subtype_to(int n); static int parent_is_flex(Fl_Type*); static int size(Fl_Type*, char fixed_only=0); @@ -119,73 +119,73 @@ extern const char table_type_name[]; class Fl_Table_Type : public Fl_Group_Type { public: - virtual const char *type_name() {return table_type_name;} - virtual const char *alt_type_name() {return "fltk::TableGroup";} - Fl_Widget_Type *_make() {return new Fl_Table_Type();} - Fl_Widget *widget(int X,int Y,int W,int H); - int pixmapID() { return 51; } - virtual Fl_Widget *enter_live_mode(int top=0); - void add_child(Fl_Type*, Fl_Type*); - void move_child(Fl_Type*, Fl_Type*); - void remove_child(Fl_Type*); + const char *type_name() FL_OVERRIDE {return table_type_name;} + const char *alt_type_name() FL_OVERRIDE {return "fltk::TableGroup";} + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Table_Type();} + Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 51; } + Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE; + 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; }; extern const char tabs_type_name[]; class Fl_Tabs_Type : public Fl_Group_Type { public: - virtual void ideal_spacing(int &x, int &y) { + void ideal_spacing(int &x, int &y) FL_OVERRIDE { x = 10; fl_font(o->labelfont(), o->labelsize()); y = fl_height() + o->labelsize() - 6; } - virtual const char *type_name() {return tabs_type_name;} - virtual const char *alt_type_name() {return "fltk::TabGroup";} - Fl_Widget *widget(int X,int Y,int W,int H) { + const char *type_name() FL_OVERRIDE {return tabs_type_name;} + const char *alt_type_name() FL_OVERRIDE {return "fltk::TabGroup";} + Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE { itabs *g = new itabs(X,Y,W,H); Fl_Group::current(0); return g;} - Fl_Widget_Type *_make() {return new Fl_Tabs_Type();} - Fl_Type* click_test(int,int); - void add_child(Fl_Type*, Fl_Type*); - void remove_child(Fl_Type*); - int pixmapID() { return 13; } - Fl_Widget *enter_live_mode(int top=0); + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Tabs_Type();} + Fl_Type* click_test(int,int) FL_OVERRIDE; + void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE; + void remove_child(Fl_Type*) FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 13; } + Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE; }; extern const char scroll_type_name[]; extern Fl_Menu_Item scroll_type_menu[]; class Fl_Scroll_Type : public Fl_Group_Type { - Fl_Menu_Item *subtypes() {return scroll_type_menu;} + Fl_Menu_Item *subtypes() FL_OVERRIDE {return scroll_type_menu;} public: - virtual const char *type_name() {return scroll_type_name;} - virtual const char *alt_type_name() {return "fltk::ScrollGroup";} - Fl_Widget_Type *_make() {return new Fl_Scroll_Type();} - int pixmapID() { return 19; } - Fl_Widget *enter_live_mode(int top=0); - void copy_properties(); + const char *type_name() FL_OVERRIDE {return scroll_type_name;} + const char *alt_type_name() FL_OVERRIDE {return "fltk::ScrollGroup";} + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Scroll_Type();} + int pixmapID() FL_OVERRIDE { return 19; } + Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE; + void copy_properties() FL_OVERRIDE; }; extern const char tile_type_name[]; class Fl_Tile_Type : public Fl_Group_Type { public: - virtual const char *type_name() {return tile_type_name;} - virtual const char *alt_type_name() {return "fltk::TileGroup";} - Fl_Widget_Type *_make() {return new Fl_Tile_Type();} - int pixmapID() { return 20; } - void copy_properties(); + const char *type_name() FL_OVERRIDE {return tile_type_name;} + const char *alt_type_name() FL_OVERRIDE {return "fltk::TileGroup";} + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Tile_Type();} + int pixmapID() FL_OVERRIDE { return 20; } + void copy_properties() FL_OVERRIDE; }; extern const char wizard_type_name[]; class Fl_Wizard_Type : public Fl_Group_Type { public: - virtual const char *type_name() {return wizard_type_name;} - virtual const char *alt_type_name() {return "fltk::WizardGroup";} - Fl_Widget *widget(int X,int Y,int W,int H) { + const char *type_name() FL_OVERRIDE {return wizard_type_name;} + const char *alt_type_name() FL_OVERRIDE {return "fltk::WizardGroup";} + Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE { iwizard *g = new iwizard(X,Y,W,H); Fl_Group::current(0); return g;} - Fl_Widget_Type *_make() {return new Fl_Wizard_Type();} - int pixmapID() { return 21; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Wizard_Type();} + int pixmapID() FL_OVERRIDE { return 21; } }; #endif // _FLUID_FL_GROUP_TYPE_H diff --git a/fluid/Fl_Menu_Type.h b/fluid/Fl_Menu_Type.h index ddd58efae..6b8da257c 100644 --- a/fluid/Fl_Menu_Type.h +++ b/fluid/Fl_Menu_Type.h @@ -33,55 +33,55 @@ extern Fl_Menu_Item menu_item_type_menu[]; class Fl_Menu_Item_Type : public Fl_Widget_Type { public: - Fl_Menu_Item* subtypes() {return menu_item_type_menu;} - const char* type_name() {return "MenuItem";} - const char* alt_type_name() {return "fltk::Item";} - Fl_Type* make(Strategy strategy); - int is_menu_item() const {return 1;} - int is_button() const {return 1;} // this gets shortcut to work - Fl_Widget* widget(int,int,int,int) {return 0;} - Fl_Widget_Type* _make() {return 0;} - const char* menu_name(int& i); + Fl_Menu_Item* subtypes() FL_OVERRIDE {return menu_item_type_menu;} + const char* type_name() FL_OVERRIDE {return "MenuItem";} + const char* alt_type_name() FL_OVERRIDE {return "fltk::Item";} + Fl_Type* make(Strategy strategy) FL_OVERRIDE; + int is_menu_item() const FL_OVERRIDE {return 1;} + int is_button() const FL_OVERRIDE {return 1;} // this gets shortcut to work + Fl_Widget* widget(int,int,int,int) FL_OVERRIDE {return 0;} + Fl_Widget_Type* _make() FL_OVERRIDE {return 0;} + virtual const char* menu_name(int& i); int flags(); - void write_static(); + void write_static() FL_OVERRIDE; void write_item(); - void write_code1(); - void write_code2(); - int pixmapID() { return 16; } + void write_code1() FL_OVERRIDE; + void write_code2() FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 16; } }; class Fl_Radio_Menu_Item_Type : public Fl_Menu_Item_Type { public: - const char* type_name() {return "RadioMenuItem";} - Fl_Type* make(Strategy strategy); - int pixmapID() { return 55; } + const char* type_name() FL_OVERRIDE {return "RadioMenuItem";} + Fl_Type* make(Strategy strategy) FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 55; } }; class Fl_Checkbox_Menu_Item_Type : public Fl_Menu_Item_Type { public: - const char* type_name() {return "CheckMenuItem";} - Fl_Type* make(Strategy strategy); - int pixmapID() { return 54; } + const char* type_name() FL_OVERRIDE {return "CheckMenuItem";} + Fl_Type* make(Strategy strategy) FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 54; } }; class Fl_Submenu_Type : public Fl_Menu_Item_Type { public: - Fl_Menu_Item* subtypes() {return 0;} - const char* type_name() {return "Submenu";} - const char* alt_type_name() {return "fltk::ItemGroup";} - int is_parent() const {return 1;} - int is_button() const {return 0;} // disable shortcut - Fl_Type* make(Strategy strategy); + Fl_Menu_Item* subtypes() FL_OVERRIDE {return 0;} + const char* type_name() FL_OVERRIDE {return "Submenu";} + const char* alt_type_name() FL_OVERRIDE {return "fltk::ItemGroup";} + int is_parent() const FL_OVERRIDE {return 1;} + int is_button() const FL_OVERRIDE {return 0;} // disable shortcut + Fl_Type* make(Strategy strategy) FL_OVERRIDE; // changes to submenu must propagate up so build_menu is called // on the parent Fl_Menu_Type: - void add_child(Fl_Type*a, Fl_Type*b) {parent->add_child(a,b);} - void move_child(Fl_Type*a, Fl_Type*b) {parent->move_child(a,b);} - void remove_child(Fl_Type*a) {parent->remove_child(a);} - int pixmapID() { return 18; } + 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; } }; class Fl_Menu_Type : public Fl_Widget_Type { - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) { + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE { Fl_Menu_ *myo = (Fl_Menu_*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o); switch (w) { case 4: @@ -93,40 +93,40 @@ class Fl_Menu_Type : public Fl_Widget_Type { return 1; } public: - int is_menu_button() const {return 1;} - int is_parent() const {return 1;} + int is_menu_button() const FL_OVERRIDE {return 1;} + int is_parent() const FL_OVERRIDE {return 1;} int menusize; virtual void build_menu(); Fl_Menu_Type() : Fl_Widget_Type() {menusize = 0;} ~Fl_Menu_Type() { if (menusize) delete[] (Fl_Menu_Item*)(((Fl_Menu_*)o)->menu()); } - void add_child(Fl_Type*, Fl_Type*) {build_menu();} - void move_child(Fl_Type*, Fl_Type*) {build_menu();} - void remove_child(Fl_Type*) {build_menu();} - Fl_Type* click_test(int x, int y); - void write_code2(); - void copy_properties(); + void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE {build_menu();} + void move_child(Fl_Type*, Fl_Type*) FL_OVERRIDE {build_menu();} + void remove_child(Fl_Type*) FL_OVERRIDE {build_menu();} + Fl_Type* click_test(int x, int y) FL_OVERRIDE; + void write_code2() FL_OVERRIDE; + void copy_properties() FL_OVERRIDE; }; extern Fl_Menu_Item button_type_menu[]; class Fl_Menu_Button_Type : public Fl_Menu_Type { - Fl_Menu_Item *subtypes() {return button_type_menu;} + Fl_Menu_Item *subtypes() FL_OVERRIDE {return button_type_menu;} public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Widget_Type::ideal_size(w, h); w += 2 * ((o->labelsize() - 3) & ~1) + o->labelsize() - 4; h = (h / 5) * 5; if (h < 15) h = 15; if (w < (15 + h)) w = 15 + h; } - virtual const char *type_name() {return "Fl_Menu_Button";} - virtual const char *alt_type_name() {return "fltk::MenuButton";} - Fl_Widget *widget(int X,int Y,int W,int H) { + const char *type_name() FL_OVERRIDE {return "Fl_Menu_Button";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::MenuButton";} + 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() {return new Fl_Menu_Button_Type();} - int pixmapID() { return 26; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Menu_Button_Type();} + int pixmapID() FL_OVERRIDE { return 26; } }; extern Fl_Menu_Item dummymenu[]; @@ -134,7 +134,7 @@ extern Fl_Menu_Item dummymenu[]; #include <FL/Fl_Choice.H> class Fl_Choice_Type : public Fl_Menu_Type { public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Widget_Type::ideal_size(w, h); int w1 = o->h() - Fl::box_dh(o->box()); if (w1 > 20) w1 = 20; @@ -145,19 +145,19 @@ public: if (h < 15) h = 15; if (w < (15 + h)) w = 15 + h; } - virtual const char *type_name() {return "Fl_Choice";} - virtual const char *alt_type_name() {return "fltk::Choice";} - Fl_Widget *widget(int X,int Y,int W,int H) { + const char *type_name() FL_OVERRIDE {return "Fl_Choice";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Choice";} + Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE { Fl_Choice *myo = new Fl_Choice(X,Y,W,H,"choice:"); myo->menu(dummymenu); return myo; } - Fl_Widget_Type *_make() {return new Fl_Choice_Type();} - int pixmapID() { return 15; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Choice_Type();} + int pixmapID() FL_OVERRIDE { return 15; } }; class Fl_Input_Choice_Type : public Fl_Menu_Type { - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) { + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE { Fl_Input_Choice *myo = (Fl_Input_Choice*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o); switch (w) { case 4: @@ -169,7 +169,7 @@ class Fl_Input_Choice_Type : public Fl_Menu_Type { return 1; } public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Input_Choice *myo = (Fl_Input_Choice *)o; fl_font(myo->textfont(), myo->textsize()); h = fl_height() + myo->textsize() - 6; @@ -179,33 +179,33 @@ public: if (h < 15) h = 15; if (w < (15 + h)) w = 15 + h; } - virtual const char *type_name() {return "Fl_Input_Choice";} - virtual const char *alt_type_name() {return "fltk::ComboBox";} - virtual Fl_Type* click_test(int,int); - Fl_Widget *widget(int X,int Y,int W,int H) { + const char *type_name() FL_OVERRIDE {return "Fl_Input_Choice";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::ComboBox";} + Fl_Type* click_test(int,int) FL_OVERRIDE; + Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE { Fl_Input_Choice *myo = new Fl_Input_Choice(X,Y,W,H,"input choice:"); myo->menu(dummymenu); myo->value("input"); return myo; } - Fl_Widget_Type *_make() {return new Fl_Input_Choice_Type();} - virtual void build_menu(); - int pixmapID() { return 53; } - void copy_properties(); + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Input_Choice_Type();} + void build_menu() FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 53; } + void copy_properties() FL_OVERRIDE; }; class Fl_Menu_Bar_Type : public Fl_Menu_Type { public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { w = o->window()->w(); h = ((o->labelsize() + Fl::box_dh(o->box()) + 4) / 5) * 5; if (h < 15) h = 15; } - virtual const char *type_name() {return "Fl_Menu_Bar";} - virtual const char *alt_type_name() {return "fltk::MenuBar";} - Fl_Widget *widget(int X,int Y,int W,int H) {return new Fl_Menu_Bar(X,Y,W,H);} - Fl_Widget_Type *_make() {return new Fl_Menu_Bar_Type();} - int pixmapID() { return 17; } + const char *type_name() FL_OVERRIDE {return "Fl_Menu_Bar";} + 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; } }; diff --git a/fluid/Fl_Widget_Type.h b/fluid/Fl_Widget_Type.h index 9a8555c3f..a9e9942e1 100644 --- a/fluid/Fl_Widget_Type.h +++ b/fluid/Fl_Widget_Type.h @@ -40,7 +40,7 @@ void comment_cb(class Fl_Text_Editor* i, void *v); class Fl_Widget_Type : public Fl_Type { virtual Fl_Widget *widget(int,int,int,int) = 0; virtual Fl_Widget_Type *_make() = 0; // virtual constructor - virtual void setlabel(const char *); + void setlabel(const char *) FL_OVERRIDE; const char *extra_code_[NUM_EXTRA_CODE]; const char *subclass_; @@ -51,12 +51,12 @@ class Fl_Widget_Type : public Fl_Type { protected: - void write_static(); - void write_code1(); + void write_static() FL_OVERRIDE; + void write_code1() FL_OVERRIDE; void write_widget_code(); void write_extra_code(); void write_block_close(); - void write_code2(); + void write_code2() FL_OVERRIDE; void write_color(const char*, Fl_Color); Fl_Widget *live_widget; @@ -75,8 +75,8 @@ public: void setinactive(Fluid_Image *); Fl_Widget_Type(); - Fl_Type *make(Strategy strategy); - void open(); + Fl_Type *make(Strategy strategy) FL_OVERRIDE; + void open() FL_OVERRIDE; const char *extra_code(int n) const {return extra_code_[n];} void extra_code(int n,const char *); @@ -96,16 +96,16 @@ public: virtual int textstuff(int what, Fl_Font &, int &, Fl_Color &); virtual Fl_Menu_Item *subtypes(); - virtual int is_widget() const; - virtual int is_public() const; + int is_widget() const FL_OVERRIDE; + int is_public() const FL_OVERRIDE; - 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; - virtual Fl_Widget *enter_live_mode(int top=0); - virtual void leave_live_mode(); - virtual void copy_properties(); + Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE; + void leave_live_mode() FL_OVERRIDE; + void copy_properties() FL_OVERRIDE; virtual void ideal_size(int &w, int &h); virtual void ideal_spacing(int &x, int &y); diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx index 0ac8cf3f5..8f9ce2a14 100644 --- a/fluid/Fl_Window_Type.cxx +++ b/fluid/Fl_Window_Type.cxx @@ -313,13 +313,13 @@ static int overlays_invisible; // an overlay for the fluid ui, and special-cases the FL_NO_BOX. class Overlay_Window : public Fl_Overlay_Window { - void draw(); - void draw_overlay(); + void draw() FL_OVERRIDE; + void draw_overlay() FL_OVERRIDE; public: Fl_Window_Type *window; - int handle(int); + int handle(int) FL_OVERRIDE; Overlay_Window(int W,int H) : Fl_Overlay_Window(W,H) {Fl_Group::current(0);} - void resize(int,int,int,int); + void resize(int,int,int,int) FL_OVERRIDE; uchar *read_image(int &ww, int &hh); }; void Overlay_Window::draw() { 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 diff --git a/fluid/Shortcut_Button.h b/fluid/Shortcut_Button.h index 97d7d9323..7f1755ef0 100644 --- a/fluid/Shortcut_Button.h +++ b/fluid/Shortcut_Button.h @@ -24,8 +24,8 @@ class Shortcut_Button : public Fl_Button { public: int svalue; - int handle(int); - void draw(); + int handle(int) FL_OVERRIDE; + void draw() FL_OVERRIDE; Shortcut_Button(int X,int Y,int W,int H, const char* l = 0) : Fl_Button(X,Y,W,H,l) {svalue = 0;} }; @@ -33,7 +33,7 @@ public: // Adding drag and drop for dragging widgets into windows. class Widget_Bin_Button : public Fl_Button { public: - int handle(int); + int handle(int) FL_OVERRIDE; Widget_Bin_Button(int X,int Y,int W,int H, const char* l = 0) : Fl_Button(X,Y,W,H,l) { } }; @@ -41,7 +41,7 @@ public: // Adding drag and drop functionality to drag window prototypes onto the desktop. class Widget_Bin_Window_Button : public Fl_Button { public: - int handle(int); + int handle(int) FL_OVERRIDE; Widget_Bin_Window_Button(int X,int Y,int W,int H, const char* l = 0) : Fl_Button(X,Y,W,H,l) { } }; diff --git a/fluid/factory.cxx b/fluid/factory.cxx index 4cfa2404c..551d2b11e 100644 --- a/fluid/factory.cxx +++ b/fluid/factory.cxx @@ -47,12 +47,12 @@ #include <FL/Fl_Box.H> class Fl_Box_Type : public Fl_Widget_Type { public: - virtual const char *type_name() {return "Fl_Box";} - virtual const char *alt_type_name() {return "fltk::Widget";} - Fl_Widget *widget(int x,int y,int w, int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Box";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Widget";} + Fl_Widget *widget(int x,int y,int w, int h) FL_OVERRIDE { return new Fl_Box(x,y,w,h,"label");} - Fl_Widget_Type *_make() {return new Fl_Box_Type();} - int pixmapID() { return 5; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Box_Type();} + int pixmapID() FL_OVERRIDE { return 5; } }; static Fl_Box_Type Fl_Box_type; @@ -65,20 +65,20 @@ static Fl_Menu_Item buttontype_menu[] = { {"Radio",0,0,(void*)FL_RADIO_BUTTON}, {0}}; class Fl_Button_Type : public Fl_Widget_Type { - Fl_Menu_Item *subtypes() {return buttontype_menu;} + Fl_Menu_Item *subtypes() FL_OVERRIDE {return buttontype_menu;} public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Widget_Type::ideal_size(w, h); w += 2 * (o->labelsize() - 4); h = (h / 5) * 5; } - virtual const char *type_name() {return "Fl_Button";} - virtual const char *alt_type_name() {return "fltk::Button";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Button";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Button";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Button(x,y,w,h,"button");} - Fl_Widget_Type *_make() {return new Fl_Button_Type();} - int is_button() const {return 1;} - int pixmapID() { return 2; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Button_Type();} + int is_button() const FL_OVERRIDE {return 1;} + int pixmapID() FL_OVERRIDE { return 2; } }; static Fl_Button_Type Fl_Button_type; @@ -87,18 +87,18 @@ static Fl_Button_Type Fl_Button_type; #include <FL/Fl_Return_Button.H> class Fl_Return_Button_Type : public Fl_Button_Type { public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Button_Type::ideal_size(w, h); int W = o->h(); if (o->w()/3 < W) W = o->w()/3; w += W + 8 - o->labelsize(); } - virtual const char *type_name() {return "Fl_Return_Button";} - virtual const char *alt_type_name() {return "fltk::ReturnButton";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Return_Button";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::ReturnButton";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Return_Button(x,y,w,h,"button");} - Fl_Widget_Type *_make() {return new Fl_Return_Button_Type();} - int pixmapID() { return 23; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Return_Button_Type();} + int pixmapID() FL_OVERRIDE { return 23; } }; static Fl_Return_Button_Type Fl_Return_Button_type; @@ -107,12 +107,12 @@ static Fl_Return_Button_Type Fl_Return_Button_type; #include <FL/Fl_Repeat_Button.H> class Fl_Repeat_Button_Type : public Fl_Widget_Type { public: - virtual const char *type_name() {return "Fl_Repeat_Button";} - virtual const char *alt_type_name() {return "fltk::RepeatButton";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Repeat_Button";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::RepeatButton";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Repeat_Button(x,y,w,h,"button");} - Fl_Widget_Type *_make() {return new Fl_Repeat_Button_Type();} - int pixmapID() { return 25; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Repeat_Button_Type();} + int pixmapID() FL_OVERRIDE { return 25; } }; static Fl_Repeat_Button_Type Fl_Repeat_Button_type; @@ -121,16 +121,16 @@ static Fl_Repeat_Button_Type Fl_Repeat_Button_type; #include <FL/Fl_Light_Button.H> class Fl_Light_Button_Type : public Fl_Button_Type { public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Button_Type::ideal_size(w, h); w += 4; } - virtual const char *type_name() {return "Fl_Light_Button";} - virtual const char *alt_type_name() {return "fltk::LightButton";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Light_Button";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::LightButton";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Light_Button(x,y,w,h,"button");} - Fl_Widget_Type *_make() {return new Fl_Light_Button_Type();} - int pixmapID() { return 24; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Light_Button_Type();} + int pixmapID() FL_OVERRIDE { return 24; } }; static Fl_Light_Button_Type Fl_Light_Button_type; @@ -139,16 +139,16 @@ static Fl_Light_Button_Type Fl_Light_Button_type; #include <FL/Fl_Check_Button.H> class Fl_Check_Button_Type : public Fl_Button_Type { public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Button_Type::ideal_size(w, h); w += 4; } - virtual const char *type_name() {return "Fl_Check_Button";} - virtual const char *alt_type_name() {return "fltk::CheckButton";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Check_Button";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::CheckButton";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Check_Button(x,y,w,h,"button");} - Fl_Widget_Type *_make() {return new Fl_Check_Button_Type();} - int pixmapID() { return 3; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Check_Button_Type();} + int pixmapID() FL_OVERRIDE { return 3; } }; static Fl_Check_Button_Type Fl_Check_Button_type; @@ -157,16 +157,16 @@ static Fl_Check_Button_Type Fl_Check_Button_type; #include <FL/Fl_Round_Button.H> class Fl_Round_Button_Type : public Fl_Button_Type { public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Button_Type::ideal_size(w, h); w += 4; } - virtual const char *type_name() {return "Fl_Round_Button";} - virtual const char *alt_type_name() {return "fltk::RadioButton";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Round_Button";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::RadioButton";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Round_Button(x,y,w,h,"button");} - Fl_Widget_Type *_make() {return new Fl_Round_Button_Type();} - int pixmapID() { return 4; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Round_Button_Type();} + int pixmapID() FL_OVERRIDE { return 4; } }; static Fl_Round_Button_Type Fl_Round_Button_type; @@ -183,10 +183,10 @@ static Fl_Menu_Item browser_type_menu[] = { {"Multi",0,0,(void*)FL_MULTI_BROWSER}, {0}}; class Fl_Browser_Type : public Fl_Widget_Type { - Fl_Menu_Item *subtypes() {return browser_type_menu;} - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); + Fl_Menu_Item *subtypes() FL_OVERRIDE {return browser_type_menu;} + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Browser *myo = (Fl_Browser *)o; fl_font(myo->textfont(), myo->textsize()); h -= Fl::box_dh(o->box()); @@ -197,9 +197,9 @@ public: if (h < 30) h = 30; if (w < 50) w = 50; } - virtual const char *type_name() {return "Fl_Browser";} - virtual const char *alt_type_name() {return "fltk::Browser";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Browser";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Browser";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Browser* b = new Fl_Browser(x,y,w,h); // Fl_Browser::add calls fl_height(), which requires the X display open. // Avoid this when compiling so it works w/o a display: @@ -212,8 +212,8 @@ public: } return b; } - Fl_Widget_Type *_make() {return new Fl_Browser_Type();} - int pixmapID() { return 31; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Browser_Type();} + int pixmapID() FL_OVERRIDE { return 31; } }; static Fl_Browser_Type Fl_Browser_type; @@ -230,10 +230,10 @@ int Fl_Browser_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) { } class Fl_Check_Browser_Type : public Fl_Widget_Type { - Fl_Menu_Item *subtypes() {return browser_type_menu;} - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); + Fl_Menu_Item *subtypes() FL_OVERRIDE {return browser_type_menu;} + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Check_Browser *myo = (Fl_Check_Browser *)o; fl_font(myo->textfont(), myo->textsize()); h -= Fl::box_dh(o->box()); @@ -244,9 +244,9 @@ public: if (h < 30) h = 30; if (w < 50) w = 50; } - virtual const char *type_name() {return "Fl_Check_Browser";} - virtual const char *alt_type_name() {return "fltk::CheckBrowser";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Check_Browser";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::CheckBrowser";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Check_Browser* b = new Fl_Check_Browser(x,y,w,h); // Fl_Check_Browser::add calls fl_height(), which requires the X display open. // Avoid this when compiling so it works w/o a display: @@ -259,8 +259,8 @@ public: } return b; } - Fl_Widget_Type *_make() {return new Fl_Check_Browser_Type();} - int pixmapID() { return 32; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Check_Browser_Type();} + int pixmapID() FL_OVERRIDE { return 32; } }; static Fl_Check_Browser_Type Fl_Check_Browser_type; @@ -278,13 +278,13 @@ int Fl_Check_Browser_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) { class Fl_Tree_Type : public Fl_Widget_Type { public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { if (h < 60) h = 60; if (w < 80) w = 80; } - virtual const char *type_name() {return "Fl_Tree";} - virtual const char *alt_type_name() {return "fltk::TreeBrowser";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Tree";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::TreeBrowser";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Tree* b = new Fl_Tree(x,y,w,h); if (!batch_mode) { b->add("/A1/B1/C1"); @@ -298,16 +298,16 @@ public: } return b; } - Fl_Widget_Type *_make() {return new Fl_Tree_Type();} - int pixmapID() { return 50; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Tree_Type();} + int pixmapID() FL_OVERRIDE { return 50; } }; static Fl_Tree_Type Fl_Tree_type; class Fl_File_Browser_Type : public Fl_Widget_Type { - Fl_Menu_Item *subtypes() {return browser_type_menu;} - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); + Fl_Menu_Item *subtypes() FL_OVERRIDE {return browser_type_menu;} + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_File_Browser *myo = (Fl_File_Browser *)o; fl_font(myo->textfont(), myo->textsize()); h -= Fl::box_dh(o->box()); @@ -318,9 +318,9 @@ public: if (h < 30) h = 30; if (w < 50) w = 50; } - virtual const char *type_name() {return "Fl_File_Browser";} - virtual const char *alt_type_name() {return "fltk::FileBrowser";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_File_Browser";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::FileBrowser";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_File_Browser* b = new Fl_File_Browser(x,y,w,h); // Fl_File_Browser::add calls fl_height(), which requires the X display open. // Avoid this when compiling so it works w/o a display: @@ -329,8 +329,8 @@ public: } return b; } - Fl_Widget_Type *_make() {return new Fl_File_Browser_Type();} - int pixmapID() { return 33; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_File_Browser_Type();} + int pixmapID() FL_OVERRIDE { return 33; } }; static Fl_File_Browser_Type Fl_File_Browser_type; @@ -354,16 +354,16 @@ static Fl_Menu_Item counter_type_menu[] = { {"Simple",0,0,(void*)FL_SIMPLE_COUNTER}, {0}}; class Fl_Counter_Type : public Fl_Widget_Type { - Fl_Menu_Item *subtypes() {return counter_type_menu;} - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); - int is_valuator() const {return 1;} - int pixmapID() { return 41; } + Fl_Menu_Item *subtypes() FL_OVERRIDE {return counter_type_menu;} + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; + int is_valuator() const FL_OVERRIDE {return 1;} + int pixmapID() FL_OVERRIDE { return 41; } public: - virtual const char *type_name() {return "Fl_Counter";} - virtual const char *alt_type_name() {return "fltk::Counter";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Counter";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Counter";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Counter(x,y,w,h,"counter:");} - Fl_Widget_Type *_make() {return new Fl_Counter_Type();} + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Counter_Type();} }; static Fl_Counter_Type Fl_Counter_type; @@ -387,11 +387,11 @@ static Fl_Menu_Item spinner_type_menu[] = { {"Float", 0,0,(void*)FL_FLOAT_INPUT}, {0}}; class Fl_Spinner_Type : public Fl_Widget_Type { - Fl_Menu_Item *subtypes() {return spinner_type_menu;} - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); - int pixmapID() { return 47; } + Fl_Menu_Item *subtypes() FL_OVERRIDE {return spinner_type_menu;} + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; + int pixmapID() FL_OVERRIDE { return 47; } public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Spinner *myo = (Fl_Spinner *)o; fl_font(myo->textfont(), myo->textsize()); h = fl_height() + myo->textsize() - 6; @@ -401,13 +401,13 @@ public: w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box()) + h / 2; if (w < 40) w = 40 ; } - virtual const char *type_name() {return "Fl_Spinner";} - virtual const char *alt_type_name() {return "fltk::Spinner";} - int is_spinner() const { return 1; } - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Spinner";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Spinner";} + int is_spinner() const FL_OVERRIDE { return 1; } + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Spinner(x,y,w,h,"spinner:"); } - Fl_Widget_Type *_make() {return new Fl_Spinner_Type();} + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Spinner_Type();} }; static Fl_Spinner_Type Fl_Spinner_type; @@ -434,10 +434,10 @@ static Fl_Menu_Item input_type_menu[] = { {"Float",0,0,(void*)FL_FLOAT_INPUT}, {0}}; class Fl_Input_Type : public Fl_Widget_Type { - Fl_Menu_Item *subtypes() {return input_type_menu;} - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); + Fl_Menu_Item *subtypes() FL_OVERRIDE {return input_type_menu;} + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Input *myo = (Fl_Input *)o; fl_font(myo->textfont(), myo->textsize()); h = fl_height() + myo->textsize() - 6; @@ -447,17 +447,17 @@ public: if (h < 15) h = 15; if (w < 15) w = 15; } - virtual const char *type_name() {return "Fl_Input";} - virtual const char *alt_type_name() {return "fltk::Input";} - int is_input() const {return 1;} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Input";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Input";} + int is_input() const FL_OVERRIDE {return 1;} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Input *myo = new Fl_Input(x,y,w,h,"input:"); myo->value("Text Input"); return myo; } - Fl_Widget_Type *_make() {return new Fl_Input_Type();} - int pixmapID() { return 14; } - virtual void copy_properties() { + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Input_Type();} + int pixmapID() FL_OVERRIDE { return 14; } + void copy_properties() FL_OVERRIDE { Fl_Widget_Type::copy_properties(); Fl_Input_ *d = (Fl_Input_*)live_widget, *s = (Fl_Input_*)o; d->textfont(s->textfont()); @@ -484,10 +484,10 @@ int Fl_Input_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) { #include <FL/Fl_File_Input.H> class Fl_File_Input_Type : public Fl_Widget_Type { - Fl_Menu_Item *subtypes() {return 0;} - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); + Fl_Menu_Item *subtypes() FL_OVERRIDE {return 0;} + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_File_Input *myo = (Fl_File_Input *)o; fl_font(myo->textfont(), myo->textsize()); h = fl_height() + myo->textsize() + 4; @@ -497,16 +497,16 @@ public: if (h < 20) h = 20; if (w < 50) w = 50; } - virtual const char *type_name() {return "Fl_File_Input";} - virtual const char *alt_type_name() {return "fltk::FileInput";} - int is_input() const {return 1;} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_File_Input";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::FileInput";} + int is_input() const FL_OVERRIDE {return 1;} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_File_Input *myo = new Fl_File_Input(x,y,w,h,"file:"); myo->value("/now/is/the/time/for/a/filename.ext"); return myo; } - Fl_Widget_Type *_make() {return new Fl_File_Input_Type();} - int pixmapID() { return 30; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_File_Input_Type();} + int pixmapID() FL_OVERRIDE { return 30; } }; static Fl_File_Input_Type Fl_File_Input_type; @@ -526,9 +526,9 @@ int Fl_File_Input_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) { #include <FL/Fl_Text_Display.H> class Fl_Text_Display_Type : public Fl_Widget_Type { - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Text_Display *myo = (Fl_Text_Display *)o; fl_font(myo->textfont(), myo->textsize()); h -= Fl::box_dh(o->box()); @@ -539,15 +539,15 @@ public: if (h < 30) h = 30; if (w < 50) w = 50; } - virtual const char *type_name() {return "Fl_Text_Display";} - virtual const char *alt_type_name() {return "fltk::TextDisplay";} - int is_text_display() const {return 1;} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Text_Display";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::TextDisplay";} + int is_text_display() const FL_OVERRIDE {return 1;} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Text_Display *myo = new Fl_Text_Display(x,y,w,h); return myo; } - Fl_Widget_Type *_make() {return new Fl_Text_Display_Type();} - int pixmapID() { return 28; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Text_Display_Type();} + int pixmapID() FL_OVERRIDE { return 28; } }; static Fl_Text_Display_Type Fl_Text_Display_type; @@ -567,9 +567,9 @@ int Fl_Text_Display_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) { #include <FL/Fl_Text_Editor.H> class Fl_Text_Editor_Type : public Fl_Widget_Type { - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Text_Editor *myo = (Fl_Text_Editor *)o; fl_font(myo->textfont(), myo->textsize()); h -= Fl::box_dh(o->box()); @@ -580,15 +580,15 @@ public: if (h < 30) h = 30; if (w < 50) w = 50; } - virtual const char *type_name() {return "Fl_Text_Editor";} - virtual const char *alt_type_name() {return "fltk::TextEditor";} - int is_text_display() const {return 1;} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Text_Editor";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::TextEditor";} + int is_text_display() const FL_OVERRIDE {return 1;} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Text_Editor *myo = new Fl_Text_Editor(x,y,w,h); return myo; } - Fl_Widget_Type *_make() {return new Fl_Text_Editor_Type();} - int pixmapID() { return 29; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Text_Editor_Type();} + int pixmapID() FL_OVERRIDE { return 29; } }; static Fl_Text_Editor_Type Fl_Text_Editor_type; @@ -609,10 +609,10 @@ int Fl_Text_Editor_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) { #include <FL/Fl_Simple_Terminal.H> class Fl_Simple_Terminal_Type : public Fl_Text_Editor_Type { public: - virtual const char *type_name() {return "Fl_Simple_Terminal";} - virtual const char *alt_type_name() {return "fltk::SimpleTerminal";} - int is_text_display() const {return 1;} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Simple_Terminal";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::SimpleTerminal";} + int is_text_display() const FL_OVERRIDE {return 1;} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Widget *myo = 0L; if (batch_mode) { // The Fl_Simple_Terminal constructor attaches a buffer which in turn @@ -624,8 +624,8 @@ public: } return myo; } - Fl_Widget_Type *_make() {return new Fl_Simple_Terminal_Type();} - int pixmapID() { return 52; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Simple_Terminal_Type();} + int pixmapID() FL_OVERRIDE { return 52; } }; static Fl_Simple_Terminal_Type Fl_Simple_Terminal_type; @@ -634,12 +634,12 @@ static Fl_Simple_Terminal_Type Fl_Simple_Terminal_type; #include <FL/Fl_Clock.H> class Fl_Clock_Type : public Fl_Widget_Type { public: - virtual const char *type_name() {return "Fl_Clock";} - virtual const char *alt_type_name() {return "fltk::Clock";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Clock";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Clock";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Clock(x,y,w,h);} - Fl_Widget_Type *_make() {return new Fl_Clock_Type();} - int pixmapID() { return 34; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Clock_Type();} + int pixmapID() FL_OVERRIDE { return 34; } }; static Fl_Clock_Type Fl_Clock_type; @@ -648,7 +648,7 @@ static Fl_Clock_Type Fl_Clock_type; #include <FL/Fl_Help_View.H> class Fl_Help_View_Type : public Fl_Widget_Type { public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Help_View *myo = (Fl_Help_View *)o; fl_font(myo->textfont(), myo->textsize()); h -= Fl::box_dh(o->box()); @@ -659,17 +659,17 @@ public: if (h < 30) h = 30; if (w < 50) w = 50; } - virtual const char *type_name() {return "Fl_Help_View";} - virtual const char *alt_type_name() {return "fltk::HelpView";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Help_View";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::HelpView";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Help_View *myo = new Fl_Help_View(x,y,w,h); if (!batch_mode) { myo->value("<HTML><BODY><H1>Fl_Help_View Widget</H1>" "<P>This is a Fl_Help_View widget.</P></BODY></HTML>"); } return myo;} - Fl_Widget_Type *_make() {return new Fl_Help_View_Type();} - int pixmapID() { return 35; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Help_View_Type();} + int pixmapID() FL_OVERRIDE { return 35; } }; static Fl_Help_View_Type Fl_Help_View_type; @@ -678,14 +678,14 @@ static Fl_Help_View_Type Fl_Help_View_type; #include <FL/Fl_Progress.H> class Fl_Progress_Type : public Fl_Widget_Type { public: - virtual const char *type_name() {return "Fl_Progress";} - virtual const char *alt_type_name() {return "fltk::ProgressBar";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Progress";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::ProgressBar";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Progress *myo = new Fl_Progress(x,y,w,h,"label"); myo->value(50); return myo;} - Fl_Widget_Type *_make() {return new Fl_Progress_Type();} - int pixmapID() { return 36; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Progress_Type();} + int pixmapID() FL_OVERRIDE { return 36; } }; static Fl_Progress_Type Fl_Progress_type; @@ -693,14 +693,14 @@ static Fl_Progress_Type Fl_Progress_type; #include <FL/Fl_Adjuster.H> class Fl_Adjuster_Type : public Fl_Widget_Type { - int is_valuator() const {return 1;} + int is_valuator() const FL_OVERRIDE {return 1;} public: - virtual const char *type_name() {return "Fl_Adjuster";} - virtual const char *alt_type_name() {return "fltk::Adjuster";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Adjuster";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Adjuster";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Adjuster(x,y,w,h);} - Fl_Widget_Type *_make() {return new Fl_Adjuster_Type();} - int pixmapID() { return 40; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Adjuster_Type();} + int pixmapID() FL_OVERRIDE { return 40; } }; static Fl_Adjuster_Type Fl_Adjuster_type; @@ -713,15 +713,15 @@ static Fl_Menu_Item dial_type_menu[] = { {"Fill",0,0,(void*)FL_FILL_DIAL}, {0}}; class Fl_Dial_Type : public Fl_Widget_Type { - Fl_Menu_Item *subtypes() {return dial_type_menu;} - int is_valuator() const {return 1;} + Fl_Menu_Item *subtypes() FL_OVERRIDE {return dial_type_menu;} + int is_valuator() const FL_OVERRIDE {return 1;} public: - virtual const char *type_name() {return "Fl_Dial";} - virtual const char *alt_type_name() {return "fltk::Dial";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Dial";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Dial";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Dial(x,y,w,h);} - Fl_Widget_Type *_make() {return new Fl_Dial_Type();} - int pixmapID() { return 42; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Dial_Type();} + int pixmapID() FL_OVERRIDE { return 42; } }; static Fl_Dial_Type Fl_Dial_type; @@ -733,15 +733,15 @@ static Fl_Menu_Item roller_type_menu[] = { {"Horizontal",0,0,(void*)FL_HORIZONTAL}, {0}}; class Fl_Roller_Type : public Fl_Widget_Type { - Fl_Menu_Item *subtypes() {return roller_type_menu;} - int is_valuator() const {return 1;} + Fl_Menu_Item *subtypes() FL_OVERRIDE {return roller_type_menu;} + int is_valuator() const FL_OVERRIDE {return 1;} public: - virtual const char *type_name() {return "Fl_Roller";} - virtual const char *alt_type_name() {return "fltk::Roller";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Roller";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Roller";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Roller(x,y,w,h);} - Fl_Widget_Type *_make() {return new Fl_Roller_Type();} - int pixmapID() { return 43; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Roller_Type();} + int pixmapID() FL_OVERRIDE { return 43; } }; static Fl_Roller_Type Fl_Roller_type; @@ -757,15 +757,15 @@ static Fl_Menu_Item slider_type_menu[] = { {"Horz Knob",0,0,(void*)FL_HOR_NICE_SLIDER}, {0}}; class Fl_Slider_Type : public Fl_Widget_Type { - Fl_Menu_Item *subtypes() {return slider_type_menu;} - int is_valuator() const {return 2;} + Fl_Menu_Item *subtypes() FL_OVERRIDE {return slider_type_menu;} + int is_valuator() const FL_OVERRIDE {return 2;} public: - virtual const char *type_name() {return "Fl_Slider";} - virtual const char *alt_type_name() {return "fltk::Slider";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Slider";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Slider";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Slider(x,y,w,h,"slider:");} - Fl_Widget_Type *_make() {return new Fl_Slider_Type();} - int pixmapID() { return 37; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Slider_Type();} + int pixmapID() FL_OVERRIDE { return 37; } }; static Fl_Slider_Type Fl_Slider_type; @@ -774,15 +774,15 @@ static Fl_Menu_Item scrollbar_type_menu[] = { {"Horizontal",0,0,(void*)FL_HOR_SLIDER}, {0}}; class Fl_Scrollbar_Type : public Fl_Slider_Type { - Fl_Menu_Item *subtypes() {return scrollbar_type_menu;} - int is_valuator() const {return 3;} + Fl_Menu_Item *subtypes() FL_OVERRIDE {return scrollbar_type_menu;} + int is_valuator() const FL_OVERRIDE {return 3;} public: - virtual const char *type_name() {return "Fl_Scrollbar";} - virtual const char *alt_type_name() {return "fltk::Scrollbar";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Scrollbar";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Scrollbar";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Scrollbar(x,y,w,h);} - Fl_Widget_Type *_make() {return new Fl_Scrollbar_Type();} - int pixmapID() { return 38; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Scrollbar_Type();} + int pixmapID() FL_OVERRIDE { return 38; } }; static Fl_Scrollbar_Type Fl_Scrollbar_type; @@ -794,9 +794,9 @@ static Fl_Menu_Item output_type_menu[] = { {"Multiline",0,0,(void*)FL_MULTILINE_OUTPUT}, {0}}; class Fl_Output_Type : public Fl_Input_Type { - Fl_Menu_Item *subtypes() {return output_type_menu;} + Fl_Menu_Item *subtypes() FL_OVERRIDE {return output_type_menu;} public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Output *myo = (Fl_Output *)o; fl_font(myo->textfont(), myo->textsize()); h = fl_height() + myo->textsize() - 6; @@ -806,15 +806,15 @@ public: if (h < 15) h = 15; if (w < 15) w = 15; } - virtual const char *type_name() {return "Fl_Output";} - virtual const char *alt_type_name() {return "fltk::Output";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Output";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::Output";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Output *myo = new Fl_Output(x,y,w,h,"output:"); myo->value("Text Output"); return myo; } - Fl_Widget_Type *_make() {return new Fl_Output_Type();} - int pixmapID() { return 27; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Output_Type();} + int pixmapID() FL_OVERRIDE { return 27; } }; static Fl_Output_Type Fl_Output_type; @@ -823,7 +823,7 @@ static Fl_Output_Type Fl_Output_type; #include <FL/Fl_Value_Input.H> class Fl_Value_Input_Type : public Fl_Widget_Type { public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Value_Input *myo = (Fl_Value_Input *)o; fl_font(myo->textfont(), myo->textsize()); h = fl_height() + myo->textsize() - 6; @@ -833,17 +833,17 @@ public: if (h < 15) h = 15; if (w < 15) w = 15; } - virtual const char *type_name() {return "Fl_Value_Input";} - virtual const char *alt_type_name() {return "fltk::ValueInput";} - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); - int is_valuator() const {return 1;} - int is_value_input() const {return 1;} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Value_Input";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::ValueInput";} + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; + int is_valuator() const FL_OVERRIDE {return 1;} + int is_value_input() const FL_OVERRIDE {return 1;} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Value_Input *myo = new Fl_Value_Input(x,y,w,h,"value:"); return myo; } - Fl_Widget_Type *_make() {return new Fl_Value_Input_Type();} - int pixmapID() { return 44; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Value_Input_Type();} + int pixmapID() FL_OVERRIDE { return 44; } }; static Fl_Value_Input_Type Fl_Value_Input_type; @@ -864,7 +864,7 @@ int Fl_Value_Input_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) { #include <FL/Fl_Value_Output.H> class Fl_Value_Output_Type : public Fl_Widget_Type { public: - virtual void ideal_size(int &w, int &h) { + void ideal_size(int &w, int &h) FL_OVERRIDE { Fl_Value_Output *myo = (Fl_Value_Output *)o; fl_font(myo->textfont(), myo->textsize()); h = fl_height() + myo->textsize() - 6; @@ -874,16 +874,16 @@ public: if (h < 15) h = 15; if (w < 15) w = 15; } - virtual const char *type_name() {return "Fl_Value_Output";} - virtual const char *alt_type_name() {return "fltk::ValueOutput";} - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); - int is_valuator() const {return 1;} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Value_Output";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::ValueOutput";} + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; + int is_valuator() const FL_OVERRIDE {return 1;} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { Fl_Value_Output *myo = new Fl_Value_Output(x,y,w,h,"value:"); return myo; } - Fl_Widget_Type *_make() {return new Fl_Value_Output_Type();} - int pixmapID() { return 45; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Value_Output_Type();} + int pixmapID() FL_OVERRIDE { return 45; } }; static Fl_Value_Output_Type Fl_Value_Output_type; @@ -903,14 +903,14 @@ int Fl_Value_Output_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) { #include <FL/Fl_Value_Slider.H> class Fl_Value_Slider_Type : public Fl_Slider_Type { - int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c); + int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE; public: - virtual const char *type_name() {return "Fl_Value_Slider";} - virtual const char *alt_type_name() {return "fltk::ValueSlider";} - Fl_Widget *widget(int x,int y,int w,int h) { + const char *type_name() FL_OVERRIDE {return "Fl_Value_Slider";} + const char *alt_type_name() FL_OVERRIDE {return "fltk::ValueSlider";} + Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE { return new Fl_Value_Slider(x,y,w,h,"slider:");} - Fl_Widget_Type *_make() {return new Fl_Value_Slider_Type();} - int pixmapID() { return 39; } + Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Value_Slider_Type();} + int pixmapID() FL_OVERRIDE { return 39; } }; static Fl_Value_Slider_Type Fl_Value_Slider_type; diff --git a/fluid/widget_browser.h b/fluid/widget_browser.h index f0e68f364..00053419a 100644 --- a/fluid/widget_browser.h +++ b/fluid/widget_browser.h @@ -45,19 +45,19 @@ class Widget_Browser : public Fl_Browser_ int saved_v_scroll_; // required routines for Fl_Browser_ subclass: - void *item_first() const ; - void *item_next(void *) const ; - void *item_prev(void *) const ; - int item_selected(void *) const ; - void item_select(void *,int); - int item_width(void *) const ; - int item_height(void *) const ; - void item_draw(void *,int,int,int,int) const ; - int incr_height() const ; + void *item_first() const FL_OVERRIDE; + void *item_next(void *) const FL_OVERRIDE; + void *item_prev(void *) const FL_OVERRIDE; + int item_selected(void *) const FL_OVERRIDE; + void item_select(void *,int) FL_OVERRIDE; + int item_width(void *) const FL_OVERRIDE; + int item_height(void *) const FL_OVERRIDE; + void item_draw(void *,int,int,int,int) const FL_OVERRIDE; + int incr_height() const FL_OVERRIDE; public: Widget_Browser(int,int,int,int,const char * =NULL); - int handle(int); + int handle(int) FL_OVERRIDE; void callback(); void save_scroll_position(); void restore_scroll_position(); |
