From 44c874b731f9f58c2f50c3c6076371058cbe26e3 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 30 Dec 2022 19:14:36 +0100 Subject: [PATCH] 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() --- FL/Fl_Adjuster.H | 6 +- FL/Fl_Bitmap.H | 10 +- FL/Fl_Box.H | 4 +- FL/Fl_Browser.H | 32 +- FL/Fl_Browser_.H | 6 +- FL/Fl_Button.H | 4 +- FL/Fl_Cairo_Window.H | 2 +- FL/Fl_Chart.H | 2 +- FL/Fl_Check_Browser.H | 26 +- FL/Fl_Choice.H | 4 +- FL/Fl_Clock.H | 4 +- FL/Fl_Color_Chooser.H | 12 +- FL/Fl_Copy_Surface.H | 22 +- FL/Fl_Counter.H | 4 +- FL/Fl_Dial.H | 4 +- FL/Fl_Double_Window.H | 10 +- FL/Fl_File_Browser.H | 10 +- FL/Fl_File_Input.H | 4 +- FL/Fl_Flex.H | 4 +- FL/Fl_FormsBitmap.H | 2 +- FL/Fl_FormsPixmap.H | 2 +- FL/Fl_Free.H | 4 +- FL/Fl_Gl_Window.H | 14 +- FL/Fl_Graphics_Driver.H | 80 ++-- FL/Fl_Group.H | 8 +- FL/Fl_Help_View.H | 6 +- FL/Fl_Image.H | 16 +- FL/Fl_Image_Surface.H | 22 +- FL/Fl_Input.H | 4 +- FL/Fl_Input_.H | 2 +- FL/Fl_Input_Choice.H | 6 +- FL/Fl_Light_Button.H | 4 +- FL/Fl_Menu_Bar.H | 4 +- FL/Fl_Menu_Button.H | 4 +- FL/Fl_Native_File_Chooser.H | 40 +- FL/Fl_Overlay_Window.H | 10 +- FL/Fl_Pack.H | 2 +- FL/Fl_Pixmap.H | 14 +- FL/Fl_Positioner.H | 4 +- FL/Fl_PostScript.H | 38 +- FL/Fl_Printer.H | 28 +- FL/Fl_Progress.H | 2 +- FL/Fl_Repeat_Button.H | 2 +- FL/Fl_Return_Button.H | 4 +- FL/Fl_Roller.H | 4 +- FL/Fl_SVG_File_Surface.H | 10 +- FL/Fl_SVG_Image.H | 14 +- FL/Fl_Scroll.H | 12 +- FL/Fl_Scrollbar.H | 4 +- FL/Fl_Secret_Input.H | 2 +- FL/Fl_Shared_Image.H | 16 +- FL/Fl_Simple_Terminal.H | 2 +- FL/Fl_Single_Window.H | 2 +- FL/Fl_Slider.H | 4 +- FL/Fl_Spinner.H | 8 +- FL/Fl_Sys_Menu_Bar.H | 4 +- FL/Fl_Table.H | 6 +- FL/Fl_Table_Row.H | 6 +- FL/Fl_Tabs.H | 4 +- FL/Fl_Text_Display.H | 6 +- FL/Fl_Text_Editor.H | 2 +- FL/Fl_Tile.H | 4 +- FL/Fl_Tiled_Image.H | 8 +- FL/Fl_Timer.H | 4 +- FL/Fl_Tree.H | 6 +- FL/Fl_Value_Input.H | 8 +- FL/Fl_Value_Output.H | 4 +- FL/Fl_Value_Slider.H | 4 +- FL/Fl_Window.H | 16 +- FL/Fl_Wizard.H | 2 +- FL/fl_attr.h | 58 +++ FL/fl_types.h | 2 + FL/forms.H | 2 +- FL/glut.H | 6 +- cairo/Fl_Cairo.cxx | 2 +- examples/OpenGL3test.cxx | 4 +- examples/draggable-group.cxx | 2 +- examples/howto-drag-and-drop.cxx | 4 +- examples/howto-draw-an-x.cxx | 2 +- examples/shapedwindow.cxx | 2 +- examples/table-as-container.cxx | 2 +- examples/table-simple.cxx | 2 +- examples/table-sort.cxx | 4 +- .../table-spreadsheet-with-keyboard-nav.cxx | 6 +- examples/table-spreadsheet.cxx | 2 +- examples/table-with-keynav.cxx | 4 +- .../table-with-right-column-stretch-fit.cxx | 4 +- examples/tree-custom-draw-items.cxx | 2 +- examples/tree-of-tables.cxx | 4 +- fluid/CodeEditor.h | 4 +- fluid/Fl_Function_Type.h | 168 +++---- fluid/Fl_Group_Type.cxx | 2 +- fluid/Fl_Group_Type.h | 154 +++---- fluid/Fl_Menu_Type.h | 134 +++--- fluid/Fl_Widget_Type.h | 28 +- fluid/Fl_Window_Type.cxx | 8 +- fluid/Fl_Window_Type.h | 70 +-- fluid/Shortcut_Button.h | 8 +- fluid/factory.cxx | 420 +++++++++--------- fluid/widget_browser.h | 20 +- src/Fl_Color_Chooser.cxx | 2 +- src/Fl_Gl_Device_Plugin.cxx | 6 +- src/Fl_Menu.cxx | 6 +- src/Fl_Message.h | 2 +- src/Fl_Native_File_Chooser_GTK.cxx | 16 +- src/Fl_Native_File_Chooser_Kdialog.H | 26 +- src/Fl_Native_File_Chooser_MAC.mm | 40 +- src/Fl_Native_File_Chooser_WIN32.cxx | 40 +- src/Fl_Native_File_Chooser_Zenity.H | 2 +- src/Fl_Screen_Driver.H | 8 +- src/Fl_System_Driver.H | 4 +- src/Fl_Tooltip.cxx | 6 +- src/Fl_x.cxx | 4 +- src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H | 170 +++---- .../Cairo/Fl_Display_Cairo_Graphics_Driver.H | 10 +- src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.H | 42 +- .../Cocoa/Fl_Cocoa_Gl_Window_Driver.mm | 4 +- src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm | 24 +- src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H | 66 +-- src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H | 64 +-- .../Cocoa/Fl_MacOS_Sys_Menu_Bar_Driver.H | 30 +- src/drivers/Darwin/Fl_Darwin_System_Driver.H | 66 +-- src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.H | 6 +- src/drivers/GDI/Fl_GDI_Graphics_Driver.H | 218 ++++----- src/drivers/GDI/Fl_GDI_Image_Surface_Driver.H | 10 +- .../OpenGL/Fl_OpenGL_Graphics_Driver.H | 110 ++--- src/drivers/Posix/Fl_Posix_Printer_Driver.cxx | 6 +- src/drivers/Posix/Fl_Posix_System_Driver.H | 56 +-- .../Fl_PostScript_Graphics_Driver.H | 162 +++---- .../Quartz/Fl_Quartz_Copy_Surface_Driver.H | 6 +- .../Quartz/Fl_Quartz_Graphics_Driver.H | 152 +++---- .../Quartz/Fl_Quartz_Image_Surface_Driver.H | 10 +- src/drivers/SVG/Fl_SVG_File_Surface.cxx | 90 ++-- src/drivers/Unix/Fl_Unix_System_Driver.H | 40 +- .../Wayland/Fl_Wayland_Copy_Surface_Driver.H | 6 +- .../Wayland/Fl_Wayland_Gl_Window_Driver.H | 30 +- .../Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 10 +- .../Wayland/Fl_Wayland_Graphics_Driver.H | 6 +- .../Wayland/Fl_Wayland_Image_Surface_Driver.H | 10 +- .../Wayland/Fl_Wayland_Screen_Driver.H | 68 +-- .../Wayland/Fl_Wayland_Window_Driver.H | 62 +-- .../WinAPI/Fl_WinAPI_Gl_Window_Driver.H | 46 +- .../WinAPI/Fl_WinAPI_Printer_Driver.cxx | 24 +- src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H | 66 +-- src/drivers/WinAPI/Fl_WinAPI_System_Driver.H | 138 +++--- src/drivers/WinAPI/Fl_WinAPI_Window_Driver.H | 60 +-- src/drivers/X11/Fl_X11_Gl_Window_Driver.H | 38 +- src/drivers/X11/Fl_X11_Screen_Driver.H | 96 ++-- src/drivers/X11/Fl_X11_Screen_Driver.cxx | 2 +- src/drivers/X11/Fl_X11_Window_Driver.H | 72 +-- .../Xlib/Fl_Xlib_Copy_Surface_Driver.H | 8 +- src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H | 158 +++---- .../Xlib/Fl_Xlib_Image_Surface_Driver.H | 10 +- src/fl_dnd_win32.cxx | 64 +-- src/fl_show_colormap.cxx | 4 +- test/CubeView.h | 4 +- test/animated.cxx | 2 +- test/arc.cxx | 2 +- test/blocks.cxx | 4 +- test/boxtype.cxx | 2 +- test/checkers.cxx | 4 +- test/clipboard.cxx | 4 +- test/color_chooser.cxx | 2 +- test/contrast.cxx | 2 +- test/coordinates.cxx | 2 +- test/cube.cxx | 4 +- test/cursor.cxx | 2 +- test/curve.cxx | 2 +- test/device.cxx | 12 +- test/doublebuffer.cxx | 4 +- test/fonts.cxx | 6 +- test/fullscreen.cxx | 4 +- test/gl_overlay.cxx | 4 +- test/handle_events.cxx | 2 +- test/keyboard.h | 2 +- test/line_style.cxx | 2 +- test/mandelbrot.h | 6 +- test/offscreen.cxx | 4 +- test/overlay.cxx | 2 +- test/resize-arrows.h | 4 +- test/rotated_text.cxx | 2 +- test/scroll.cxx | 2 +- test/shape.cxx | 2 +- test/subwindow.cxx | 6 +- test/sudoku.cxx | 6 +- test/table.cxx | 2 +- test/unittest_circles.cxx | 4 +- test/unittest_complex_shapes.cxx | 4 +- test/unittest_fast_shapes.cxx | 4 +- test/unittest_images.cxx | 2 +- test/unittest_points.cxx | 6 +- test/unittest_scrollbarsize.cxx | 2 +- test/unittest_symbol.cxx | 2 +- test/unittest_text.cxx | 2 +- test/unittest_viewport.cxx | 4 +- test/unittests.h | 2 +- test/utf8.cxx | 6 +- 197 files changed, 2236 insertions(+), 2176 deletions(-) diff --git a/FL/Fl_Adjuster.H b/FL/Fl_Adjuster.H index c2e308128..be7a10766 100644 --- a/FL/Fl_Adjuster.H +++ b/FL/Fl_Adjuster.H @@ -43,9 +43,9 @@ class FL_EXPORT Fl_Adjuster : public Fl_Valuator { int ix; int soft_; protected: - void draw(); - int handle(int); - void value_damage(); + void draw() FL_OVERRIDE; + int handle(int) FL_OVERRIDE; + void value_damage() FL_OVERRIDE; public: Fl_Adjuster(int X,int Y,int W,int H,const char *l=0); /** diff --git a/FL/Fl_Bitmap.H b/FL/Fl_Bitmap.H index 308e09022..7fde10f5b 100644 --- a/FL/Fl_Bitmap.H +++ b/FL/Fl_Bitmap.H @@ -54,13 +54,13 @@ public: Fl_Bitmap(const uchar *bits, int bits_length, int W, int H); Fl_Bitmap(const char *bits, int bits_length, int W, int H); virtual ~Fl_Bitmap(); - virtual Fl_Image *copy(int W, int H) const; + Fl_Image *copy(int W, int H) const FL_OVERRIDE; Fl_Image *copy() const { return Fl_Image::copy(); } - virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0); + void draw(int X, int Y, int W, int H, int cx=0, int cy=0) FL_OVERRIDE; void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);} - virtual void label(Fl_Widget*w); - virtual void label(Fl_Menu_Item*m); - virtual void uncache(); + void label(Fl_Widget*w) FL_OVERRIDE; + void label(Fl_Menu_Item*m) FL_OVERRIDE; + void uncache() FL_OVERRIDE; }; #endif diff --git a/FL/Fl_Box.H b/FL/Fl_Box.H index c168566aa..050be02cc 100644 --- a/FL/Fl_Box.H +++ b/FL/Fl_Box.H @@ -31,7 +31,7 @@ */ class FL_EXPORT Fl_Box : public Fl_Widget { protected: - void draw(); + void draw() FL_OVERRIDE; public: /** - The first constructor sets box() to FL_NO_BOX, which @@ -47,7 +47,7 @@ public: /** See Fl_Box::Fl_Box(int x, int y, int w, int h, const char * = 0) */ Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l); - virtual int handle(int); + int handle(int) FL_OVERRIDE; }; #endif diff --git a/FL/Fl_Browser.H b/FL/Fl_Browser.H index 707b3acc1..5b86a6599 100644 --- a/FL/Fl_Browser.H +++ b/FL/Fl_Browser.H @@ -98,30 +98,30 @@ class FL_EXPORT Fl_Browser : public Fl_Browser_ { protected: // required routines for Fl_Browser_ subclass: - void* item_first() const ; - void* item_next(void* item) const ; - void* item_prev(void* item) const ; - void* item_last()const ; - int item_selected(void* item) const ; - void item_select(void* item, int val); - int item_height(void* item) const ; - int item_width(void* item) const ; - void item_draw(void* item, int X, int Y, int W, int H) const ; - int full_height() const ; - int incr_height() const ; - const char *item_text(void *item) const; + void* item_first() const FL_OVERRIDE; + void* item_next(void* item) const FL_OVERRIDE; + void* item_prev(void* item) const FL_OVERRIDE; + void* item_last()const FL_OVERRIDE; + int item_selected(void* item) const FL_OVERRIDE; + void item_select(void* item, int val) FL_OVERRIDE; + int item_height(void* item) const FL_OVERRIDE; + int item_width(void* item) const FL_OVERRIDE; + void item_draw(void* item, int X, int Y, int W, int H) const FL_OVERRIDE; + int full_height() const FL_OVERRIDE; + int incr_height() const FL_OVERRIDE; + const char *item_text(void *item) const FL_OVERRIDE; /** Swap the items \p a and \p b. You must call redraw() to make any changes visible. \param[in] a,b the items to be swapped. \see swap(int,int), item_swap() */ - void item_swap(void *a, void *b) { swap((FL_BLINE*)a, (FL_BLINE*)b); } + void item_swap(void *a, void *b) FL_OVERRIDE { swap((FL_BLINE*)a, (FL_BLINE*)b); } /** Return the item at specified \p line. \param[in] line The line of the item to return. (1 based) \returns The item, or NULL if line out of range. \see item_at(), find_line(), lineno() */ - void *item_at(int line) const { return (void*)find_line(line); } + void *item_at(int line) const FL_OVERRIDE { return (void*)find_line(line); } FL_BLINE* find_line(int line) const ; FL_BLINE* _remove(int line) ; @@ -188,10 +188,10 @@ public: int selected(int line) const ; void show(int line); /** Shows the entire Fl_Browser widget -- opposite of hide(). */ - void show() { Fl_Widget::show(); } + void show() FL_OVERRIDE { Fl_Widget::show(); } void hide(int line); /** Hides the entire Fl_Browser widget -- opposite of show(). */ - void hide() { Fl_Widget::hide(); } + void hide() FL_OVERRIDE { Fl_Widget::hide(); } int visible(int line) const ; int value() const ; diff --git a/FL/Fl_Browser_.H b/FL/Fl_Browser_.H index 2fdbf9620..78d242206 100644 --- a/FL/Fl_Browser_.H +++ b/FL/Fl_Browser_.H @@ -198,7 +198,7 @@ protected: int leftedge() const; // x position after scrollbar & border void *find_item(int ypos); // item under mouse - void draw(); + void draw() FL_OVERRIDE; Fl_Browser_(int X,int Y,int W,int H,const char *L=0); public: @@ -224,8 +224,8 @@ public: */ Fl_Scrollbar hscrollbar; - int handle(int event); - void resize(int X,int Y,int W,int H); + int handle(int event) FL_OVERRIDE; + void resize(int X,int Y,int W,int H) FL_OVERRIDE; int select(void *item,int val=1,int docallbacks=0); int select_only(void *item,int docallbacks=0); diff --git a/FL/Fl_Button.H b/FL/Fl_Button.H index e9ad92df8..38d804070 100644 --- a/FL/Fl_Button.H +++ b/FL/Fl_Button.H @@ -84,11 +84,11 @@ protected: static void key_release_timeout(void*); void simulate_key_action(); - virtual void draw(); + void draw() FL_OVERRIDE; public: - virtual int handle(int); + int handle(int) FL_OVERRIDE; Fl_Button(int X, int Y, int W, int H, const char *L = 0); diff --git a/FL/Fl_Cairo_Window.H b/FL/Fl_Cairo_Window.H index 86f25c986..0816adee3 100644 --- a/FL/Fl_Cairo_Window.H +++ b/FL/Fl_Cairo_Window.H @@ -94,7 +94,7 @@ public: protected: /** Overloaded to provide cairo callback support */ - void draw() { + void draw() FL_OVERRIDE { Fl_Double_Window::draw(); if (draw_cb_) { // call the Cairo draw callback // manual method ? if yes explicitly get a cairo_context here diff --git a/FL/Fl_Chart.H b/FL/Fl_Chart.H index a19b68cd6..fc9c22f19 100644 --- a/FL/Fl_Chart.H +++ b/FL/Fl_Chart.H @@ -78,7 +78,7 @@ class FL_EXPORT Fl_Chart : public Fl_Widget { Fl_Fontsize textsize_; Fl_Color textcolor_; protected: - void draw(); + void draw() FL_OVERRIDE; public: Fl_Chart(int X, int Y, int W, int H, const char *L = 0); diff --git a/FL/Fl_Check_Browser.H b/FL/Fl_Check_Browser.H index da2cd579c..50a719f7a 100644 --- a/FL/Fl_Check_Browser.H +++ b/FL/Fl_Check_Browser.H @@ -31,20 +31,20 @@ class FL_EXPORT Fl_Check_Browser : public Fl_Browser_ { protected: /* required routines for Fl_Browser_ subclass: */ - void *item_first() const; - void *item_next(void *) const; - void *item_prev(void *) const; - int item_height(void *) const; - int item_width(void *) const; - void item_draw(void *, int, int, int, int) const; - void item_select(void *, int); - int item_selected(void *) const; - const char *item_text(void *item) const; // override + void *item_first() const FL_OVERRIDE; + void *item_next(void *) const FL_OVERRIDE; + void *item_prev(void *) const FL_OVERRIDE; + int item_height(void *) const FL_OVERRIDE; + int item_width(void *) const FL_OVERRIDE; + void item_draw(void *, int, int, int, int) const FL_OVERRIDE; + void item_select(void *, int) FL_OVERRIDE; + int item_selected(void *) const FL_OVERRIDE; + const char *item_text(void *item) const FL_OVERRIDE; public: - void *item_at(int index) const; // override - void item_swap(int ia, int ib); // override - void item_swap(void *a, void *b); // override + void *item_at(int index) const FL_OVERRIDE; + void item_swap(int ia, int ib); + void item_swap(void *a, void *b) FL_OVERRIDE; /* private data */ @@ -104,7 +104,7 @@ public: char *text(int item) const; // returns pointer to internal buffer protected: - int handle(int); + int handle(int) FL_OVERRIDE; }; #endif // Fl_Check_Browser_H diff --git a/FL/Fl_Choice.H b/FL/Fl_Choice.H index 31da14524..fa7dc7bb5 100644 --- a/FL/Fl_Choice.H +++ b/FL/Fl_Choice.H @@ -102,9 +102,9 @@ */ class FL_EXPORT Fl_Choice : public Fl_Menu_ { protected: - void draw(); + void draw() FL_OVERRIDE; public: - int handle(int); + int handle(int) FL_OVERRIDE; Fl_Choice(int X, int Y, int W, int H, const char *L = 0); diff --git a/FL/Fl_Clock.H b/FL/Fl_Clock.H index aa29ec04a..0a5eac4bc 100644 --- a/FL/Fl_Clock.H +++ b/FL/Fl_Clock.H @@ -68,7 +68,7 @@ class FL_EXPORT Fl_Clock_Output : public Fl_Widget { int shadow_; // draw shadows of hands void drawhands(Fl_Color,Fl_Color); // part of draw protected: - void draw(); + void draw() FL_OVERRIDE; void draw(int X, int Y, int W, int H); public: @@ -151,7 +151,7 @@ public: */ class FL_EXPORT Fl_Clock : public Fl_Clock_Output { public: - int handle(int); + int handle(int) FL_OVERRIDE; Fl_Clock(int X, int Y, int W, int H, const char *L = 0); diff --git a/FL/Fl_Color_Chooser.H b/FL/Fl_Color_Chooser.H index 8ba252035..1aa569c11 100644 --- a/FL/Fl_Color_Chooser.H +++ b/FL/Fl_Color_Chooser.H @@ -36,10 +36,10 @@ class FL_EXPORT Flcc_HueBox : public Fl_Widget { int px, py; protected: - void draw(); + void draw() FL_OVERRIDE; int handle_key(int); public: - int handle(int); + int handle(int) FL_OVERRIDE; Flcc_HueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) { px = py = 0;} }; @@ -48,10 +48,10 @@ public: class FL_EXPORT Flcc_ValueBox : public Fl_Widget { int py; protected: - void draw(); + void draw() FL_OVERRIDE; int handle_key(int); public: - int handle(int); + int handle(int) FL_OVERRIDE; Flcc_ValueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) { py = 0;} }; @@ -59,7 +59,7 @@ public: /** For internal use only */ class FL_EXPORT Flcc_Value_Input : public Fl_Value_Input { public: - int format(char*); + int format(char*) FL_OVERRIDE; Flcc_Value_Input(int X, int Y, int W, int H) : Fl_Value_Input(X,Y,W,H) {} }; @@ -121,7 +121,7 @@ class FL_EXPORT Fl_Color_Chooser : public Fl_Group { static void mode_cb(Fl_Widget*, void*); public: - int handle(int e); + int handle(int e) FL_OVERRIDE; /** Returns which Fl_Color_Chooser variant is currently active diff --git a/FL/Fl_Copy_Surface.H b/FL/Fl_Copy_Surface.H index 9b195e938..752179a01 100644 --- a/FL/Fl_Copy_Surface.H +++ b/FL/Fl_Copy_Surface.H @@ -50,20 +50,20 @@ class FL_EXPORT Fl_Copy_Surface : public Fl_Widget_Surface { private: class Fl_Copy_Surface_Driver *platform_surface; protected: - void translate(int x, int y); - void untranslate(); + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; public: Fl_Copy_Surface(int w, int h); ~Fl_Copy_Surface(); - void set_current(); - virtual bool is_current(); + void set_current() FL_OVERRIDE; + bool is_current() FL_OVERRIDE; /** Returns the pixel width of the copy surface */ int w(); /** Returns the pixel height of the copy surface */ int h(); - void origin(int *x, int *y); - void origin(int x, int y); - int printable_rect(int *w, int *h); + void origin(int *x, int *y) FL_OVERRIDE; + void origin(int x, int y) FL_OVERRIDE; + int printable_rect(int *w, int *h) FL_OVERRIDE; }; @@ -88,10 +88,10 @@ protected: int height; Fl_Copy_Surface_Driver(int w, int h) : Fl_Widget_Surface(NULL), width(w), height(h) {} virtual ~Fl_Copy_Surface_Driver() {} - virtual void set_current() = 0; - virtual void translate(int x, int y) = 0; - virtual void untranslate() = 0; - int printable_rect(int *w, int *h); + void set_current() FL_OVERRIDE = 0; + void translate(int x, int y) FL_OVERRIDE = 0; + void untranslate() FL_OVERRIDE = 0; + int printable_rect(int *w, int *h) FL_OVERRIDE; /** Each platform implements this function its own way. It returns an object implementing all virtual functions of class Fl_Copy_Surface_Driver for the plaform. diff --git a/FL/Fl_Counter.H b/FL/Fl_Counter.H index fc1ce48f0..2f6452318 100644 --- a/FL/Fl_Counter.H +++ b/FL/Fl_Counter.H @@ -56,13 +56,13 @@ class FL_EXPORT Fl_Counter : public Fl_Valuator { protected: - void draw(); + void draw() FL_OVERRIDE; // compute widths of arrow boxes void arrow_widths(int &w1, int &w2); public: - int handle(int); + int handle(int) FL_OVERRIDE; Fl_Counter(int X, int Y, int W, int H, const char* L = 0); ~Fl_Counter(); diff --git a/FL/Fl_Dial.H b/FL/Fl_Dial.H index e11d3cb26..2440b5cfd 100644 --- a/FL/Fl_Dial.H +++ b/FL/Fl_Dial.H @@ -51,11 +51,11 @@ protected: // these allow subclasses to put the dial in a smaller area: void draw(int X, int Y, int W, int H); int handle(int event, int X, int Y, int W, int H); - void draw(); + void draw() FL_OVERRIDE; public: - int handle(int); + int handle(int) FL_OVERRIDE; /** Creates a new Fl_Dial widget using the given position, size, and label string. The default type is FL_NORMAL_DIAL. diff --git a/FL/Fl_Double_Window.H b/FL/Fl_Double_Window.H index 73f8fddf0..016b778a9 100644 --- a/FL/Fl_Double_Window.H +++ b/FL/Fl_Double_Window.H @@ -33,13 +33,13 @@ public: /** Return non-null if this is an Fl_Overlay_Window object. */ - virtual Fl_Double_Window *as_double_window() {return this; } - void show(); + Fl_Double_Window *as_double_window() FL_OVERRIDE {return this; } + void show() FL_OVERRIDE; /** Same as Fl_Window::show(int a, char **b) */ void show(int a, char **b) {Fl_Window::show(a,b);} - void resize(int,int,int,int); - void hide(); - void flush(); + void resize(int,int,int,int) FL_OVERRIDE; + void hide() FL_OVERRIDE; + void flush() FL_OVERRIDE; ~Fl_Double_Window(); /** diff --git a/FL/Fl_File_Browser.H b/FL/Fl_File_Browser.H index 8ea51b2ad..101add4de 100644 --- a/FL/Fl_File_Browser.H +++ b/FL/Fl_File_Browser.H @@ -42,11 +42,11 @@ class FL_EXPORT Fl_File_Browser : public Fl_Browser { const char *pattern_; const char *errmsg_; - int full_height() const; - int item_height(void *) const; - int item_width(void *) const; - void item_draw(void *, int, int, int, int) const; - int incr_height() const { return (item_height(0)); } + int full_height() const FL_OVERRIDE; + int item_height(void *) const FL_OVERRIDE; + int item_width(void *) const FL_OVERRIDE; + void item_draw(void *, int, int, int, int) const FL_OVERRIDE; + int incr_height() const FL_OVERRIDE { return (item_height(0)); } public: enum { FILES, DIRECTORIES }; diff --git a/FL/Fl_File_Input.H b/FL/Fl_File_Input.H index 5b2d781cb..832db013e 100644 --- a/FL/Fl_File_Input.H +++ b/FL/Fl_File_Input.H @@ -57,10 +57,10 @@ public: Fl_File_Input(int X, int Y, int W, int H, const char *L=0); - virtual int handle(int event); + int handle(int event) FL_OVERRIDE; protected: - virtual void draw(); + void draw() FL_OVERRIDE; public: /** Gets the box type used for the navigation bar. */ diff --git a/FL/Fl_Flex.H b/FL/Fl_Flex.H index 687e6b0aa..6d8a76fbd 100644 --- a/FL/Fl_Flex.H +++ b/FL/Fl_Flex.H @@ -144,7 +144,7 @@ public: virtual ~Fl_Flex(); virtual void end(); - virtual void resize(int x, int y, int w, int h); + void resize(int x, int y, int w, int h) FL_OVERRIDE; /** Set the horizontal or vertical size of a child widget. @@ -167,7 +167,7 @@ protected: virtual int alloc_size(int size) const; - void on_remove(int); /* override */ + void on_remove(int) FL_OVERRIDE; public: diff --git a/FL/Fl_FormsBitmap.H b/FL/Fl_FormsBitmap.H index e5d6fb1db..edde9a11b 100644 --- a/FL/Fl_FormsBitmap.H +++ b/FL/Fl_FormsBitmap.H @@ -28,7 +28,7 @@ class FL_EXPORT Fl_FormsBitmap : public Fl_Widget { Fl_Bitmap *b; protected: - void draw(); + void draw() FL_OVERRIDE; public: Fl_FormsBitmap(Fl_Boxtype, int, int, int, int, const char * = 0); void set(int W, int H, const uchar *bits); diff --git a/FL/Fl_FormsPixmap.H b/FL/Fl_FormsPixmap.H index 43cccd966..3cbe7c01c 100644 --- a/FL/Fl_FormsPixmap.H +++ b/FL/Fl_FormsPixmap.H @@ -29,7 +29,7 @@ class FL_EXPORT Fl_FormsPixmap : public Fl_Widget { Fl_Pixmap *b; protected: - void draw(); + void draw() FL_OVERRIDE; public: Fl_FormsPixmap(Fl_Boxtype t, int X, int Y, int W, int H, const char *L= 0); diff --git a/FL/Fl_Free.H b/FL/Fl_Free.H index 1424a5956..138a21370 100644 --- a/FL/Fl_Free.H +++ b/FL/Fl_Free.H @@ -56,9 +56,9 @@ class FL_EXPORT Fl_Free : public Fl_Widget { FL_HANDLEPTR hfunc; static void step(void *); protected: - void draw(); + void draw() FL_OVERRIDE; public: - int handle(int e); + int handle(int e) FL_OVERRIDE; Fl_Free(uchar t,int X,int Y,int W,int H,const char *L,FL_HANDLEPTR hdl); ~Fl_Free(); }; diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H index 0f5cf3216..c33bed8db 100644 --- a/FL/Fl_Gl_Window.H +++ b/FL/Fl_Gl_Window.H @@ -73,17 +73,17 @@ class FL_EXPORT Fl_Gl_Window : public Fl_Window { static int gl_plugin_linkage(); protected: void draw_begin(); - virtual void draw(); + void draw() FL_OVERRIDE; void draw_end(); public: - void show(); + void show() FL_OVERRIDE; /** Same as Fl_Window::show(int a, char **b) */ void show(int a, char **b) {Fl_Window::show(a,b);} - void flush(); - void hide(); - void resize(int,int,int,int); - int handle(int); + void flush() FL_OVERRIDE; + void hide() FL_OVERRIDE; + void resize(int,int,int,int) FL_OVERRIDE; + int handle(int) FL_OVERRIDE; /** Is turned off when FLTK creates a new context for this window or @@ -207,7 +207,7 @@ public: void make_overlay_current(); // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. - virtual Fl_Gl_Window* as_gl_window() {return this;} + Fl_Gl_Window* as_gl_window() FL_OVERRIDE {return this;} float pixels_per_unit(); /** Gives the window width in OpenGL pixels. diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index 266624153..f70af0636 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -419,76 +419,76 @@ protected: int line_width_; virtual Fl_Region scale_clip(float f); void unscale_clip(Fl_Region r); - virtual void point(int x, int y); + void point(int x, int y) FL_OVERRIDE; virtual void point_unscaled(float x, float y); - virtual void rect(int x, int y, int w, int h); - virtual void rectf(int x, int y, int w, int h); + void rect(int x, int y, int w, int h) FL_OVERRIDE; + void rectf(int x, int y, int w, int h) FL_OVERRIDE; virtual void rectf_unscaled(int x, int y, int w, int h); - virtual void line(int x, int y, int x1, int y1); + void line(int x, int y, int x1, int y1) FL_OVERRIDE; virtual void line_unscaled(int x, int y, int x1, int y1); - virtual void line(int x, int y, int x1, int y1, int x2, int y2); + void line(int x, int y, int x1, int y1, int x2, int y2) FL_OVERRIDE; virtual void line_unscaled(int x, int y, int x1, int y1, int x2, int y2); - virtual void xyline(int x, int y, int x1); + void xyline(int x, int y, int x1) FL_OVERRIDE; virtual void xyline_unscaled(int x, int y, int x1); - virtual void xyline(int x, int y, int x1, int y2) {Fl_Graphics_Driver::xyline(x, y, x1, y2);} - virtual void xyline(int x, int y, int x1, int y2, int x3) {Fl_Graphics_Driver::xyline(x, y, x1, y2, x3);} - virtual void yxline(int x, int y, int y1); + void xyline(int x, int y, int x1, int y2) FL_OVERRIDE {Fl_Graphics_Driver::xyline(x, y, x1, y2);} + void xyline(int x, int y, int x1, int y2, int x3) FL_OVERRIDE {Fl_Graphics_Driver::xyline(x, y, x1, y2, x3);} + void yxline(int x, int y, int y1) FL_OVERRIDE; virtual void yxline_unscaled(int x, int y, int y1); - virtual void yxline(int x, int y, int y1, int x2) {Fl_Graphics_Driver::yxline(x, y, y1, x2);} - virtual void yxline(int x, int y, int y1, int x2, int y3) {Fl_Graphics_Driver::yxline(x, y, y1, x2, y3);} - virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2); + void yxline(int x, int y, int y1, int x2) FL_OVERRIDE {Fl_Graphics_Driver::yxline(x, y, y1, x2);} + void yxline(int x, int y, int y1, int x2, int y3) FL_OVERRIDE {Fl_Graphics_Driver::yxline(x, y, y1, x2, y3);} + void loop(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; virtual void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2); - virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); + void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; virtual void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2); + void polygon(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; virtual void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2); - virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); + void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; virtual void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - virtual void circle(double x, double y, double r); + void circle(double x, double y, double r) FL_OVERRIDE; virtual void ellipse_unscaled(double xt, double yt, double rx, double ry); - virtual void font(Fl_Font face, Fl_Fontsize size); - virtual Fl_Font font(); + void font(Fl_Font face, Fl_Fontsize size) FL_OVERRIDE; + Fl_Font font() FL_OVERRIDE; virtual void font_unscaled(Fl_Font face, Fl_Fontsize size); - virtual double width(const char *str, int n); - virtual double width(unsigned int c); + double width(const char *str, int n) FL_OVERRIDE; + double width(unsigned int c) FL_OVERRIDE; virtual double width_unscaled(const char *str, int n); virtual double width_unscaled(unsigned int c); - virtual Fl_Fontsize size(); + Fl_Fontsize size() FL_OVERRIDE; virtual Fl_Fontsize size_unscaled(); - virtual void text_extents(const char *str, int n, int &dx, int &dy, int &w, int &h); + void text_extents(const char *str, int n, int &dx, int &dy, int &w, int &h) FL_OVERRIDE; virtual void text_extents_unscaled(const char *str, int n, int &dx, int &dy, int &w, int &h); - virtual int height(); - virtual int descent(); + int height() FL_OVERRIDE; + int descent() FL_OVERRIDE; virtual int height_unscaled(); virtual int descent_unscaled(); - virtual void draw(const char *str, int n, int x, int y); + void draw(const char *str, int n, int x, int y) FL_OVERRIDE; virtual void draw_unscaled(const char *str, int n, int x, int y); - virtual void draw(int angle, const char *str, int n, int x, int y); + void draw(int angle, const char *str, int n, int x, int y) FL_OVERRIDE; virtual void draw_unscaled(int angle, const char *str, int n, int x, int y); - virtual void draw(const char *str, int nChars, float x, float y); - virtual void rtl_draw(const char* str, int n, int x, int y); + void draw(const char *str, int nChars, float x, float y) FL_OVERRIDE; + void rtl_draw(const char* str, int n, int x, int y) FL_OVERRIDE; virtual void rtl_draw_unscaled(const char* str, int n, int x, int y); - virtual void arc(double x, double y, double r, double start, double end); - virtual void arc(int x, int y, int w, int h, double a1, double a2); + void arc(double x, double y, double r, double start, double end) FL_OVERRIDE; + void arc(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; virtual void arc_unscaled(int x, int y, int w, int h, double a1, double a2); - virtual void pie(int x, int y, int w, int h, double a1, double a2); + void pie(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; virtual void pie_unscaled(int x, int y, int w, int h, double a1, double a2); - virtual void line_style(int style, int width=0, char* dashes=0); + void line_style(int style, int width=0, char* dashes=0) FL_OVERRIDE; virtual void line_style_unscaled(int style, int width, char* dashes); void draw_image_rescale(void *buf, Fl_Draw_Image_Cb cb, int X, int Y, int W, int H, int D, int L, bool mono); virtual void draw_image_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); virtual void draw_image_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); - void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); - void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); + void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0) FL_OVERRIDE; + void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3) FL_OVERRIDE; virtual void draw_image_mono_unscaled(const uchar* buf, int x, int y, int w, int h, int d, int l); - void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0); + void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0) FL_OVERRIDE; virtual void draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); - void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); + void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1) FL_OVERRIDE; - void transformed_vertex(double xf, double yf); - void vertex(double x, double y); - virtual float override_scale(); - virtual void restore_scale(float); + void transformed_vertex(double xf, double yf) FL_OVERRIDE; + void vertex(double x, double y) FL_OVERRIDE; + float override_scale() FL_OVERRIDE; + void restore_scale(float) FL_OVERRIDE; virtual void *change_pen_width(int lwidth); virtual void reset_pen_width(void *data); }; diff --git a/FL/Fl_Group.H b/FL/Fl_Group.H index 6441b6149..025e3518b 100644 --- a/FL/Fl_Group.H +++ b/FL/Fl_Group.H @@ -67,7 +67,7 @@ class FL_EXPORT Fl_Group : public Fl_Widget { Fl_Group& operator=(const Fl_Group&); protected: - void draw(); + void draw() FL_OVERRIDE; void draw_child(Fl_Widget& widget) const; void draw_children(); void draw_outside_label(const Fl_Widget& widget) const ; @@ -80,7 +80,7 @@ protected: public: - int handle(int); + int handle(int) FL_OVERRIDE; void begin(); void end(); static Fl_Group *current(); @@ -101,7 +101,7 @@ public: int find(const Fl_Widget& o) const {return find(&o);} Fl_Widget* const* array() const; - void resize(int,int,int,int); + void resize(int,int,int,int) FL_OVERRIDE; /** Creates a new Fl_Group widget using the given position, size, and label string. The default boxtype is FL_NO_BOX. @@ -221,7 +221,7 @@ public: unsigned int clip_children() { return (flags() & CLIP_CHILDREN) != 0; } // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. - virtual Fl_Group* as_group() { return this; } + Fl_Group* as_group() FL_OVERRIDE { return this; } // back compatibility functions: diff --git a/FL/Fl_Help_View.H b/FL/Fl_Help_View.H index 9b3a1a242..6f19a9a54 100644 --- a/FL/Fl_Help_View.H +++ b/FL/Fl_Help_View.H @@ -262,7 +262,7 @@ class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget static int compare_targets(const Fl_Help_Target *t0, const Fl_Help_Target *t1); int do_align(Fl_Help_Block *block, int line, int xx, int a, int &l); protected: - void draw(); + void draw() FL_OVERRIDE; private: void format(); void format_table(int *table_width, int *columns, const char *table); @@ -273,7 +273,7 @@ private: Fl_Shared_Image *get_image(const char *name, int W, int H); int get_length(const char *l); public: - int handle(int); + int handle(int) FL_OVERRIDE; private: void hv_draw(const char *t, int x, int y, int entity_extra_length = 0); @@ -319,7 +319,7 @@ public: */ void link(Fl_Help_Func *fn) { link_ = fn; } int load(const char *f); - void resize(int,int,int,int); + void resize(int,int,int,int) FL_OVERRIDE; /** Gets the size of the help view. */ int size() const { return (size_); } void size(int W, int H) { Fl_Widget::size(W, H); } diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H index d571d9e88..fb1ddf734 100644 --- a/FL/Fl_Image.H +++ b/FL/Fl_Image.H @@ -356,16 +356,16 @@ public: Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0); Fl_RGB_Image(const uchar *bits, int bits_length, int W, int H, int D, int LD); Fl_RGB_Image(const Fl_Pixmap *pxm, Fl_Color bg=FL_GRAY); - virtual ~Fl_RGB_Image(); - virtual Fl_Image *copy(int W, int H) const; + ~Fl_RGB_Image() FL_OVERRIDE; + Fl_Image *copy(int W, int H) const FL_OVERRIDE; Fl_Image *copy() const { return Fl_Image::copy(); } - virtual void color_average(Fl_Color c, float i); - virtual void desaturate(); - virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0); + void color_average(Fl_Color c, float i) FL_OVERRIDE; + void desaturate() FL_OVERRIDE; + void draw(int X, int Y, int W, int H, int cx=0, int cy=0) FL_OVERRIDE; void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);} - virtual void label(Fl_Widget*w); - virtual void label(Fl_Menu_Item*m); - virtual void uncache(); + void label(Fl_Widget*w) FL_OVERRIDE; + void label(Fl_Menu_Item*m) FL_OVERRIDE; + void uncache() FL_OVERRIDE; /** Sets the maximum allowed image size in bytes when creating an Fl_RGB_Image object. The image size in bytes of an Fl_RGB_Image object is the value of the product w() * h() * d(). diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H index 1fea39604..fcd9db430 100644 --- a/FL/Fl_Image_Surface.H +++ b/FL/Fl_Image_Surface.H @@ -68,18 +68,18 @@ private: class Fl_Image_Surface_Driver *platform_surface; Fl_Offscreen get_offscreen_before_delete_(); protected: - void translate(int x, int y); - void untranslate(); + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; public: Fl_Image_Surface(int w, int h, int high_res = 0, Fl_Offscreen off = 0); ~Fl_Image_Surface(); - void set_current(); - virtual bool is_current(); + void set_current() FL_OVERRIDE; + bool is_current() FL_OVERRIDE; Fl_RGB_Image *image(); Fl_Shared_Image *highres_image(); - void origin(int *x, int *y); - void origin(int x, int y); - int printable_rect(int *w, int *h); + void origin(int *x, int *y) FL_OVERRIDE; + void origin(int x, int y) FL_OVERRIDE; + int printable_rect(int *w, int *h) FL_OVERRIDE; Fl_Offscreen offscreen(); void rescale(); }; @@ -107,10 +107,10 @@ protected: int external_offscreen; Fl_Image_Surface_Driver(int w, int h, int /*high_res*/, Fl_Offscreen off) : Fl_Widget_Surface(NULL), width(w), height(h), offscreen(off) {external_offscreen = (off != 0);} virtual ~Fl_Image_Surface_Driver() {} - virtual void set_current() = 0; - virtual void translate(int x, int y) = 0; - virtual void untranslate() = 0; - int printable_rect(int *w, int *h); + void set_current() FL_OVERRIDE = 0; + void translate(int x, int y) FL_OVERRIDE = 0; + void untranslate() FL_OVERRIDE = 0; + int printable_rect(int *w, int *h) FL_OVERRIDE; virtual Fl_RGB_Image *image() = 0; /** Each platform implements this function its own way. It returns an object implementing all virtual functions diff --git a/FL/Fl_Input.H b/FL/Fl_Input.H index 0967d332f..93d1c2642 100644 --- a/FL/Fl_Input.H +++ b/FL/Fl_Input.H @@ -255,11 +255,11 @@ class FL_EXPORT Fl_Input : public Fl_Input_ { int kf_copy_cut(); protected: - void draw(); + void draw() FL_OVERRIDE; int handle_key(); public: - int handle(int); + int handle(int) FL_OVERRIDE; Fl_Input(int,int,int,int,const char * = 0); }; diff --git a/FL/Fl_Input_.H b/FL/Fl_Input_.H index bd159049a..0ec9b09ab 100644 --- a/FL/Fl_Input_.H +++ b/FL/Fl_Input_.H @@ -215,7 +215,7 @@ protected: public: /* Change the size of the widget. */ - void resize(int, int, int, int); + void resize(int, int, int, int) FL_OVERRIDE; /* Constructor */ Fl_Input_(int, int, int, int, const char* = 0); diff --git a/FL/Fl_Input_Choice.H b/FL/Fl_Input_Choice.H index c02195be7..f61d664b6 100644 --- a/FL/Fl_Input_Choice.H +++ b/FL/Fl_Input_Choice.H @@ -44,11 +44,11 @@ class FL_EXPORT Fl_Input_Choice : public Fl_Group { // Private class to handle slightly 'special' behavior of menu button class InputMenuButton : public Fl_Menu_Button { - void draw(); + void draw() FL_OVERRIDE; const Fl_Menu_Item* popup(); public: InputMenuButton(int X, int Y, int W, int H, const char *L=0); - int handle(int e); + int handle(int e) FL_OVERRIDE; }; Fl_Input *inp_; @@ -93,7 +93,7 @@ public: Fl_Input_Choice(int X, int Y, int W, int H, const char *L=0); - void resize(int X, int Y, int W, int H); + void resize(int X, int Y, int W, int H) FL_OVERRIDE; /** Adds an item to the menu. When any item is selected, the Fl_Input_Choice callback() is invoked, diff --git a/FL/Fl_Light_Button.H b/FL/Fl_Light_Button.H index 2794073f3..a03ec2e69 100644 --- a/FL/Fl_Light_Button.H +++ b/FL/Fl_Light_Button.H @@ -35,9 +35,9 @@ */ class FL_EXPORT Fl_Light_Button : public Fl_Button { protected: - virtual void draw(); + void draw() FL_OVERRIDE; public: - virtual int handle(int); + int handle(int) FL_OVERRIDE; Fl_Light_Button(int x,int y,int w,int h,const char *l = 0); }; diff --git a/FL/Fl_Menu_Bar.H b/FL/Fl_Menu_Bar.H index a97ccf45a..3157519ac 100644 --- a/FL/Fl_Menu_Bar.H +++ b/FL/Fl_Menu_Bar.H @@ -65,9 +65,9 @@ class FL_EXPORT Fl_Menu_Bar : public Fl_Menu_ { friend class Fl_Sys_Menu_Bar_Driver; protected: - void draw(); + void draw() FL_OVERRIDE; public: - int handle(int); + int handle(int) FL_OVERRIDE; /** Creates a new Fl_Menu_Bar widget using the given position, size, and label string. The default boxtype is FL_UP_BOX. diff --git a/FL/Fl_Menu_Button.H b/FL/Fl_Menu_Button.H index 7eb8e17ff..4cc0e930d 100644 --- a/FL/Fl_Menu_Button.H +++ b/FL/Fl_Menu_Button.H @@ -55,7 +55,7 @@ */ class FL_EXPORT Fl_Menu_Button : public Fl_Menu_ { protected: - void draw(); + void draw() FL_OVERRIDE; public: /** \brief indicate what mouse buttons pop up the menu. @@ -71,7 +71,7 @@ public: POPUP23, /**< pops up with the mouse 2nd or 3rd buttons. */ POPUP123 /**< pops up with any mouse button. */ }; - int handle(int); + int handle(int) FL_OVERRIDE; const Fl_Menu_Item* popup(); Fl_Menu_Button(int,int,int,int,const char * =0); }; diff --git a/FL/Fl_Native_File_Chooser.H b/FL/Fl_Native_File_Chooser.H index 2aaa0a463..3df8f57e3 100644 --- a/FL/Fl_Native_File_Chooser.H +++ b/FL/Fl_Native_File_Chooser.H @@ -251,26 +251,26 @@ protected: public: Fl_Native_File_Chooser_FLTK_Driver(int val); virtual ~Fl_Native_File_Chooser_FLTK_Driver(); - virtual void type(int t); - virtual int type() const ; - virtual void options(int o); - virtual int options() const; - virtual int count() const; - virtual const char *filename() const ; - virtual const char *filename(int i) const ; - virtual void directory(const char *val) ; - virtual const char *directory() const; - virtual void title(const char *t); - virtual const char* title() const; - virtual const char *filter() const ; - virtual void filter(const char *f); - virtual int filters() const ; - virtual void filter_value(int i) ; - virtual int filter_value() const ; - virtual void preset_file(const char*f) ; - virtual const char* preset_file() const; - virtual const char *errmsg() const ; - virtual int show() ; + void type(int t) FL_OVERRIDE; + int type() const FL_OVERRIDE; + void options(int o) FL_OVERRIDE; + int options() const FL_OVERRIDE; + int count() const FL_OVERRIDE; + const char *filename() const FL_OVERRIDE; + const char *filename(int i) const FL_OVERRIDE; + void directory(const char *val) FL_OVERRIDE; + const char *directory() const FL_OVERRIDE; + void title(const char *t) FL_OVERRIDE; + const char* title() const FL_OVERRIDE; + const char *filter() const FL_OVERRIDE; + void filter(const char *f) FL_OVERRIDE; + int filters() const FL_OVERRIDE; + void filter_value(int i) FL_OVERRIDE; + int filter_value() const FL_OVERRIDE; + void preset_file(const char*f) FL_OVERRIDE; + const char* preset_file() const FL_OVERRIDE; + const char *errmsg() const FL_OVERRIDE; + int show() FL_OVERRIDE; }; /** diff --git a/FL/Fl_Overlay_Window.H b/FL/Fl_Overlay_Window.H index 13676ab90..b03037586 100644 --- a/FL/Fl_Overlay_Window.H +++ b/FL/Fl_Overlay_Window.H @@ -49,10 +49,10 @@ public: private: Fl_Window *overlay_; public: - void show(); - void hide(); - void flush(); - void resize(int,int,int,int); + void show() FL_OVERRIDE; + void hide() FL_OVERRIDE; + void flush() FL_OVERRIDE; + void resize(int,int,int,int) FL_OVERRIDE; ~Fl_Overlay_Window(); /** Returns non-zero if there's hardware overlay support */ int can_do_overlay(); @@ -72,7 +72,7 @@ protected: public: /** Same as Fl_Window::show(int a, char **b) */ void show(int a, char **b) {Fl_Double_Window::show(a,b);} - virtual Fl_Overlay_Window *as_overlay_window() {return this; } + Fl_Overlay_Window *as_overlay_window() FL_OVERRIDE {return this; } }; #endif diff --git a/FL/Fl_Pack.H b/FL/Fl_Pack.H index cb2d7bb95..1e38c4187 100644 --- a/FL/Fl_Pack.H +++ b/FL/Fl_Pack.H @@ -61,7 +61,7 @@ public: }; protected: - void draw(); + void draw() FL_OVERRIDE; public: Fl_Pack(int X, int Y, int W, int H, const char *L = 0); diff --git a/FL/Fl_Pixmap.H b/FL/Fl_Pixmap.H index caa0e9371..ddf996fba 100644 --- a/FL/Fl_Pixmap.H +++ b/FL/Fl_Pixmap.H @@ -63,15 +63,15 @@ public: /** The constructors create a new pixmap from the specified XPM data. */ explicit Fl_Pixmap(const uchar* const * D) : Fl_Image(-1,0,1), alloc_data(0), id_(0), mask_(0) {set_data((const char*const*)D); measure();} virtual ~Fl_Pixmap(); - virtual Fl_Image *copy(int W, int H) const; + Fl_Image *copy(int W, int H) const FL_OVERRIDE; Fl_Image *copy() const { return Fl_Image::copy(); } - virtual void color_average(Fl_Color c, float i); - virtual void desaturate(); - virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0); + void color_average(Fl_Color c, float i) FL_OVERRIDE; + void desaturate() FL_OVERRIDE; + void draw(int X, int Y, int W, int H, int cx=0, int cy=0) FL_OVERRIDE; void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);} - virtual void label(Fl_Widget*w); - virtual void label(Fl_Menu_Item*m); - virtual void uncache(); + void label(Fl_Widget*w) FL_OVERRIDE; + void label(Fl_Menu_Item*m) FL_OVERRIDE; + void uncache() FL_OVERRIDE; }; #endif diff --git a/FL/Fl_Positioner.H b/FL/Fl_Positioner.H index 17963f614..ce1a7980b 100644 --- a/FL/Fl_Positioner.H +++ b/FL/Fl_Positioner.H @@ -44,11 +44,11 @@ protected: // these allow subclasses to put the dial in a smaller area: void draw(int, int, int, int); int handle(int, int, int, int, int); - void draw(); + void draw() FL_OVERRIDE; public: - int handle(int); + int handle(int) FL_OVERRIDE; /** Creates a new Fl_Positioner widget using the given position, size, and label string. The default boxtype is FL_NO_BOX. diff --git a/FL/Fl_PostScript.H b/FL/Fl_PostScript.H index bb9b27d79..8b2e2749a 100644 --- a/FL/Fl_PostScript.H +++ b/FL/Fl_PostScript.H @@ -86,7 +86,7 @@ public: /** The destructor. */ ~Fl_PostScript_File_Device(); /** Don't use with this class. */ - int begin_job(int pagecount, int* from, int* to, char **perr_message); + int begin_job(int pagecount, int* from, int* to, char **perr_message) FL_OVERRIDE; /** Begins the session where all graphics requests will go to a local PostScript file. Opens a file dialog to select an output PostScript file. This member function makes end_job() close the resulting PostScript file and display an @@ -123,28 +123,28 @@ public: return begin_job(ps_output, pagecount, format, layout); } - int begin_page (void); - int printable_rect(int *w, int *h); - void margins(int *left, int *top, int *right, int *bottom); - void origin(int *x, int *y); - void origin(int x, int y); - void scale (float scale_x, float scale_y = 0.); - void rotate(float angle); - void translate(int x, int y); - void untranslate(void); - int end_page (void); + int begin_page (void) FL_OVERRIDE; + int printable_rect(int *w, int *h) FL_OVERRIDE; + void margins(int *left, int *top, int *right, int *bottom) FL_OVERRIDE; + void origin(int *x, int *y) FL_OVERRIDE; + void origin(int x, int y) FL_OVERRIDE; + void scale (float scale_x, float scale_y = 0.) FL_OVERRIDE; + void rotate(float angle) FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate(void) FL_OVERRIDE; + int end_page (void) FL_OVERRIDE; /** Completes all PostScript output. This also closes with \p fclose() the underlying file() unless close_command() was used to set another function. */ - void end_job(void); + void end_job(void) FL_OVERRIDE; /** Label of the PostScript file chooser window */ static const char *file_chooser_title; /** Returns the underlying FILE* receiving all PostScript data */ FILE *file(); /** Sets the function end_job() calls to close the file() */ void close_command(Fl_PostScript_Close_Command cmd); - virtual void set_current(); - virtual void end_current(); + void set_current() FL_OVERRIDE; + void end_current() FL_OVERRIDE; }; /** Encapsulated PostScript drawing surface. @@ -193,13 +193,13 @@ public: with fl_alert(). */ ~Fl_EPS_File_Surface(); - virtual int printable_rect(int *w, int *h); + int printable_rect(int *w, int *h) FL_OVERRIDE; /** Returns the underlying FILE pointer */ FILE *file(); - virtual void origin(int x, int y); - virtual void origin(int *px, int *py); - virtual void translate(int x, int y); - virtual void untranslate(); + void origin(int x, int y) FL_OVERRIDE; + void origin(int *px, int *py) FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; /** Completes all EPS output. The only operation possible with the Fl_EPS_File_Surface object after calling close() is its destruction. \return The status code of output operations to the FILE object. 0 indicates success. */ diff --git a/FL/Fl_Printer.H b/FL/Fl_Printer.H index a8e4fdce4..b65fa3085 100644 --- a/FL/Fl_Printer.H +++ b/FL/Fl_Printer.H @@ -99,20 +99,20 @@ private: public: /** The constructor */ Fl_Printer(void); - int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL); - int begin_page(void); - int printable_rect(int *w, int *h); - void margins(int *left, int *top, int *right, int *bottom); - void origin(int *x, int *y); - void origin(int x, int y); - void scale(float scale_x, float scale_y = 0.); - void rotate(float angle); - void translate(int x, int y); - void untranslate(void); - int end_page (void); - void end_job (void); - void set_current(void); - virtual bool is_current(); + int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL) FL_OVERRIDE; + int begin_page(void) FL_OVERRIDE; + int printable_rect(int *w, int *h) FL_OVERRIDE; + void margins(int *left, int *top, int *right, int *bottom) FL_OVERRIDE; + void origin(int *x, int *y) FL_OVERRIDE; + void origin(int x, int y) FL_OVERRIDE; + void scale(float scale_x, float scale_y = 0.) FL_OVERRIDE; + void rotate(float angle) FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate(void) FL_OVERRIDE; + int end_page (void) FL_OVERRIDE; + void end_job (void) FL_OVERRIDE; + void set_current(void) FL_OVERRIDE; + bool is_current() FL_OVERRIDE; /** \name These attributes are useful for the Linux/Unix platform only. \{ diff --git a/FL/Fl_Progress.H b/FL/Fl_Progress.H index e0b5d8911..81c4f8241 100644 --- a/FL/Fl_Progress.H +++ b/FL/Fl_Progress.H @@ -41,7 +41,7 @@ class FL_EXPORT Fl_Progress : public Fl_Widget { protected: - virtual void draw(); + void draw() FL_OVERRIDE; public: diff --git a/FL/Fl_Repeat_Button.H b/FL/Fl_Repeat_Button.H index 08ac61a33..f80008e00 100644 --- a/FL/Fl_Repeat_Button.H +++ b/FL/Fl_Repeat_Button.H @@ -31,7 +31,7 @@ class FL_EXPORT Fl_Repeat_Button : public Fl_Button { static void repeat_callback(void *); public: - int handle(int); + int handle(int) FL_OVERRIDE; /** Creates a new Fl_Repeat_Button widget using the given position, size, and label string. The default boxtype is FL_UP_BOX. diff --git a/FL/Fl_Return_Button.H b/FL/Fl_Return_Button.H index d998dd31f..81ce47873 100644 --- a/FL/Fl_Return_Button.H +++ b/FL/Fl_Return_Button.H @@ -30,9 +30,9 @@ */ class FL_EXPORT Fl_Return_Button : public Fl_Button { protected: - void draw(); + void draw() FL_OVERRIDE; public: - int handle(int); + int handle(int) FL_OVERRIDE; /** Creates a new Fl_Return_Button widget using the given position, size, and label string. The default boxtype is FL_UP_BOX. diff --git a/FL/Fl_Roller.H b/FL/Fl_Roller.H index bd37a886c..5775058b8 100644 --- a/FL/Fl_Roller.H +++ b/FL/Fl_Roller.H @@ -37,9 +37,9 @@ */ class FL_EXPORT Fl_Roller : public Fl_Valuator { protected: - void draw(); + void draw() FL_OVERRIDE; public: - int handle(int); + int handle(int) FL_OVERRIDE; Fl_Roller(int X,int Y,int W,int H,const char* L=0); }; diff --git a/FL/Fl_SVG_File_Surface.H b/FL/Fl_SVG_File_Surface.H index 3599199d5..2a8061e16 100644 --- a/FL/Fl_SVG_File_Surface.H +++ b/FL/Fl_SVG_File_Surface.H @@ -65,11 +65,11 @@ public: ~Fl_SVG_File_Surface(); /** Returns the underlying FILE pointer */ FILE *file(); - virtual void origin(int x, int y); - virtual void origin(int *x, int *y); - virtual void translate(int x, int y); - virtual void untranslate(); - virtual int printable_rect(int *w, int *h); + void origin(int x, int y) FL_OVERRIDE; + void origin(int *x, int *y) FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; + int printable_rect(int *w, int *h) FL_OVERRIDE; /** Closes the FILE pointer where SVG data is output. The underlying FILE is closed by function fclose() unless another function was set at object's construction time. The only operation possible after this on the Fl_SVG_File_Surface object is its destruction. diff --git a/FL/Fl_SVG_Image.H b/FL/Fl_SVG_Image.H index 2171c2a75..6d9f77777 100644 --- a/FL/Fl_SVG_Image.H +++ b/FL/Fl_SVG_Image.H @@ -146,7 +146,7 @@ private: float average_weight_; float svg_scaling_(int W, int H); void rasterize_(int W, int H); - virtual void cache_size_(int &width, int &height); + void cache_size_(int &width, int &height) FL_OVERRIDE; void init_(const char *name, const unsigned char *filedata, size_t length); Fl_SVG_Image(const Fl_SVG_Image *source); public: @@ -157,17 +157,17 @@ public: Fl_SVG_Image(const char *sharedname, const char *svg_data); Fl_SVG_Image(const char *sharedname, const unsigned char *svg_data, size_t length); virtual ~Fl_SVG_Image(); - virtual Fl_Image *copy(int W, int H) const; + Fl_Image *copy(int W, int H) const FL_OVERRIDE; Fl_Image *copy() const { return Fl_Image::copy(); } void resize(int width, int height); - virtual void desaturate(); - virtual void color_average(Fl_Color c, float i); - virtual void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0); + void desaturate() FL_OVERRIDE; + void color_average(Fl_Color c, float i) FL_OVERRIDE; + void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0) FL_OVERRIDE; void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); } - virtual Fl_SVG_Image *as_svg_image() { return this; } - virtual void normalize(); + Fl_SVG_Image *as_svg_image() FL_OVERRIDE { return this; } + void normalize() FL_OVERRIDE; }; #endif // FL_SVG_IMAGE_H diff --git a/FL/Fl_Scroll.H b/FL/Fl_Scroll.H index 1917c96fd..0331c8330 100644 --- a/FL/Fl_Scroll.H +++ b/FL/Fl_Scroll.H @@ -146,19 +146,19 @@ protected: // (STR#1895) protected: - int on_insert(Fl_Widget*, int); // override - int on_move(int, int); // override + int on_insert(Fl_Widget*, int) FL_OVERRIDE; + int on_move(int, int) FL_OVERRIDE; void fix_scrollbar_order(); void bbox(int&,int&,int&,int&) const; - void draw(); + void draw() FL_OVERRIDE; public: Fl_Scrollbar scrollbar; Fl_Scrollbar hscrollbar; - void resize(int X, int Y, int W, int H); - int handle(int); + void resize(int X, int Y, int W, int H) FL_OVERRIDE; + int handle(int) FL_OVERRIDE; Fl_Scroll(int X, int Y, int W, int H, const char *L = 0); virtual ~Fl_Scroll(); @@ -181,7 +181,7 @@ public: void clear(); /* delete child n (by index) */ - virtual int delete_child(int n); + int delete_child(int n) FL_OVERRIDE; /** Gets the current size of the scrollbars' troughs, in pixels. diff --git a/FL/Fl_Scrollbar.H b/FL/Fl_Scrollbar.H index f4542cfdc..8e7a45ee9 100644 --- a/FL/Fl_Scrollbar.H +++ b/FL/Fl_Scrollbar.H @@ -45,13 +45,13 @@ class FL_EXPORT Fl_Scrollbar : public Fl_Slider { static void timeout_cb(void*); void increment_cb(); protected: - void draw(); + void draw() FL_OVERRIDE; public: Fl_Scrollbar(int X,int Y,int W,int H, const char *L = 0); ~Fl_Scrollbar(); - int handle(int); + int handle(int) FL_OVERRIDE; /** Gets the integer value (position) of the slider in the scrollbar. diff --git a/FL/Fl_Secret_Input.H b/FL/Fl_Secret_Input.H index 0c7eb1666..bd4ca30f9 100644 --- a/FL/Fl_Secret_Input.H +++ b/FL/Fl_Secret_Input.H @@ -39,7 +39,7 @@ public: Inherited destructor destroys the widget and any value associated with it. */ Fl_Secret_Input(int X,int Y,int W,int H,const char *l = 0); - int handle(int); + int handle(int) FL_OVERRIDE; }; #endif diff --git a/FL/Fl_Shared_Image.H b/FL/Fl_Shared_Image.H index 9307b9e58..c95db55e0 100644 --- a/FL/Fl_Shared_Image.H +++ b/FL/Fl_Shared_Image.H @@ -139,22 +139,22 @@ public: */ int original() { return original_; } - void release(); - void reload(); + void release() FL_OVERRIDE; + virtual void reload(); - virtual Fl_Shared_Image *as_shared_image() { + Fl_Shared_Image *as_shared_image() FL_OVERRIDE { return this; } - virtual Fl_Image *copy(int W, int H) const; + Fl_Image *copy(int W, int H) const FL_OVERRIDE; Fl_Image *copy() const { return Fl_Image::copy(); } - virtual void color_average(Fl_Color c, float i); - virtual void desaturate(); - virtual void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0); + void color_average(Fl_Color c, float i) FL_OVERRIDE; + void desaturate() FL_OVERRIDE; + void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0) FL_OVERRIDE; void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); } - virtual void uncache(); + void uncache() FL_OVERRIDE; static Fl_Shared_Image *find(const char *name, int W = 0, int H = 0); static Fl_Shared_Image *get(const char *name, int W = 0, int H = 0); diff --git a/FL/Fl_Simple_Terminal.H b/FL/Fl_Simple_Terminal.H index 74b012810..d7d438c8b 100644 --- a/FL/Fl_Simple_Terminal.H +++ b/FL/Fl_Simple_Terminal.H @@ -228,7 +228,7 @@ private: protected: // Fltk - virtual void draw(); + void draw() FL_OVERRIDE; // Internal methods void enforce_stay_at_bottom(); diff --git a/FL/Fl_Single_Window.H b/FL/Fl_Single_Window.H index bab37b4dc..8cd101e54 100644 --- a/FL/Fl_Single_Window.H +++ b/FL/Fl_Single_Window.H @@ -31,7 +31,7 @@ */ class FL_EXPORT Fl_Single_Window : public Fl_Window { public: - void show(); + void show() FL_OVERRIDE; /** Same as Fl_Window::show(int a, char **b) */ void show(int a, char **b) {Fl_Window::show(a,b);} diff --git a/FL/Fl_Slider.H b/FL/Fl_Slider.H index 4761c6f11..071423864 100644 --- a/FL/Fl_Slider.H +++ b/FL/Fl_Slider.H @@ -68,11 +68,11 @@ protected: // these allow subclasses to put the slider in a smaller area: void draw(int, int, int, int); int handle(int, int, int, int, int); - void draw(); + void draw() FL_OVERRIDE; public: - int handle(int); + int handle(int) FL_OVERRIDE; Fl_Slider(int X,int Y,int W,int H, const char *L = 0); Fl_Slider(uchar t,int X,int Y,int W,int H, const char *L); diff --git a/FL/Fl_Spinner.H b/FL/Fl_Spinner.H index aa5442f2b..cad68a3a0 100644 --- a/FL/Fl_Spinner.H +++ b/FL/Fl_Spinner.H @@ -58,7 +58,7 @@ protected: public: Fl_Spinner_Input(int X, int Y, int W, int H) : Fl_Input(X, Y, W, H) {} - int handle(int event); // implemented in src/Fl_Spinner.cxx + int handle(int event) FL_OVERRIDE; // implemented in src/Fl_Spinner.cxx }; Fl_Spinner_Input input_; // Input field for the value @@ -66,16 +66,16 @@ protected: up_button_, // Up button down_button_; // Down button - virtual void draw(); + void draw() FL_OVERRIDE; public: // Constructor Fl_Spinner(int X, int Y, int W, int H, const char *L = 0); // Event handling - int handle(int event); + int handle(int event) FL_OVERRIDE; // Resize group and subwidgets - void resize(int X, int Y, int W, int H); + void resize(int X, int Y, int W, int H) FL_OVERRIDE; /** Returns the format string for the value. */ const char *format() const { return (format_); } diff --git a/FL/Fl_Sys_Menu_Bar.H b/FL/Fl_Sys_Menu_Bar.H index beb4425a9..7045757a6 100644 --- a/FL/Fl_Sys_Menu_Bar.H +++ b/FL/Fl_Sys_Menu_Bar.H @@ -95,7 +95,7 @@ class Fl_Sys_Menu_Bar_Driver; class FL_EXPORT Fl_Sys_Menu_Bar : public Fl_Menu_Bar { static Fl_Sys_Menu_Bar_Driver *driver(); protected: - virtual void draw(); + void draw() FL_OVERRIDE; public: /** Possible styles of the Window menu in the system menu bar */ typedef enum { @@ -110,7 +110,7 @@ public: */ const Fl_Menu_Item *menu() const {return Fl_Menu_::menu();} void menu(const Fl_Menu_Item *m); - virtual void update(); + void update() FL_OVERRIDE; int add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0); /** Adds a new menu item. \see Fl_Menu_::add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0) diff --git a/FL/Fl_Table.H b/FL/Fl_Table.H index 15e7836bb..d6b4c4738 100644 --- a/FL/Fl_Table.H +++ b/FL/Fl_Table.H @@ -231,7 +231,7 @@ protected: Fl_Scrollbar *hscrollbar; ///< child horizontal scrollbar widget // Fltk - int handle(int e); // fltk handle() override + int handle(int e) FL_OVERRIDE; // fltk handle() FL_OVERRIDE // Class maintenance void recalc_dimensions(); @@ -397,7 +397,7 @@ protected: } // draw() has to be protected per FLTK convention (was public in 1.3.x) - void draw(); + void draw() FL_OVERRIDE; public: Fl_Table(int X, int Y, int W, int H, const char *l=0); @@ -732,7 +732,7 @@ public: void set_selection(int row_top, int col_left, int row_bot, int col_right); int move_cursor(int R, int C, int shiftselect); int move_cursor(int R, int C); - void resize(int X, int Y, int W, int H); // fltk resize() override + void resize(int X, int Y, int W, int H) FL_OVERRIDE; // fltk resize() FL_OVERRIDE // This crashes sortapp() during init. // void box(Fl_Boxtype val) { diff --git a/FL/Fl_Table_Row.H b/FL/Fl_Table_Row.H index 655efab81..ac35f333c 100644 --- a/FL/Fl_Table_Row.H +++ b/FL/Fl_Table_Row.H @@ -112,7 +112,7 @@ private: TableRowSelectMode _selectmode; protected: - int handle(int event); + int handle(int event) FL_OVERRIDE; int find_cell(TableContext context, // find cell's x/y/w/h given r/c int R, int C, int &X, int &Y, int &W, int &H) { return(Fl_Table::find_cell(context, R, C, X, Y, W, H)); @@ -139,7 +139,7 @@ public: */ ~Fl_Table_Row() { } - void rows(int val); // set number of rows + void rows(int val) FL_OVERRIDE; // set number of rows int rows() { // get number of rows return(Fl_Table::rows()); } @@ -177,7 +177,7 @@ public: */ void select_all_rows(int flag=1); // all rows to a known state - void clear() { + void clear() FL_OVERRIDE { rows(0); // implies clearing selection cols(0); Fl_Table::clear(); // clear the table diff --git a/FL/Fl_Tabs.H b/FL/Fl_Tabs.H index cb4e493eb..27f5bc0da 100644 --- a/FL/Fl_Tabs.H +++ b/FL/Fl_Tabs.H @@ -215,14 +215,14 @@ protected: virtual void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0); virtual int tab_height(); - void draw(); + void draw() FL_OVERRIDE; public: Fl_Tabs(int X, int Y, int W, int H, const char *L = 0); virtual ~Fl_Tabs(); - int handle(int); + int handle(int) FL_OVERRIDE; Fl_Widget *value(); int value(Fl_Widget *); /** diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H index 1d5b51193..1b8647f92 100644 --- a/FL/Fl_Text_Display.H +++ b/FL/Fl_Text_Display.H @@ -167,7 +167,7 @@ public: Fl_Text_Display(int X, int Y, int W, int H, const char *l = 0); ~Fl_Text_Display(); - virtual int handle(int e); + int handle(int e) FL_OVERRIDE; void buffer(Fl_Text_Buffer* buf); @@ -433,7 +433,7 @@ public: void wrap_mode(int wrap, int wrap_margin); virtual void recalc_display(); - virtual void resize(int X, int Y, int W, int H); + void resize(int X, int Y, int W, int H) FL_OVERRIDE; /** Convert an x pixel position into a column number. @@ -471,7 +471,7 @@ protected: // Anything with "vline" indicates thats it deals with currently // visible lines. - virtual void draw(); + void draw() FL_OVERRIDE; void draw_text(int X, int Y, int W, int H); void draw_range(int start, int end); void draw_cursor(int, int); diff --git a/FL/Fl_Text_Editor.H b/FL/Fl_Text_Editor.H index 48f8a1ac0..b9a0d42b0 100644 --- a/FL/Fl_Text_Editor.H +++ b/FL/Fl_Text_Editor.H @@ -50,7 +50,7 @@ class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display { Fl_Text_Editor(int X, int Y, int W, int H, const char* l = 0); ~Fl_Text_Editor() { remove_all_key_bindings(); } - virtual int handle(int e); + int handle(int e) FL_OVERRIDE; /** Sets the current insert mode; if non-zero, new text is inserted before the current cursor position. Otherwise, new diff --git a/FL/Fl_Tile.H b/FL/Fl_Tile.H index 5b818fe89..52d14210c 100644 --- a/FL/Fl_Tile.H +++ b/FL/Fl_Tile.H @@ -26,9 +26,9 @@ class FL_EXPORT Fl_Tile : public Fl_Group { public: - int handle(int event); + int handle(int event) FL_OVERRIDE; Fl_Tile(int X, int Y, int W, int H, const char *L=0); - void resize(int X, int Y, int W, int H); + void resize(int X, int Y, int W, int H) FL_OVERRIDE; void position(int oldx, int oldy, int newx, int newy); }; diff --git a/FL/Fl_Tiled_Image.H b/FL/Fl_Tiled_Image.H index ebccd3be4..d705dda5e 100644 --- a/FL/Fl_Tiled_Image.H +++ b/FL/Fl_Tiled_Image.H @@ -43,13 +43,13 @@ public: Fl_Tiled_Image(Fl_Image *i, int W = 0, int H = 0); virtual ~Fl_Tiled_Image(); - virtual Fl_Image *copy(int W, int H) const; + Fl_Image *copy(int W, int H) const FL_OVERRIDE; Fl_Image *copy() const { return Fl_Image::copy(); } - virtual void color_average(Fl_Color c, float i); - virtual void desaturate(); - virtual void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0); + void color_average(Fl_Color c, float i) FL_OVERRIDE; + void desaturate() FL_OVERRIDE; + void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0) FL_OVERRIDE; void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); } /** Gets The image that is tiled */ Fl_Image *image() { return image_; } diff --git a/FL/Fl_Timer.H b/FL/Fl_Timer.H index 6c9db28a1..b79bbebfa 100644 --- a/FL/Fl_Timer.H +++ b/FL/Fl_Timer.H @@ -43,9 +43,9 @@ class FL_EXPORT Fl_Timer : public Fl_Widget { double delay, total; long lastsec,lastusec; protected: - void draw(); + void draw() FL_OVERRIDE; public: - int handle(int); + int handle(int) FL_OVERRIDE; Fl_Timer(uchar t,int x,int y,int w,int h, const char *l); ~Fl_Timer(); void value(double); diff --git a/FL/Fl_Tree.H b/FL/Fl_Tree.H index 44509e978..9a56e1841 100644 --- a/FL/Fl_Tree.H +++ b/FL/Fl_Tree.H @@ -312,14 +312,14 @@ protected: // undocmented draw_tree() dropped -- draw() does all the work now // draw() has to be protected per FLTK convention (was public in 1.3.x) - void draw(); + void draw() FL_OVERRIDE; public: Fl_Tree(int X, int Y, int W, int H, const char *L=0); ~Fl_Tree(); - int handle(int e); + int handle(int e) FL_OVERRIDE; void show_self(); - void resize(int,int,int,int); + void resize(int,int,int,int) FL_OVERRIDE; /////////////////////// // root methods diff --git a/FL/Fl_Value_Input.H b/FL/Fl_Value_Input.H index 03f9814b3..7aca4e9ba 100644 --- a/FL/Fl_Value_Input.H +++ b/FL/Fl_Value_Input.H @@ -61,13 +61,13 @@ public: private: char soft_; static void input_cb(Fl_Widget*,void*); - virtual void value_damage(); // cause damage() due to value() changing + void value_damage() FL_OVERRIDE; // cause damage() due to value() changing public: - int handle(int); + int handle(int) FL_OVERRIDE; protected: - void draw(); + void draw() FL_OVERRIDE; public: - void resize(int,int,int,int); + void resize(int,int,int,int) FL_OVERRIDE; Fl_Value_Input(int x,int y,int w,int h,const char *l=0); ~Fl_Value_Input(); diff --git a/FL/Fl_Value_Output.H b/FL/Fl_Value_Output.H index c78383286..4e380ea2a 100644 --- a/FL/Fl_Value_Output.H +++ b/FL/Fl_Value_Output.H @@ -43,10 +43,10 @@ class FL_EXPORT Fl_Value_Output : public Fl_Valuator { Fl_Color textcolor_; protected: - void draw(); + void draw() FL_OVERRIDE; public: - int handle(int); + int handle(int) FL_OVERRIDE; Fl_Value_Output(int x,int y,int w,int h,const char *l=0); /** diff --git a/FL/Fl_Value_Slider.H b/FL/Fl_Value_Slider.H index e49b046a1..3d7e42cba 100644 --- a/FL/Fl_Value_Slider.H +++ b/FL/Fl_Value_Slider.H @@ -36,10 +36,10 @@ class FL_EXPORT Fl_Value_Slider : public Fl_Slider { short value_height_; protected: - void draw(); + void draw() FL_OVERRIDE; public: - int handle(int); + int handle(int) FL_OVERRIDE; Fl_Value_Slider(int x, int y, int w, int h, const char *l = 0); /** Gets the typeface of the text in the value box. */ diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index c7ecb416d..ddb3283eb 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -93,7 +93,7 @@ protected: /** Stores the last window that was made current. See current() const */ static Fl_Window *current_; - void draw(); + void draw() FL_OVERRIDE; /** Forces the window to be drawn, this window is also made current and calls draw(). */ virtual void flush(); @@ -170,7 +170,7 @@ public: */ virtual ~Fl_Window(); - virtual int handle(int); + int handle(int) FL_OVERRIDE; /** Changes the size and position of the window. If shown() is true, @@ -188,7 +188,7 @@ public: dimensions. It is up to the application developer to verify window parameters after the resize request. */ - virtual void resize(int X,int Y,int W,int H); + void resize(int X,int Y,int W,int H) FL_OVERRIDE; /** Sets whether or not the window manager border is around the window. The default value is true. With some X window managers, this does not work after show() has been called. @@ -201,9 +201,9 @@ public: void clear_border() {set_flag(NOBORDER);} /** Returns whether the window possesses a border */ unsigned int border() const {return !(flags() & NOBORDER);} - /** Activates the flags NOBORDER|FL_OVERRIDE */ + /** Activates the flags NOBORDER|OVERRIDE */ void set_override() {set_flag(NOBORDER|OVERRIDE);} - /** Returns non zero if FL_OVERRIDE flag is set, 0 otherwise. */ + /** Returns non zero if OVERRIDE flag is set, 0 otherwise. */ unsigned int override() const { return flags()&OVERRIDE; } /** A "modal" window, when shown(), will prevent any events from @@ -424,12 +424,12 @@ public: \see Fl_Window::show(int argc, char **argv) */ - virtual void show(); + void show() FL_OVERRIDE; /** Removes the window from the screen. If the window is already hidden or has not been shown then this does nothing and is harmless. */ - virtual void hide(); + void hide() FL_OVERRIDE; /** Puts the window on the screen and parses command-line arguments. @@ -567,7 +567,7 @@ public: int decorated_h() const; // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. - virtual Fl_Window* as_window() { return this; } + Fl_Window* as_window() FL_OVERRIDE { return this; } /** Return non-null if this is an Fl_Overlay_Window object. diff --git a/FL/Fl_Wizard.H b/FL/Fl_Wizard.H index 785cee450..b45d21892 100644 --- a/FL/Fl_Wizard.H +++ b/FL/Fl_Wizard.H @@ -43,7 +43,7 @@ class FL_EXPORT Fl_Wizard : public Fl_Group { protected: - virtual void draw(); + void draw() FL_OVERRIDE; public: diff --git a/FL/fl_attr.h b/FL/fl_attr.h index 32e88a2a4..e2d6961da 100644 --- a/FL/fl_attr.h +++ b/FL/fl_attr.h @@ -31,4 +31,62 @@ # define __fl_attr(x) #endif + +#ifdef FL_DOXYGEN + +/** + This macro makes it safe to use the C++11 keyword \c override with + older compilers. +*/ +#define FL_OVERRIDE override + +#else + +#ifdef __cplusplus + +// Visual Studio defines __cplusplus = '199711L' which is not helpful. +// We assume that Visual Studio 2015 (1900) and later support the +// 'override' keyword. For VS version number encoding see: +// https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros + +#if defined(_MSC_VER) && (_MSC_VER >= 1900) + +#define FL_OVERRIDE override + +#else // not Visual Studio or an older version + +#if (__cplusplus >= 202002L) +// put here definitions applying to C++20 and above +#endif + +#if (__cplusplus >= 201703L) +// put here definitions applying to C++17 and above +#endif + +#if (__cplusplus >= 201402L) +// put here definitions applying to C++14 and above +#endif + +#if (__cplusplus >= 201103L) +// put here definitions applying to C++11 and above +#define FL_OVERRIDE override +#else +// replace non-existing `override` with no-op +#define FL_OVERRIDE +#endif + +#if (__cplusplus >= 199711L) +// put here definitions applying to C++98 and above +#endif + +#endif /* not Visual Studio */ + +#else +/* C, not C++ */ + +#endif /* __cplusplus */ + +#endif /* FL_DOXYGEN */ + + #endif /* !_FL_fl_attr_h_ */ diff --git a/FL/fl_types.h b/FL/fl_types.h index ea1c5299b..54318871b 100644 --- a/FL/fl_types.h +++ b/FL/fl_types.h @@ -21,6 +21,8 @@ #ifndef FL_TYPES_H #define FL_TYPES_H +#include "fl_attr.h" + /** \name Miscellaneous */ /*@{*/ /* group: Miscellaneous */ diff --git a/FL/forms.H b/FL/forms.H index 7e08b176b..a25a1c936 100644 --- a/FL/forms.H +++ b/FL/forms.H @@ -802,7 +802,7 @@ inline void fl_set_slider_precision(Fl_Widget* o, int i) { // meaning of FL_ALIGN_INSIDE. Implementation in forms.cxx class FL_EXPORT Fl_FormsText : public Fl_Widget { protected: - void draw(); + void draw() FL_OVERRIDE; public: Fl_FormsText(Fl_Boxtype b, int X, int Y, int W, int H, const char* l=0) : Fl_Widget(X,Y,W,H,l) {box(b); align(FL_ALIGN_LEFT);} diff --git a/FL/glut.H b/FL/glut.H index 3e55bc7bd..b6e915985 100644 --- a/FL/glut.H +++ b/FL/glut.H @@ -43,9 +43,9 @@ class FL_EXPORT Fl_Glut_Window : public Fl_Gl_Window { void _init(); int mouse_down; protected: - void draw(); - void draw_overlay(); - int handle(int); + void draw() FL_OVERRIDE; + void draw_overlay() FL_OVERRIDE; + int handle(int) FL_OVERRIDE; public: // so the inline functions work int number; int menu[3]; diff --git a/cairo/Fl_Cairo.cxx b/cairo/Fl_Cairo.cxx index 0b655033a..1fb3f3488 100644 --- a/cairo/Fl_Cairo.cxx +++ b/cairo/Fl_Cairo.cxx @@ -67,7 +67,7 @@ void Fl_Cairo_State::autolink(bool b) { /** Provides a corresponding Cairo context for window \a wi. - This is needed in a draw() override if Fl::cairo_autolink_context() + This is needed in a draw() FL_OVERRIDE if Fl::cairo_autolink_context() returns false, which is the default. The cairo_context() does not need to be freed as it is freed every time a new Cairo context is created. When the program terminates, diff --git a/examples/OpenGL3test.cxx b/examples/OpenGL3test.cxx index 528610553..5f373635b 100644 --- a/examples/OpenGL3test.cxx +++ b/examples/OpenGL3test.cxx @@ -49,7 +49,7 @@ public: shaderProgram = 0; gl_version_major = 0; } - void draw(void) { + void draw(void) FL_OVERRIDE { if (gl_version_major >= 3 && !shaderProgram) { GLuint vs; GLuint fs; @@ -141,7 +141,7 @@ public: } Fl_Gl_Window::draw(); // Draw FLTK child widgets. } - virtual int handle(int event) { + int handle(int event) FL_OVERRIDE { static int first = 1; if (first && event == FL_SHOW && shown()) { first = 0; diff --git a/examples/draggable-group.cxx b/examples/draggable-group.cxx index 9bfd4694f..5ec92d826 100644 --- a/examples/draggable-group.cxx +++ b/examples/draggable-group.cxx @@ -92,7 +92,7 @@ public: All other events are handled in Fl_Group::handle(). Dragged widgets are limited inside the borders of their parent group. */ - virtual int handle(int e) { + int handle(int e) FL_OVERRIDE { switch (e) { diff --git a/examples/howto-drag-and-drop.cxx b/examples/howto-drag-and-drop.cxx index 856838d61..72e32996d 100644 --- a/examples/howto-drag-and-drop.cxx +++ b/examples/howto-drag-and-drop.cxx @@ -38,7 +38,7 @@ public: label("Drag\nfrom\nhere.."); } // Sender event handler - int handle(int event) { + int handle(int event) FL_OVERRIDE { int ret = Fl_Box::handle(event); switch ( event ) { case FL_PUSH: { // do 'copy/dnd' when someone clicks on box @@ -64,7 +64,7 @@ public: dnd_text = 0; } // Receiver event handler - int handle(int event) { + int handle(int event) FL_OVERRIDE { int ret = Fl_Box::handle(event); int len; switch ( event ) { diff --git a/examples/howto-draw-an-x.cxx b/examples/howto-draw-an-x.cxx index c1bce5b0f..c8b66b1c4 100644 --- a/examples/howto-draw-an-x.cxx +++ b/examples/howto-draw-an-x.cxx @@ -27,7 +27,7 @@ class DrawX : public Fl_Widget { public: DrawX(int X, int Y, int W, int H, const char*L=0) : Fl_Widget(X,Y,W,H,L) { } - void draw() { + virtual void draw() FL_OVERRIDE { // Draw background - a white filled rectangle fl_color(FL_WHITE); fl_rectf(x(),y(),w(),h()); // Draw black 'X' over base widget's background diff --git a/examples/shapedwindow.cxx b/examples/shapedwindow.cxx index b06a6c0fb..36433fb13 100644 --- a/examples/shapedwindow.cxx +++ b/examples/shapedwindow.cxx @@ -33,7 +33,7 @@ void cb(Fl_Widget *w, void *) { class dragbox : public Fl_Box { public: dragbox(int x, int y, int w, int h, const char *t=0) : Fl_Box(x,y,w,h,t) {} - int handle(int event) { + int handle(int event) FL_OVERRIDE { static int fromx, fromy, winx, winy; if (event == FL_PUSH) { fromx = Fl::event_x_root(); diff --git a/examples/table-as-container.cxx b/examples/table-as-container.cxx index d5887439d..5c0051bfb 100644 --- a/examples/table-as-container.cxx +++ b/examples/table-as-container.cxx @@ -40,7 +40,7 @@ void button_cb(Fl_Widget *w, void*); class WidgetTable : public Fl_Table { protected: void draw_cell(TableContext context, // table cell drawing - int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0); + int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0) FL_OVERRIDE; public: WidgetTable(int x, int y, int w, int h, const char *l=0) : Fl_Table(x,y,w,h,l) { diff --git a/examples/table-simple.cxx b/examples/table-simple.cxx index accf3f3bb..e4f520228 100644 --- a/examples/table-simple.cxx +++ b/examples/table-simple.cxx @@ -59,7 +59,7 @@ class MyTable : 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/examples/table-sort.cxx b/examples/table-sort.cxx index ec3498c83..5e2afa725 100644 --- a/examples/table-sort.cxx +++ b/examples/table-sort.cxx @@ -97,8 +97,8 @@ private: void event_callback2(); // callback for table events protected: - void draw_cell(TableContext context, int R=0, int C=0, // table cell drawing - int X=0, int Y=0, int W=0, int H=0); + void draw_cell(TableContext context, int R=0, int C=0, // table cell drawing + int X=0, int Y=0, int W=0, int H=0) FL_OVERRIDE; void sort_column(int col, int reverse=0); // sort table by a column void draw_sort_arrow(int X,int Y,int W,int H); diff --git a/examples/table-spreadsheet-with-keyboard-nav.cxx b/examples/table-spreadsheet-with-keyboard-nav.cxx index ec8714df3..8b6dd7510 100644 --- a/examples/table-spreadsheet-with-keyboard-nav.cxx +++ b/examples/table-spreadsheet-with-keyboard-nav.cxx @@ -40,7 +40,7 @@ class Spreadsheet : public Fl_Table { int s_left, s_top, s_right, s_bottom; // kb nav + mouse selection protected: - void draw_cell(TableContext context,int=0,int=0,int=0,int=0,int=0,int=0); + void draw_cell(TableContext context,int=0,int=0,int=0,int=0,int=0,int=0) FL_OVERRIDE; void event_callback2(); // table's event callback (instance) static void event_callback(Fl_Widget*, void *v) { // table's event callback (static) ((Spreadsheet*)v)->event_callback2(); @@ -75,11 +75,11 @@ public: window()->cursor(FL_CURSOR_DEFAULT); // XXX: if we don't do this, cursor can disappear! } // Change number of rows - void rows(int val) { + void rows(int val) FL_OVERRIDE { Fl_Table::rows(val); } // Change number of columns - void cols(int val) { + void cols(int val) FL_OVERRIDE { Fl_Table::cols(val); } // Get number of rows diff --git a/examples/table-spreadsheet.cxx b/examples/table-spreadsheet.cxx index ac7c334e0..2b792231b 100644 --- a/examples/table-spreadsheet.cxx +++ b/examples/table-spreadsheet.cxx @@ -31,7 +31,7 @@ class Spreadsheet : public Fl_Table { int row_edit, col_edit; // row/col being modified protected: - void draw_cell(TableContext context,int=0,int=0,int=0,int=0,int=0,int=0); + void draw_cell(TableContext context,int=0,int=0,int=0,int=0,int=0,int=0) FL_OVERRIDE; void event_callback2(); // table's event callback (instance) static void event_callback(Fl_Widget*,void *v) { // table's event callback (static) ((Spreadsheet*)v)->event_callback2(); diff --git a/examples/table-with-keynav.cxx b/examples/table-with-keynav.cxx index ee5f98ed5..fb28d4523 100644 --- a/examples/table-with-keynav.cxx +++ b/examples/table-with-keynav.cxx @@ -41,7 +41,7 @@ Fl_Output *G_sum = 0; // displays sum of user's select class MyTable : public Fl_Table_Row { protected: // Handle drawing all cells in table - void draw_cell(TableContext context, int R=0,int C=0, int X=0,int Y=0,int W=0,int H=0) { + void draw_cell(TableContext context, int R=0,int C=0, int X=0,int Y=0,int W=0,int H=0) FL_OVERRIDE { static char s[30]; switch ( context ) { case CONTEXT_COL_HEADER: @@ -119,7 +119,7 @@ public: { G_sum->value(s); G_sum->redraw(); } } // Keyboard and mouse events - int handle(int e) { + int handle(int e) FL_OVERRIDE { int ret = Fl_Table_Row::handle(e); if ( e == FL_KEYBOARD && Fl::event_key() == FL_Escape ) exit(0); switch (e) { diff --git a/examples/table-with-right-column-stretch-fit.cxx b/examples/table-with-right-column-stretch-fit.cxx index 374bcec5b..c6722fc61 100644 --- a/examples/table-with-right-column-stretch-fit.cxx +++ b/examples/table-with-right-column-stretch-fit.cxx @@ -59,7 +59,7 @@ class MyTable : 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.. @@ -115,7 +115,7 @@ public: } // Handle window resizing - void resize(int X,int Y,int W,int H) { + void resize(int X,int Y,int W,int H) FL_OVERRIDE { Fl_Table::resize(X,Y,W,H); FixColumnSize(); // after letting window resize, fix our right most column } diff --git a/examples/tree-custom-draw-items.cxx b/examples/tree-custom-draw-items.cxx index e7fb3ecde..8101b54e2 100644 --- a/examples/tree-custom-draw-items.cxx +++ b/examples/tree-custom-draw-items.cxx @@ -59,7 +59,7 @@ public: // that we want the user to be able to use the horizontal scrollbar // to reach. // - int draw_item_content(int render) { + int draw_item_content(int render) FL_OVERRIDE { Fl_Color fg = drawfgcolor(); Fl_Color bg = drawbgcolor(); // Show the date and time as two small strings diff --git a/examples/tree-of-tables.cxx b/examples/tree-of-tables.cxx index f26d685b0..94c7705a9 100644 --- a/examples/tree-of-tables.cxx +++ b/examples/tree-of-tables.cxx @@ -37,7 +37,7 @@ public: this->mode = mode; end(); } - void resize(int X,int Y,int W,int H) { + void resize(int X,int Y,int W,int H) FL_OVERRIDE { if ( W > 718 ) W = 718; // don't exceed 700 in width Fl_Table::resize(X,Y,W,h()); // disallow changes in height } @@ -45,7 +45,7 @@ public: // 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, int COL, int X, int Y, int W, int H) { + void draw_cell(TableContext context, int ROW, int COL, int X, int Y, int W, int H) FL_OVERRIDE { static char s[40]; switch ( context ) { case CONTEXT_STARTPAGE: // before page is drawn.. 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; } + 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; } - 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; }; 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 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_properties() FL_OVERRIDE; + void read_property(const char *) FL_OVERRIDE; - 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_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 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 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 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 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 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 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 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 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 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 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 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 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("

Fl_Help_View Widget

" "

This is a Fl_Help_View widget.

"); } 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 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 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 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 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 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(); diff --git a/src/Fl_Color_Chooser.cxx b/src/Fl_Color_Chooser.cxx index 08307a8da..665c72dc6 100644 --- a/src/Fl_Color_Chooser.cxx +++ b/src/Fl_Color_Chooser.cxx @@ -580,7 +580,7 @@ Fl_Color_Chooser::Fl_Color_Chooser(int X, int Y, int W, int H, const char* L) #include class ColorChip : public Fl_Widget { - void draw(); + void draw() FL_OVERRIDE; public: uchar r,g,b; ColorChip(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) { diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx index 6abdbb514..12fe05bfc 100644 --- a/src/Fl_Gl_Device_Plugin.cxx +++ b/src/Fl_Gl_Device_Plugin.cxx @@ -28,8 +28,8 @@ class Fl_Gl_Device_Plugin : public Fl_Device_Plugin { public: Fl_Gl_Device_Plugin() : Fl_Device_Plugin(name()) { } - virtual const char *name() { return "opengl.device.fltk.org"; } - virtual int print(Fl_Widget *w) { + const char *name() FL_OVERRIDE { return "opengl.device.fltk.org"; } + int print(Fl_Widget *w) FL_OVERRIDE { Fl_Gl_Window *glw = w->as_gl_window(); if (!glw) return 0; Fl_RGB_Image *img = Fl_Gl_Window_Driver::driver(glw)->capture_gl_rectangle(0, 0, glw->w(), glw->h()); @@ -38,7 +38,7 @@ public: delete img; return 1; } - virtual Fl_RGB_Image* rectangle_capture(Fl_Widget *widget, int x, int y, int w, int h) { + Fl_RGB_Image* rectangle_capture(Fl_Widget *widget, int x, int y, int w, int h) FL_OVERRIDE { Fl_Gl_Window *glw = widget->as_gl_window(); if (!glw) return NULL; return Fl_Gl_Window_Driver::driver(glw)->capture_gl_rectangle(x, y, w, h); diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 39f3cba34..d726a692b 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -116,7 +116,7 @@ public: // tiny window for title of menu: class menutitle : public window_with_items { - void draw(); + void draw() FL_OVERRIDE; public: menutitle(int X, int Y, int W, int H, const Fl_Menu_Item*); }; @@ -125,14 +125,14 @@ public: class menuwindow : public window_with_items { friend class Fl_Window_Driver; friend struct Fl_Menu_Item; - void draw(); + void draw() FL_OVERRIDE; void drawentry(const Fl_Menu_Item*, int i, int erase); int handle_part1(int); int handle_part2(int e, int ret); static Fl_Window *parent_; public: menutitle* title; - int handle(int); + int handle(int) FL_OVERRIDE; int itemheight; // zero == menubar int numitems; int selected; diff --git a/src/Fl_Message.h b/src/Fl_Message.h index 7450d23a1..2f33df1d1 100644 --- a/src/Fl_Message.h +++ b/src/Fl_Message.h @@ -45,7 +45,7 @@ class Fl_Message_Box : public Fl_Box { public: Fl_Message_Box(int X, int Y, int W, int H) : Fl_Box(X, Y, W, H) {} - int handle(int e); + int handle(int e) FL_OVERRIDE; }; // class Fl_Message_Box /** diff --git a/src/Fl_Native_File_Chooser_GTK.cxx b/src/Fl_Native_File_Chooser_GTK.cxx index cbfe50440..6a4e3fad0 100644 --- a/src/Fl_Native_File_Chooser_GTK.cxx +++ b/src/Fl_Native_File_Chooser_GTK.cxx @@ -130,16 +130,16 @@ private: int fl_gtk_chooser_wrapper(); // method that wraps the GTK widget Fl_GTK_Native_File_Chooser_Driver(int val); - virtual ~Fl_GTK_Native_File_Chooser_Driver(); + ~Fl_GTK_Native_File_Chooser_Driver() FL_OVERRIDE; static int did_find_GTK_libs; static void probe_for_GTK_libs(void); - virtual void type(int); - virtual int count() const; - virtual const char *filename() const; - virtual const char *filename(int i) const; - virtual void title(const char *); - virtual const char* title() const; - virtual int show(); + void type(int) FL_OVERRIDE; + int count() const FL_OVERRIDE; + const char *filename() const FL_OVERRIDE; + const char *filename(int i) const FL_OVERRIDE; + void title(const char *) FL_OVERRIDE; + const char* title() const FL_OVERRIDE; + int show() FL_OVERRIDE; void changed_output_type(const char *filter); static int custom_gtk_filter_function(const GtkFileFilterInfo*, Fl_GTK_Native_File_Chooser_Driver::pair*); diff --git a/src/Fl_Native_File_Chooser_Kdialog.H b/src/Fl_Native_File_Chooser_Kdialog.H index c4f824b76..fd423a8c6 100644 --- a/src/Fl_Native_File_Chooser_Kdialog.H +++ b/src/Fl_Native_File_Chooser_Kdialog.H @@ -36,21 +36,21 @@ class Fl_Kdialog_Native_File_Chooser_Driver : public Fl_Native_File_Chooser_FLTK static bool have_looked_for_kdialog; Fl_Kdialog_Native_File_Chooser_Driver(int val); ~Fl_Kdialog_Native_File_Chooser_Driver(); - int count() const; - const char *filename() const; - const char *filename(int i) const; + int count() const FL_OVERRIDE; + const char *filename() const FL_OVERRIDE; + const char *filename(int i) const FL_OVERRIDE; virtual char *build_command(); - int show(); + int show() FL_OVERRIDE; char *parse_filter(const char *f); - const char *filter() const; - virtual void filter(const char *f); - int filters() const; - void preset_file(const char *val); - const char *preset_file() const; - void directory(const char *val); - const char *directory() const; - void title(const char *val); - const char *title() const; + const char *filter() const FL_OVERRIDE; + void filter(const char *f) FL_OVERRIDE; + int filters() const FL_OVERRIDE; + void preset_file(const char *val) FL_OVERRIDE; + const char *preset_file() const FL_OVERRIDE; + void directory(const char *val) FL_OVERRIDE; + const char *directory() const FL_OVERRIDE; + void title(const char *val) FL_OVERRIDE; + const char *title() const FL_OVERRIDE; }; #endif // FL_KDIALOG_NATIVE_FILE_CHOOSER_H diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm index a0ef1ac74..df4808cb2 100644 --- a/src/Fl_Native_File_Chooser_MAC.mm +++ b/src/Fl_Native_File_Chooser_MAC.mm @@ -67,26 +67,26 @@ private: public: Fl_Quartz_Native_File_Chooser_Driver(int val); ~Fl_Quartz_Native_File_Chooser_Driver(); - virtual void type(int t); - virtual int type() const ; - virtual void options(int o); - virtual int options() const; - virtual int count() const; - virtual const char *filename() const ; - virtual const char *filename(int i) const ; - virtual void directory(const char *val) ; - virtual const char *directory() const; - virtual void title(const char *t); - virtual const char* title() const; - virtual const char *filter() const ; - virtual void filter(const char *f); - virtual int filters() const ; - virtual void filter_value(int i) ; - virtual int filter_value() const ; - virtual void preset_file(const char*f) ; - virtual const char* preset_file() const; - virtual const char *errmsg() const ; - virtual int show() ; + void type(int t) FL_OVERRIDE; + int type() const FL_OVERRIDE; + void options(int o) FL_OVERRIDE; + int options() const FL_OVERRIDE; + int count() const FL_OVERRIDE; + const char *filename() const FL_OVERRIDE; + const char *filename(int i) const FL_OVERRIDE; + void directory(const char *val) FL_OVERRIDE; + const char *directory() const FL_OVERRIDE; + void title(const char *t) FL_OVERRIDE; + const char* title() const FL_OVERRIDE; + const char *filter() const FL_OVERRIDE; + void filter(const char *f) FL_OVERRIDE; + int filters() const FL_OVERRIDE; + void filter_value(int i) FL_OVERRIDE; + int filter_value() const FL_OVERRIDE; + void preset_file(const char*f) FL_OVERRIDE; + const char* preset_file() const FL_OVERRIDE; + const char *errmsg() const FL_OVERRIDE; + int show() FL_OVERRIDE; }; Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) { diff --git a/src/Fl_Native_File_Chooser_WIN32.cxx b/src/Fl_Native_File_Chooser_WIN32.cxx index 066923942..901c8fbf6 100644 --- a/src/Fl_Native_File_Chooser_WIN32.cxx +++ b/src/Fl_Native_File_Chooser_WIN32.cxx @@ -77,26 +77,26 @@ private: public: Fl_WinAPI_Native_File_Chooser_Driver(int val); ~Fl_WinAPI_Native_File_Chooser_Driver(); - virtual void type(int t); - virtual int type() const ; - virtual void options(int o); - virtual int options() const; - virtual int count() const; - virtual const char *filename() const ; - virtual const char *filename(int i) const ; - virtual void directory(const char *val) ; - virtual const char *directory() const; - virtual void title(const char *t); - virtual const char* title() const; - virtual const char *filter() const ; - virtual void filter(const char *f); - virtual int filters() const ; - virtual void filter_value(int i) ; - virtual int filter_value() const ; - virtual void preset_file(const char*f) ; - virtual const char* preset_file() const; - virtual const char *errmsg() const ; - virtual int show() ; + void type(int t) FL_OVERRIDE; + int type() const FL_OVERRIDE; + void options(int o) FL_OVERRIDE; + int options() const FL_OVERRIDE; + int count() const FL_OVERRIDE; + const char *filename() const FL_OVERRIDE; + const char *filename(int i) const FL_OVERRIDE; + void directory(const char *val) FL_OVERRIDE; + const char *directory() const FL_OVERRIDE; + void title(const char *t) FL_OVERRIDE; + const char* title() const FL_OVERRIDE; + const char *filter() const FL_OVERRIDE; + void filter(const char *f) FL_OVERRIDE; + int filters() const FL_OVERRIDE; + void filter_value(int i) FL_OVERRIDE; + int filter_value() const FL_OVERRIDE; + void preset_file(const char*f) FL_OVERRIDE; + const char* preset_file() const FL_OVERRIDE; + const char *errmsg() const FL_OVERRIDE; + int show() FL_OVERRIDE; }; diff --git a/src/Fl_Native_File_Chooser_Zenity.H b/src/Fl_Native_File_Chooser_Zenity.H index bdaa5ba20..269d2f9cd 100644 --- a/src/Fl_Native_File_Chooser_Zenity.H +++ b/src/Fl_Native_File_Chooser_Zenity.H @@ -24,7 +24,7 @@ class Fl_Zenity_Native_File_Chooser_Driver : public Fl_Kdialog_Native_File_Choos static bool did_find_zenity; static bool have_looked_for_zenity; Fl_Zenity_Native_File_Chooser_Driver(int val); - virtual char *build_command(); + char *build_command() FL_OVERRIDE; }; #endif // FL_ZENITY_NATIVE_FILE_CHOOSER_H diff --git a/src/Fl_Screen_Driver.H b/src/Fl_Screen_Driver.H index 7ccbc67e9..38070df5a 100644 --- a/src/Fl_Screen_Driver.H +++ b/src/Fl_Screen_Driver.H @@ -109,8 +109,8 @@ public: virtual void init() {} virtual int x() { return 0; } virtual int y() { return 0; } - virtual int w() { return 800; } // default, override in driver! - virtual int h() { return 600; } // default, override in driver! + virtual int w() { return 800; } // default, FL_OVERRIDE in driver! + virtual int h() { return 600; } // default, FL_OVERRIDE in driver! virtual int screen_count(); void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my); virtual void screen_xywh(int &X, int &Y, int &W, int &H, int /*n*/) { @@ -122,7 +122,7 @@ public: void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh); virtual int screen_num(int x, int y); virtual int screen_num(int x, int y, int w, int h); - virtual void screen_dpi(float &h, float &v, int n = 0) { // override in driver! + virtual void screen_dpi(float &h, float &v, int n = 0) { // FL_OVERRIDE in driver! h = 72; v = 72; (void)n; @@ -134,7 +134,7 @@ public: // --- audible output virtual void beep(int) {} // --- global events - virtual void flush() {} // must override + virtual void flush() {} // must FL_OVERRIDE virtual void grab(Fl_Window *) {} // --- global colors /* the default implementation of parse_color() may be enough */ diff --git a/src/Fl_System_Driver.H b/src/Fl_System_Driver.H index 89a555fdb..89110b201 100644 --- a/src/Fl_System_Driver.H +++ b/src/Fl_System_Driver.H @@ -220,8 +220,8 @@ public: virtual Fl_Sys_Menu_Bar_Driver *sys_menu_bar_driver() { return NULL; } virtual void lock_ring() {} virtual void unlock_ring() {} - virtual double wait(double); // must override - virtual int ready() { return 0; } // must override + virtual double wait(double); // must FL_OVERRIDE + virtual int ready() { return 0; } // must FL_OVERRIDE virtual int close_fd(int) {return -1;} // to close a file descriptor }; diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx index 35898dc05..f77b668e9 100644 --- a/src/Fl_Tooltip.cxx +++ b/src/Fl_Tooltip.cxx @@ -52,16 +52,16 @@ public: set_tooltip_window(); end(); } - void draw(); + void draw() FL_OVERRIDE; void layout(); /** Shows the tooltip windows only if a tooltip text is available. */ - void show() { + void show() FL_OVERRIDE { if (!tip) return; Fl_Menu_Window::show(); } - int handle(int e) { + int handle(int e) FL_OVERRIDE { if (e == FL_PUSH || e == FL_KEYDOWN) { hide(); Fl::remove_timeout(tooltip_hide_timeout); diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 2c2720033..2cc04913c 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -2412,7 +2412,7 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap) attr.colormap = colormap; attr.border_pixel = 0; attr.bit_gravity = 0; // StaticGravity; - if (win->override()) { + if (win->FL_OVERRIDE()) { attr.override_redirect = 1; attr.save_under = 1; mask |= CWOverrideRedirect | CWSaveUnder; @@ -2613,7 +2613,7 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap) void Fl_X11_Window_Driver::sendxjunk() { Fl_Window *w = pWindow; - if (w->parent() || w->override()) return; // it's not a window manager window! + if (w->parent() || w->FL_OVERRIDE()) return; // it's not a window manager window! XSizeHints *hints = XAllocSizeHints(); // memset(&hints, 0, sizeof(hints)); jreiser suggestion to fix purify? diff --git a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H index 3343345a1..0b5eee198 100644 --- a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H +++ b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H @@ -38,7 +38,7 @@ typedef struct _PangoFontDescription PangoFontDescription; class Fl_Cairo_Font_Descriptor : public Fl_Font_Descriptor { public: Fl_Cairo_Font_Descriptor(const char* fontname, Fl_Fontsize size, PangoContext *context); - virtual FL_EXPORT ~Fl_Cairo_Font_Descriptor(); + FL_EXPORT ~Fl_Cairo_Font_Descriptor() FL_OVERRIDE; PangoFontDescription *fontref; int **width; // array of arrays of character widths int line_height; @@ -57,7 +57,7 @@ protected: PangoLayout *pango_layout_; public: Fl_Cairo_Graphics_Driver(); - virtual ~Fl_Cairo_Graphics_Driver(); + ~Fl_Cairo_Graphics_Driver() FL_OVERRIDE; class Clip { public: @@ -93,110 +93,110 @@ public: void needs_commit_tag(bool *tag) { needs_commit_tag_ = tag; } // implementation of drawing methods - void color(Fl_Color c); - void color(uchar r, uchar g, uchar b); - Fl_Color color(); + void color(Fl_Color c) FL_OVERRIDE; + void color(uchar r, uchar g, uchar b) FL_OVERRIDE; + Fl_Color color() FL_OVERRIDE; - void push_clip(int x, int y, int w, int h); - void push_no_clip(); - void pop_clip(); + void push_clip(int x, int y, int w, int h) FL_OVERRIDE; + void push_no_clip() FL_OVERRIDE; + void pop_clip() FL_OVERRIDE; - void line_style(int style, int width=0, char* dashes=0); + void line_style(int style, int width=0, char* dashes=0) FL_OVERRIDE; - void rect(int x, int y, int w, int h); - void rectf(int x, int y, int w, int h); + void rect(int x, int y, int w, int h) FL_OVERRIDE; + void rectf(int x, int y, int w, int h) FL_OVERRIDE; - void xyline(int x, int y, int x1); - void xyline(int x, int y, int x1, int y2); - void xyline(int x, int y, int x1, int y2, int x3); + void xyline(int x, int y, int x1) FL_OVERRIDE; + void xyline(int x, int y, int x1, int y2) FL_OVERRIDE; + void xyline(int x, int y, int x1, int y2, int x3) FL_OVERRIDE; - void yxline(int x, int y, int y1); - void yxline(int x, int y, int y1, int x2); - void yxline(int x, int y, int y1, int x2, int y3); + void yxline(int x, int y, int y1) FL_OVERRIDE; + void yxline(int x, int y, int y1, int x2) FL_OVERRIDE; + void yxline(int x, int y, int y1, int x2, int y3) FL_OVERRIDE; - void line(int x1, int y1, int x2, int y2); - void line(int x1, int y1, int x2, int y2, int x3, int y3); + void line(int x1, int y1, int x2, int y2) FL_OVERRIDE; + void line(int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; - void loop(int x0, int y0, int x1, int y1, int x2, int y2); - void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void point(int x, int y); - void overlay_rect(int x, int y, int w , int h); - int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); - void restore_clip(); - int not_clipped(int x, int y, int w, int h); + void loop(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void point(int x, int y) FL_OVERRIDE; + void overlay_rect(int x, int y, int w , int h) FL_OVERRIDE; + int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) FL_OVERRIDE; + void restore_clip() FL_OVERRIDE; + int not_clipped(int x, int y, int w, int h) FL_OVERRIDE; - void begin_points(); - void begin_line(); - void begin_loop(); - void begin_polygon(); - void vertex(double x, double y); - void curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3); - void circle(double x, double y, double r); - void arc(double x, double y, double r, double start, double a); - void arc(int x, int y, int w, int h, double a1, double a2); - void pie(int x, int y, int w, int h, double a1, double a2); - void end_points(); - void end_line(); - void end_loop(); - void end_polygon(); - void begin_complex_polygon() { begin_polygon(); } - void gap() { gap_ = 1; } - void end_complex_polygon() { end_polygon(); } - void transformed_vertex(double x, double y); + void begin_points() FL_OVERRIDE; + void begin_line() FL_OVERRIDE; + void begin_loop() FL_OVERRIDE; + void begin_polygon() FL_OVERRIDE; + void vertex(double x, double y) FL_OVERRIDE; + void curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3) FL_OVERRIDE; + void circle(double x, double y, double r) FL_OVERRIDE; + void arc(double x, double y, double r, double start, double a) FL_OVERRIDE; + void arc(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void pie(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void end_points() FL_OVERRIDE; + void end_line() FL_OVERRIDE; + void end_loop() FL_OVERRIDE; + void end_polygon() FL_OVERRIDE; + void begin_complex_polygon() FL_OVERRIDE { begin_polygon(); } + void gap() FL_OVERRIDE { gap_ = 1; } + void end_complex_polygon() FL_OVERRIDE { end_polygon(); } + void transformed_vertex(double x, double y) FL_OVERRIDE; - void draw_image_mono(const uchar* d, int x,int y,int w,int h, int delta=1, int ld=0); - void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3); - void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1); + void draw_image_mono(const uchar* d, int x,int y,int w,int h, int delta=1, int ld=0) FL_OVERRIDE; + void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3) FL_OVERRIDE; + void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1) FL_OVERRIDE; void ps_origin(int x, int y); void ps_translate(int, int); void ps_untranslate(); void draw_cached_pattern_(Fl_Image *img, cairo_pattern_t *pat, int X, int Y, int W, int H, int cx, int cy); - void draw_image(const uchar *data, int ix, int iy, int iw, int ih, int D, int LD); - void draw_rgb(Fl_RGB_Image *rgb,int XP, int YP, int WP, int HP, int cx, int cy); - void cache(Fl_RGB_Image *rgb); - void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_); - void draw_bitmap(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, int cy); + void draw_image(const uchar *data, int ix, int iy, int iw, int ih, int D, int LD) FL_OVERRIDE; + void draw_rgb(Fl_RGB_Image *rgb,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void cache(Fl_RGB_Image *rgb) FL_OVERRIDE; + void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_) FL_OVERRIDE; + void draw_bitmap(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; static cairo_pattern_t *bitmap_to_pattern(Fl_Bitmap *bm, bool complement, cairo_surface_t **p_surface); - void cache(Fl_Bitmap *img); - virtual void delete_bitmask(fl_uintptr_t bm); - void cache(Fl_Pixmap *pxm); - void draw_pixmap(Fl_Pixmap *rgb,int XP, int YP, int WP, int HP, int cx, int cy); - void uncache_pixmap(fl_uintptr_t p); + void cache(Fl_Bitmap *img) FL_OVERRIDE; + void delete_bitmask(fl_uintptr_t bm) FL_OVERRIDE; + void cache(Fl_Pixmap *pxm) FL_OVERRIDE; + void draw_pixmap(Fl_Pixmap *rgb,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void uncache_pixmap(fl_uintptr_t p) FL_OVERRIDE; - void font(Fl_Font fnum, Fl_Fontsize s); - Fl_Font font() { return Fl_Graphics_Driver::font(); } - void draw(const char* s, int nBytes, int x, int y) { draw(s, nBytes, float(x), float(y)); } - void draw(const char* s, int nBytes, float x, float y); - void draw(int angle, const char *str, int n, int x, int y); - void rtl_draw(const char* str, int n, int x, int y); - int height(); - int descent(); - double width(const char *str, int n); - double width(unsigned c); - void text_extents(const char* txt, int n, int& dx, int& dy, int& w, int& h); - virtual PangoFontDescription* pango_font_description() { + void font(Fl_Font fnum, Fl_Fontsize s) FL_OVERRIDE; + Fl_Font font() FL_OVERRIDE { return Fl_Graphics_Driver::font(); } + void draw(const char* s, int nBytes, int x, int y) FL_OVERRIDE { draw(s, nBytes, float(x), float(y)); } + void draw(const char* s, int nBytes, float x, float y) FL_OVERRIDE; + void draw(int angle, const char *str, int n, int x, int y) FL_OVERRIDE; + void rtl_draw(const char* str, int n, int x, int y) FL_OVERRIDE; + int height() FL_OVERRIDE; + int descent() FL_OVERRIDE; + double width(const char *str, int n) FL_OVERRIDE; + double width(unsigned c) FL_OVERRIDE; + void text_extents(const char* txt, int n, int& dx, int& dy, int& w, int& h) FL_OVERRIDE; + PangoFontDescription* pango_font_description() FL_OVERRIDE { return ((Fl_Cairo_Font_Descriptor*)font_descriptor())->fontref; } static void init_built_in_fonts(); - virtual Fl_Font set_fonts(const char* pattern_name); - virtual const char *font_name(int num); - virtual void font_name(int num, const char *name); - virtual const char* get_font_name(Fl_Font fnum, int* ap); - virtual int get_font_sizes(Fl_Font fnum, int*& sizep); - virtual Fl_Region XRectangleRegion(int x, int y, int w, int h); - virtual void XDestroyRegion(Fl_Region r); - virtual void add_rectangle_to_region(Fl_Region r, int X, int Y, int W, int H); - virtual void cache_size(Fl_Image *img, int &width, int &height); - virtual char can_do_alpha_blending(); - virtual float override_scale(); - virtual void restore_scale(float); - virtual void antialias(int state); - virtual int antialias(); + Fl_Font set_fonts(const char* pattern_name) FL_OVERRIDE; + const char *font_name(int num) FL_OVERRIDE; + void font_name(int num, const char *name) FL_OVERRIDE; + const char* get_font_name(Fl_Font fnum, int* ap) FL_OVERRIDE; + int get_font_sizes(Fl_Font fnum, int*& sizep) FL_OVERRIDE; + Fl_Region XRectangleRegion(int x, int y, int w, int h) FL_OVERRIDE; + void XDestroyRegion(Fl_Region r) FL_OVERRIDE; + void add_rectangle_to_region(Fl_Region r, int X, int Y, int W, int H) FL_OVERRIDE; + void cache_size(Fl_Image *img, int &width, int &height) FL_OVERRIDE; + char can_do_alpha_blending() FL_OVERRIDE; + float override_scale() FL_OVERRIDE; + void restore_scale(float) FL_OVERRIDE; + void antialias(int state) FL_OVERRIDE; + int antialias() FL_OVERRIDE; }; #endif // FL_CAIRO_GRAPHICS_DRIVER_H diff --git a/src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H b/src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H index 76986af9a..7c514b1cf 100644 --- a/src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H +++ b/src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H @@ -27,11 +27,11 @@ class Fl_Display_Cairo_Graphics_Driver : public Fl_Cairo_Graphics_Driver { private: static void *gc_; public: - virtual void scale(float f); - virtual float scale() {return Fl_Graphics_Driver::scale();} - virtual void gc(void *value); - virtual void* gc(); - virtual void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); + void scale(float f) FL_OVERRIDE; + float scale() {return Fl_Graphics_Driver::scale();} + void gc(void *value) FL_OVERRIDE; + void* gc() FL_OVERRIDE; + void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) FL_OVERRIDE; }; #endif // FL_DISPLAY_CAIRO_GRAPHICS_DRIVER_H diff --git a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.H index a54b185e6..79b93e6df 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.H @@ -30,28 +30,28 @@ class Fl_Cocoa_Gl_Window_Driver : public Fl_Gl_Window_Driver { NSOpenGLContext *gl1ctxt; // GL1 context in addition to GL3 context friend Fl_Gl_Window_Driver* Fl_Gl_Window_Driver::newGlWindowDriver(Fl_Gl_Window *); Fl_Cocoa_Gl_Window_Driver(Fl_Gl_Window *win); - virtual float pixels_per_unit(); - virtual void before_show(int& need_after); - virtual void after_show(); - virtual int mode_(int m, const int *a); - virtual void make_current_before(); - virtual void swap_buffers(); - virtual void resize(int is_a_resize, int w, int h); - virtual char swap_type(); - virtual Fl_Gl_Choice *find(int m, const int *alistp); - virtual GLContext create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g); - virtual void set_gl_context(Fl_Window* w, GLContext context); - virtual void delete_gl_context(GLContext); - virtual void make_overlay_current(); - virtual void redraw_overlay(); - virtual void gl_start(); - virtual char *alpha_mask_for_string(const char *str, int n, int w, int h, Fl_Fontsize fs); - virtual Fl_RGB_Image* capture_gl_rectangle(int x, int y, int w, int h); - virtual bool need_scissor() { return true; } - virtual void* GetProcAddress(const char *procName); + float pixels_per_unit() FL_OVERRIDE; + void before_show(int& need_after) FL_OVERRIDE; + void after_show() FL_OVERRIDE; + int mode_(int m, const int *a) FL_OVERRIDE; + void make_current_before() FL_OVERRIDE; + void swap_buffers() FL_OVERRIDE; + void resize(int is_a_resize, int w, int h) FL_OVERRIDE; + char swap_type() FL_OVERRIDE; + Fl_Gl_Choice *find(int m, const int *alistp) FL_OVERRIDE; + GLContext create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g) FL_OVERRIDE; + void set_gl_context(Fl_Window* w, GLContext context) FL_OVERRIDE; + void delete_gl_context(GLContext) FL_OVERRIDE; + void make_overlay_current() FL_OVERRIDE; + void redraw_overlay() FL_OVERRIDE; + void gl_start() FL_OVERRIDE; + char *alpha_mask_for_string(const char *str, int n, int w, int h, Fl_Fontsize fs) FL_OVERRIDE; + Fl_RGB_Image* capture_gl_rectangle(int x, int y, int w, int h) FL_OVERRIDE; + bool need_scissor() FL_OVERRIDE { return true; } + void* GetProcAddress(const char *procName) FL_OVERRIDE; void apply_scissor(); - virtual void switch_to_GL1(); - virtual void switch_back(); + void switch_to_GL1() FL_OVERRIDE; + void switch_back() FL_OVERRIDE; }; diff --git a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm index f54871df8..9f1227f0e 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm +++ b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm @@ -491,8 +491,8 @@ void Fl_Cocoa_Gl_Window_Driver::switch_back() { class Fl_Gl_Cocoa_Plugin : public Fl_Cocoa_Plugin { public: Fl_Gl_Cocoa_Plugin() : Fl_Cocoa_Plugin(name()) { } - virtual const char *name() { return "gl.cocoa.fltk.org"; } - virtual void resize(Fl_Gl_Window *glw, int x, int y, int w, int h) { + const char *name() FL_OVERRIDE { return "gl.cocoa.fltk.org"; } + void resize(Fl_Gl_Window *glw, int x, int y, int w, int h) FL_OVERRIDE { glw->Fl_Gl_Window::resize(x, y, w, h); } }; diff --git a/src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm b/src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm index c587caf37..c144ab243 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm +++ b/src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm @@ -56,18 +56,18 @@ private: PMPageFormat pageFormat; PMPrintSettings printSettings; Fl_Cocoa_Printer_Driver(void); - int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL); - int begin_page (void); - int printable_rect(int *w, int *h); - void margins(int *left, int *top, int *right, int *bottom); - void origin(int *x, int *y); - void origin(int x, int y); - void scale (float scale_x, float scale_y = 0.); - void rotate(float angle); - void translate(int x, int y); - void untranslate(void); - int end_page (void); - void end_job (void); + int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL) FL_OVERRIDE; + int begin_page (void) FL_OVERRIDE; + int printable_rect(int *w, int *h) FL_OVERRIDE; + void margins(int *left, int *top, int *right, int *bottom) FL_OVERRIDE; + void origin(int *x, int *y) FL_OVERRIDE; + void origin(int x, int y) FL_OVERRIDE; + void scale (float scale_x, float scale_y = 0.) FL_OVERRIDE; + void rotate(float angle) FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate(void) FL_OVERRIDE; + int end_page (void) FL_OVERRIDE; + void end_job (void) FL_OVERRIDE; ~Fl_Cocoa_Printer_Driver(void); }; diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H index fbd76b68e..9e3d2386a 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H @@ -63,49 +63,49 @@ public: static void breakMacEventLoop(); // --- display management // --- screen configuration - virtual void init(); - virtual int x(); - virtual int y(); - virtual int w(); - virtual int h(); - virtual void screen_xywh(int &X, int &Y, int &W, int &H, int n); - virtual void screen_dpi(float &h, float &v, int n=0); + void init() FL_OVERRIDE; + int x() FL_OVERRIDE; + int y() FL_OVERRIDE; + int w() FL_OVERRIDE; + int h() FL_OVERRIDE; + void screen_xywh(int &X, int &Y, int &W, int &H, int n) FL_OVERRIDE; + void screen_dpi(float &h, float &v, int n=0) FL_OVERRIDE; // implemented in Fl_cocoa.mm because uses Objective-c - virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n); + void screen_work_area(int &X, int &Y, int &W, int &H, int n) FL_OVERRIDE; // --- audible output - virtual void beep(int type); + void beep(int type) FL_OVERRIDE; // --- global events - virtual void grab(Fl_Window* win); + void grab(Fl_Window* win) FL_OVERRIDE; // --- global colors - virtual void get_system_colors(); - virtual int has_marked_text() const; + void get_system_colors() FL_OVERRIDE; + int has_marked_text() const FL_OVERRIDE; static void reset_marked_text(); static void insertion_point_location(int x, int y, int height); static int insertion_point_location(int *px, int *py, int *pheight); - virtual int dnd(int use_selection); - virtual int compose(int &del); - virtual int input_widget_handle_key(int key, unsigned mods, unsigned shift, Fl_Input *input); - virtual int get_mouse(int &x, int &y); - virtual void enable_im(); - virtual void disable_im(); - virtual void open_display_platform(); + int dnd(int use_selection) FL_OVERRIDE; + int compose(int &del) FL_OVERRIDE; + int input_widget_handle_key(int key, unsigned mods, unsigned shift, Fl_Input *input) FL_OVERRIDE; + int get_mouse(int &x, int &y) FL_OVERRIDE; + void enable_im() FL_OVERRIDE; + void disable_im() FL_OVERRIDE; + void open_display_platform() FL_OVERRIDE; // --- compute dimensions of an Fl_Offscreen - virtual void offscreen_size(Fl_Offscreen o, int &width, int &height); + void offscreen_size(Fl_Offscreen o, int &width, int &height) FL_OVERRIDE; - virtual APP_SCALING_CAPABILITY rescalable() { return SYSTEMWIDE_APP_SCALING; } - virtual float scale(int /*nscreen*/) {return scale_;} - virtual void scale(int /*nscreen*/, float f) { scale_ = f;} - virtual Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win, bool may_capture_subwins, bool *did_capture_subwins); - virtual void default_icons(const Fl_RGB_Image *icons[], int count); - virtual void copy(const char *stuff, int len, int clipboard, const char *type); - virtual void paste(Fl_Widget &receiver, int clipboard, const char *type); - virtual int clipboard_contains(const char *type); - virtual void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win); - virtual void reset_spot(); - virtual int need_menu_handle_part2() {return 1;} + APP_SCALING_CAPABILITY rescalable() FL_OVERRIDE { return SYSTEMWIDE_APP_SCALING; } + float scale(int /*nscreen*/) FL_OVERRIDE {return scale_;} + void scale(int /*nscreen*/, float f) FL_OVERRIDE { scale_ = f;} + Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win, bool may_capture_subwins, bool *did_capture_subwins) FL_OVERRIDE; + void default_icons(const Fl_RGB_Image *icons[], int count) FL_OVERRIDE; + void copy(const char *stuff, int len, int clipboard, const char *type) FL_OVERRIDE; + void paste(Fl_Widget &receiver, int clipboard, const char *type) FL_OVERRIDE; + int clipboard_contains(const char *type) FL_OVERRIDE; + void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win) FL_OVERRIDE; + void reset_spot() FL_OVERRIDE; + int need_menu_handle_part2() FL_OVERRIDE {return 1;} // these 2 are in Fl_get_key_mac.cxx - virtual int event_key(int); - virtual int get_key(int); + int event_key(int) FL_OVERRIDE; + int get_key(int) FL_OVERRIDE; private: float scale_; }; diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H index 520c4c239..4c86696e0 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H @@ -82,7 +82,7 @@ private: CGImageRef mask; } *shape_data_; void shape_bitmap_(Fl_Image* b); - void shape_alpha_(Fl_Image* img, int offset); + void shape_alpha_(Fl_Image* img, int offset) FL_OVERRIDE; CGRect* subRect_; // makes sure subwindow remains inside its parent window // stores 3 binary flags: whether window is mapped to retina display; whether resolution just changed; // whether window's view received the [FLView view_did_resize] message @@ -110,47 +110,47 @@ public: CGImageRef CGImage_from_window_rect(int x, int y, int w, int h, bool capture_subwins = true); // --- window data - virtual int decorated_w(); - virtual int decorated_h(); - virtual const Fl_Image* shape(); + int decorated_w() FL_OVERRIDE; + int decorated_h() FL_OVERRIDE; + const Fl_Image* shape() FL_OVERRIDE; // --- window management - virtual Fl_X *makeWindow(); - virtual void take_focus(); - virtual void flush(); - virtual void flush_overlay(); - virtual void draw_begin(); - virtual void draw_end(); - virtual void make_current(); - virtual void label(const char *name, const char *mininame); - virtual void destroy_double_buffer(); - virtual void show(); - virtual void resize(int X,int Y,int W,int H); - virtual void hide(); - virtual void map(); - virtual void unmap(); - virtual void fullscreen_on(); - virtual void fullscreen_off(int X, int Y, int W, int H); - virtual void use_border(); - virtual void size_range(); - virtual void iconize(); - virtual void decoration_sizes(int *top, int *left, int *right, int *bottom); + Fl_X *makeWindow() FL_OVERRIDE; + void take_focus() FL_OVERRIDE; + void flush() FL_OVERRIDE; + void flush_overlay() FL_OVERRIDE; + void draw_begin() FL_OVERRIDE; + void draw_end() FL_OVERRIDE; + void make_current() FL_OVERRIDE; + void label(const char *name, const char *mininame) FL_OVERRIDE; + void destroy_double_buffer() FL_OVERRIDE; + void show() FL_OVERRIDE; + void resize(int X,int Y,int W,int H) FL_OVERRIDE; + void hide() FL_OVERRIDE; + void map() FL_OVERRIDE; + void unmap() FL_OVERRIDE; + void fullscreen_on() FL_OVERRIDE; + void fullscreen_off(int X, int Y, int W, int H) FL_OVERRIDE; + void use_border() FL_OVERRIDE; + void size_range() FL_OVERRIDE; + void iconize() FL_OVERRIDE; + void decoration_sizes(int *top, int *left, int *right, int *bottom) FL_OVERRIDE; // --- window cursor stuff - virtual int set_cursor(Fl_Cursor); - virtual int set_cursor(const Fl_RGB_Image*, int, int); + int set_cursor(Fl_Cursor) FL_OVERRIDE; + int set_cursor(const Fl_RGB_Image*, int, int) FL_OVERRIDE; - virtual void shape(const Fl_Image* img); + void shape(const Fl_Image* img) FL_OVERRIDE; // next 4 are in Fl_cocoa.mm because they use Objective-c - virtual void capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right); - virtual void wait_for_expose(); + void capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right) FL_OVERRIDE; + void wait_for_expose() FL_OVERRIDE; void draw_titlebar_to_context(CGContextRef gc, int w, int h); - virtual int scroll(int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, void (*draw_area)(void*, int,int,int,int), void* data); + int scroll(int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, void (*draw_area)(void*, int,int,int,int), void* data) FL_OVERRIDE; //icons - virtual void icons(const Fl_RGB_Image *icons[], int count); + void icons(const Fl_RGB_Image *icons[], int count) FL_OVERRIDE; NSImage *icon_image; - virtual fl_uintptr_t os_id(); + fl_uintptr_t os_id() FL_OVERRIDE; }; class Fl_Cocoa_Plugin : public Fl_Plugin { diff --git a/src/drivers/Cocoa/Fl_MacOS_Sys_Menu_Bar_Driver.H b/src/drivers/Cocoa/Fl_MacOS_Sys_Menu_Bar_Driver.H index 27f34e226..94d890f3d 100644 --- a/src/drivers/Cocoa/Fl_MacOS_Sys_Menu_Bar_Driver.H +++ b/src/drivers/Cocoa/Fl_MacOS_Sys_Menu_Bar_Driver.H @@ -23,21 +23,21 @@ class Fl_MacOS_Sys_Menu_Bar_Driver : public Fl_Sys_Menu_Bar_Driver { public: Fl_MacOS_Sys_Menu_Bar_Driver(); virtual ~Fl_MacOS_Sys_Menu_Bar_Driver(); - virtual void update(); - virtual void draw(); - virtual void about(Fl_Callback *cb, void *data); - virtual int add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags); - virtual int add(const char* str); - virtual int insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags); - virtual void menu(const Fl_Menu_Item *m); - virtual void shortcut (int i, int s); - virtual void setonly (Fl_Menu_Item *item); - virtual void clear(); - virtual int clear_submenu(int index); - virtual void remove(int index); - virtual void replace(int index, const char *name); - virtual void mode(int i, int fl); - virtual void create_window_menu(); + void update() FL_OVERRIDE; + void draw() FL_OVERRIDE; + void about(Fl_Callback *cb, void *data) FL_OVERRIDE; + int add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags) FL_OVERRIDE; + int add(const char* str) FL_OVERRIDE; + int insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags) FL_OVERRIDE; + void menu(const Fl_Menu_Item *m) FL_OVERRIDE; + void shortcut (int i, int s) FL_OVERRIDE; + void setonly (Fl_Menu_Item *item) FL_OVERRIDE; + void clear() FL_OVERRIDE; + int clear_submenu(int index) FL_OVERRIDE; + void remove(int index) FL_OVERRIDE; + void replace(int index, const char *name) FL_OVERRIDE; + void mode(int i, int fl) FL_OVERRIDE; + void create_window_menu() FL_OVERRIDE; int find_first_window(); void new_window(Fl_Window *win); void remove_window(Fl_Window *win); diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.H b/src/drivers/Darwin/Fl_Darwin_System_Driver.H index 4113424ca..776f68738 100644 --- a/src/drivers/Darwin/Fl_Darwin_System_Driver.H +++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.H @@ -42,46 +42,46 @@ class Fl_Darwin_System_Driver : public Fl_Posix_System_Driver { public: Fl_Darwin_System_Driver(); - virtual int single_arg(const char *arg); - virtual int arg_and_value(const char *name, const char *value); - virtual int clocale_vprintf(FILE *output, const char *format, va_list args); - virtual int clocale_vsnprintf(char *output, size_t output_size, const char *format, va_list args); - virtual int clocale_vsscanf(const char *input, const char *format, va_list args); + int single_arg(const char *arg) FL_OVERRIDE; + int arg_and_value(const char *name, const char *value) FL_OVERRIDE; + int clocale_vprintf(FILE *output, const char *format, va_list args) FL_OVERRIDE; + int clocale_vsnprintf(char *output, size_t output_size, const char *format, va_list args) FL_OVERRIDE; + int clocale_vsscanf(const char *input, const char *format, va_list args) FL_OVERRIDE; static void *get_carbon_function(const char *name); static int calc_mac_os_version(); // computes the fl_mac_os_version global variable static unsigned short *compute_macKeyLookUp(); - virtual int filename_list(const char *d, dirent ***list, + int filename_list(const char *d, dirent ***list, int (*sort)(struct dirent **, struct dirent **), - char *errmsg=NULL, int errmsg_sz=0); - virtual int open_uri(const char *uri, char *msg, int msglen); - virtual int need_test_shortcut_extra() {return 1;} - virtual int file_browser_load_filesystem(Fl_File_Browser *browser, char *filename, int lname, Fl_File_Icon *icon); - virtual void newUUID(char *uuidBuffer); - virtual char *preference_rootnode(Fl_Preferences *prefs, Fl_Preferences::Root root, const char *vendor, - const char *application); - virtual const char *local_to_latin1(const char *t, int n); - virtual const char *latin1_to_local(const char *t, int n); - virtual const char *local_to_mac_roman(const char *t, int n); - virtual const char *mac_roman_to_local(const char *t, int n); - virtual Fl_Pixmap *tree_openpixmap(); + char *errmsg=NULL, int errmsg_sz=0) FL_OVERRIDE; + int open_uri(const char *uri, char *msg, int msglen) FL_OVERRIDE; + int need_test_shortcut_extra() FL_OVERRIDE {return 1;} + int file_browser_load_filesystem(Fl_File_Browser *browser, char *filename, int lname, Fl_File_Icon *icon) FL_OVERRIDE; + void newUUID(char *uuidBuffer) FL_OVERRIDE; + char *preference_rootnode(Fl_Preferences *prefs, Fl_Preferences::Root root, const char *vendor, + const char *application) FL_OVERRIDE; + const char *local_to_latin1(const char *t, int n) FL_OVERRIDE; + const char *latin1_to_local(const char *t, int n) FL_OVERRIDE; + const char *local_to_mac_roman(const char *t, int n) FL_OVERRIDE; + const char *mac_roman_to_local(const char *t, int n) FL_OVERRIDE; + Fl_Pixmap *tree_openpixmap() FL_OVERRIDE; static const char * const tree_open_xpm_darwin[]; // used by tree_openpixmap() - virtual Fl_Pixmap *tree_closepixmap(); + Fl_Pixmap *tree_closepixmap() FL_OVERRIDE; static const char * const tree_close_xpm_darwin[]; // used by tree_closepixmap() - virtual int tree_connector_style(); - virtual const char *filename_name(const char *buf); - virtual void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0); - virtual void add_fd(int fd, Fl_FD_Handler cb, void* = 0); - virtual void remove_fd(int, int when); - virtual void remove_fd(int); - virtual void open_callback(void (*)(const char *)); - virtual const char *shift_name(); - virtual const char *meta_name(); - virtual const char *alt_name(); - virtual const char *control_name(); - virtual Fl_Sys_Menu_Bar_Driver *sys_menu_bar_driver(); - virtual double wait(double time_to_wait); - virtual int ready(); + int tree_connector_style() FL_OVERRIDE; + const char *filename_name(const char *buf) FL_OVERRIDE; + void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0) FL_OVERRIDE; + void add_fd(int fd, Fl_FD_Handler cb, void* = 0) FL_OVERRIDE; + void remove_fd(int, int when) FL_OVERRIDE; + void remove_fd(int) FL_OVERRIDE; + void open_callback(void (*)(const char *)) FL_OVERRIDE; + const char *shift_name() FL_OVERRIDE; + const char *meta_name() FL_OVERRIDE; + const char *alt_name() FL_OVERRIDE; + const char *control_name() FL_OVERRIDE; + Fl_Sys_Menu_Bar_Driver *sys_menu_bar_driver() FL_OVERRIDE; + double wait(double time_to_wait) FL_OVERRIDE; + int ready() FL_OVERRIDE; }; #endif // FL_DARWIN_SYSTEM_DRIVER_H diff --git a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.H b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.H index 6d8923c99..7eae4c2bc 100644 --- a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.H +++ b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.H @@ -27,9 +27,9 @@ protected: HDC gc; Fl_GDI_Copy_Surface_Driver(int w, int h); ~Fl_GDI_Copy_Surface_Driver(); - void set_current(); - void translate(int x, int y); - void untranslate(); + void set_current() FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; }; #endif // FL_GDI_COPY_SURFACE_DRIVER_H diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H index 39af1e68e..6fa6840c8 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H @@ -47,112 +47,112 @@ private: BOOL alpha_blend_(int x, int y, int w, int h, HDC src_gc, int srcx, int srcy, int srcw, int srch); int depth; // to support translation POINT *origins; // to support translation - void set_current_(); - void draw_fixed(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw_fixed(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - virtual void make_unused_color_(unsigned char &r, unsigned char &g, unsigned char &b, int color_count, void **data); + void set_current_() FL_OVERRIDE; + void draw_fixed(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_fixed(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void make_unused_color_(unsigned char &r, unsigned char &g, unsigned char &b, int color_count, void **data) FL_OVERRIDE; protected: - void draw_fixed(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy); - void cache(Fl_RGB_Image *rgb); + void draw_fixed(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void cache(Fl_RGB_Image *rgb) FL_OVERRIDE; HDC gc_; int numcount; int counts[20]; uchar *mask_bitmap_; - uchar **mask_bitmap() {return &mask_bitmap_;} + uchar **mask_bitmap() FL_OVERRIDE {return &mask_bitmap_;} POINT *long_point; public: Fl_GDI_Graphics_Driver(); - virtual ~Fl_GDI_Graphics_Driver(); - virtual int has_feature(driver_feature mask) { return mask & NATIVE; } - char can_do_alpha_blending(); - virtual void gc(void *ctxt) { gc_ = (HDC)ctxt; global_gc(); } - virtual void *gc() {return gc_;} + ~Fl_GDI_Graphics_Driver() FL_OVERRIDE; + int has_feature(driver_feature mask) FL_OVERRIDE { return mask & NATIVE; } + char can_do_alpha_blending() FL_OVERRIDE; + void gc(void *ctxt) FL_OVERRIDE { gc_ = (HDC)ctxt; global_gc(); } + void *gc() FL_OVERRIDE {return gc_;} // --- bitmap stuff static HBITMAP create_bitmask(int w, int h, const uchar *array); // NOT virtual - virtual void delete_bitmask(fl_uintptr_t bm); + void delete_bitmask(fl_uintptr_t bm) FL_OVERRIDE; HBITMAP create_alphamask(int w, int h, int d, int ld, const uchar *array); - virtual void draw_unscaled(const char* str, int n, int x, int y); - virtual void draw_unscaled(int angle, const char *str, int n, int x, int y); - virtual void rtl_draw_unscaled(const char* str, int n, int x, int y); - virtual void font_unscaled(Fl_Font face, Fl_Fontsize size); - virtual void draw_rgb(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy); - virtual void draw_image_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); - virtual void draw_image_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); - virtual void draw_image_mono_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0); - virtual void draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); - void cache(Fl_Pixmap *img); - virtual void uncache_pixmap(fl_uintptr_t p); - void cache(Fl_Bitmap *img); - void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_); - virtual double width_unscaled(const char *str, int n); - virtual double width_unscaled(unsigned int c); - void text_extents_unscaled(const char*, int n, int& dx, int& dy, int& w, int& h); - int height_unscaled(); - int descent_unscaled(); - Fl_Fontsize size_unscaled(); + void draw_unscaled(const char* str, int n, int x, int y) FL_OVERRIDE; + void draw_unscaled(int angle, const char *str, int n, int x, int y) FL_OVERRIDE; + void rtl_draw_unscaled(const char* str, int n, int x, int y) FL_OVERRIDE; + void font_unscaled(Fl_Font face, Fl_Fontsize size) FL_OVERRIDE; + void draw_rgb(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_image_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0) FL_OVERRIDE; + void draw_image_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3) FL_OVERRIDE; + void draw_image_mono_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0) FL_OVERRIDE; + void draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1) FL_OVERRIDE; + void cache(Fl_Pixmap *img) FL_OVERRIDE; + void uncache_pixmap(fl_uintptr_t p) FL_OVERRIDE; + void cache(Fl_Bitmap *img) FL_OVERRIDE; + void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_) FL_OVERRIDE; + double width_unscaled(const char *str, int n) FL_OVERRIDE; + double width_unscaled(unsigned int c) FL_OVERRIDE; + void text_extents_unscaled(const char*, int n, int& dx, int& dy, int& w, int& h) FL_OVERRIDE; + int height_unscaled() FL_OVERRIDE; + int descent_unscaled() FL_OVERRIDE; + Fl_Fontsize size_unscaled() FL_OVERRIDE; #if ! defined(FL_DOXYGEN) void copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy); #endif - virtual void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); - void add_rectangle_to_region(Fl_Region r, int x, int y, int w, int h); - Fl_Region XRectangleRegion(int x, int y, int w, int h); - void XDestroyRegion(Fl_Region r); + void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) FL_OVERRIDE; + void add_rectangle_to_region(Fl_Region r, int x, int y, int w, int h) FL_OVERRIDE; + Fl_Region XRectangleRegion(int x, int y, int w, int h) FL_OVERRIDE; + void XDestroyRegion(Fl_Region r) FL_OVERRIDE; void translate_all(int x, int y); void untranslate_all(void); static HRGN scale_region(HRGN r, float f, Fl_GDI_Graphics_Driver *dr); - virtual void scale(float f); + void scale(float f) FL_OVERRIDE; float scale() {return Fl_Graphics_Driver::scale();} protected: - void transformed_vertex0(float x, float y); - void fixloop(); - virtual void point(int x, int y); - void focus_rect(int x, int y, int w, int h); - virtual void rectf_unscaled(int x, int y, int w, int h); + void transformed_vertex0(float x, float y) FL_OVERRIDE; + void fixloop() FL_OVERRIDE; + void point(int x, int y) FL_OVERRIDE; + void focus_rect(int x, int y, int w, int h) FL_OVERRIDE; + void rectf_unscaled(int x, int y, int w, int h) FL_OVERRIDE; #if USE_COLORMAP - virtual void colored_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b); + void colored_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) FL_OVERRIDE; #endif - virtual void line_unscaled(int x, int y, int x1, int y1); - virtual void line_unscaled(int x, int y, int x1, int y1, int x2, int y2); - virtual void xyline_unscaled(int x, int y, int x1); - virtual void yxline_unscaled(int x, int y, int y1); - virtual void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2); - virtual void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - virtual void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2); - virtual void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); + void line_unscaled(int x, int y, int x1, int y1) FL_OVERRIDE; + void line_unscaled(int x, int y, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void xyline_unscaled(int x, int y, int x1) FL_OVERRIDE; + void yxline_unscaled(int x, int y, int y1) FL_OVERRIDE; + void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; // --- clipping - void push_clip(int x, int y, int w, int h); - int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); - int not_clipped(int x, int y, int w, int h); - void restore_clip(); - virtual Fl_Region scale_clip(float f); + void push_clip(int x, int y, int w, int h) FL_OVERRIDE; + int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) FL_OVERRIDE; + int not_clipped(int x, int y, int w, int h) FL_OVERRIDE; + void restore_clip() FL_OVERRIDE; + Fl_Region scale_clip(float f) FL_OVERRIDE; // --- implementation is in src/fl_vertex.cxx which includes src/cfg_gfx/xxx_rect.cxx - void begin_complex_polygon(); - void end_points(); - void end_line(); - void end_loop(); - void end_polygon(); - void end_complex_polygon(); - void gap(); - virtual void ellipse_unscaled(double xt, double yt, double rx, double ry); - virtual void arc_unscaled(int x, int y, int w, int h, double a1, double a2); - virtual void pie_unscaled(int x, int y, int w, int h, double a1, double a2); - virtual void line_style_unscaled(int style, int width, char* dashes); - void color(Fl_Color c); - Fl_Color color() { return color_; } - void color(uchar r, uchar g, uchar b); - void set_color(Fl_Color i, unsigned int c); - void free_color(Fl_Color i, int overlay); - virtual Fl_Font set_fonts(const char *name); - virtual int get_font_sizes(Fl_Font fnum, int*& sizep); - virtual const char* get_font_name(Fl_Font fnum, int* ap); - virtual const char *font_name(int num); - virtual void font_name(int num, const char *name); - void global_gc(); - virtual void overlay_rect(int x, int y, int w , int h); - virtual void cache_size(Fl_Image *img, int &width, int &height); - virtual void* change_pen_width(int width); - virtual void reset_pen_width(void *data); + void begin_complex_polygon() FL_OVERRIDE; + void end_points() FL_OVERRIDE; + void end_line() FL_OVERRIDE; + void end_loop() FL_OVERRIDE; + void end_polygon() FL_OVERRIDE; + void end_complex_polygon() FL_OVERRIDE; + void gap() FL_OVERRIDE; + void ellipse_unscaled(double xt, double yt, double rx, double ry) FL_OVERRIDE; + void arc_unscaled(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void pie_unscaled(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void line_style_unscaled(int style, int width, char* dashes) FL_OVERRIDE; + void color(Fl_Color c) FL_OVERRIDE; + Fl_Color color() FL_OVERRIDE { return color_; } + void color(uchar r, uchar g, uchar b) FL_OVERRIDE; + void set_color(Fl_Color i, unsigned int c) FL_OVERRIDE; + void free_color(Fl_Color i, int overlay) FL_OVERRIDE; + Fl_Font set_fonts(const char *name) FL_OVERRIDE; + int get_font_sizes(Fl_Font fnum, int*& sizep) FL_OVERRIDE; + const char* get_font_name(Fl_Font fnum, int* ap) FL_OVERRIDE; + const char *font_name(int num) FL_OVERRIDE; + void font_name(int num, const char *name) FL_OVERRIDE; + void global_gc() FL_OVERRIDE; + void overlay_rect(int x, int y, int w , int h) FL_OVERRIDE; + void cache_size(Fl_Image *img, int &width, int &height) FL_OVERRIDE; + void* change_pen_width(int width) FL_OVERRIDE; + void reset_pen_width(void *data) FL_OVERRIDE; }; @@ -167,11 +167,11 @@ private: typedef BOOL (WINAPI* transparent_f_type) (HDC,int,int,int,int,HDC,int,int,int,int,UINT); transparent_f_type TransparentBlt(); public: - virtual int has_feature(driver_feature mask) { return mask & (NATIVE | PRINTER); } - void draw_pixmap(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw_bitmap(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy); - void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen bitmap, int srcx, int srcy); + int has_feature(driver_feature mask) FL_OVERRIDE { return mask & (NATIVE | PRINTER); } + void draw_pixmap(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_bitmap(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen bitmap, int srcx, int srcy) FL_OVERRIDE; }; #if USE_GDIPLUS @@ -188,28 +188,28 @@ public: virtual ~Fl_GDIplus_Graphics_Driver(); bool active; static void shutdown(void); -virtual void color(Fl_Color c); -virtual Fl_Color color() { return color_; } -virtual void color(uchar r, uchar g, uchar b); - virtual void line(int x, int y, int x1, int y1); - virtual void line(int x, int y, int x1, int y1, int x2, int y2); - void loop(int x0, int y0, int x1, int y1, int x2, int y2); - void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - virtual void line_style(int style, int width, char* dashes); - virtual void arc_unscaled(int x, int y, int w, int h, double a1, double a2); - virtual void pie_unscaled(int x, int y, int w, int h, double a1, double a2); - virtual void transformed_vertex(double xf, double yf); - virtual void vertex(double x,double y); - virtual void end_points(); - virtual void end_line(); - virtual void end_loop(); - virtual void end_polygon(); - virtual void end_complex_polygon(); - virtual void circle(double x, double y, double r); - virtual void antialias(int state); - virtual int antialias(); + void color(Fl_Color c) FL_OVERRIDE; + Fl_Color color() FL_OVERRIDE { return color_; } + void color(uchar r, uchar g, uchar b) FL_OVERRIDE; + void line(int x, int y, int x1, int y1) FL_OVERRIDE; + void line(int x, int y, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void loop(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void line_style(int style, int width, char* dashes) FL_OVERRIDE; + void arc_unscaled(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void pie_unscaled(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void transformed_vertex(double xf, double yf) FL_OVERRIDE; + void vertex(double x,double y) FL_OVERRIDE; + void end_points() FL_OVERRIDE; + void end_line() FL_OVERRIDE; + void end_loop() FL_OVERRIDE; + void end_polygon() FL_OVERRIDE; + void end_complex_polygon() FL_OVERRIDE; + void circle(double x, double y, double r) FL_OVERRIDE; + void antialias(int state) FL_OVERRIDE; + int antialias() FL_OVERRIDE; }; #endif // USE_GDIPLUS diff --git a/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.H b/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.H index a3d8ac6c6..d44d57cd6 100644 --- a/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.H +++ b/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.H @@ -22,16 +22,16 @@ #include class Fl_GDI_Image_Surface_Driver : public Fl_Image_Surface_Driver { - virtual void end_current(); + void end_current() FL_OVERRIDE; public: HWND pre_window; int _savedc; Fl_GDI_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off); ~Fl_GDI_Image_Surface_Driver(); - void set_current(); - void translate(int x, int y); - void untranslate(); - Fl_RGB_Image *image(); + void set_current() FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; + Fl_RGB_Image *image() FL_OVERRIDE; POINT origin; }; diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.H b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.H index a2dcf099b..bd3173aad 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.H +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.H @@ -39,64 +39,64 @@ public: line_width_(1.0f), line_stipple_(FL_SOLID) { } // --- line and polygon drawing with integer coordinates - void point(int x, int y); - void rect(int x, int y, int w, int h); - void rectf(int x, int y, int w, int h); - void line(int x, int y, int x1, int y1); - void line(int x, int y, int x1, int y1, int x2, int y2); - void xyline(int x, int y, int x1); - void xyline(int x, int y, int x1, int y2); - void xyline(int x, int y, int x1, int y2, int x3); - void yxline(int x, int y, int y1); - void yxline(int x, int y, int y1, int x2); - void yxline(int x, int y, int y1, int x2, int y3); - void loop(int x0, int y0, int x1, int y1, int x2, int y2); - void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void focus_rect(int x, int y, int w, int h); + void point(int x, int y) FL_OVERRIDE; + void rect(int x, int y, int w, int h) FL_OVERRIDE; + void rectf(int x, int y, int w, int h) FL_OVERRIDE; + void line(int x, int y, int x1, int y1) FL_OVERRIDE; + void line(int x, int y, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void xyline(int x, int y, int x1) FL_OVERRIDE; + void xyline(int x, int y, int x1, int y2) FL_OVERRIDE; + void xyline(int x, int y, int x1, int y2, int x3) FL_OVERRIDE; + void yxline(int x, int y, int y1) FL_OVERRIDE; + void yxline(int x, int y, int y1, int x2) FL_OVERRIDE; + void yxline(int x, int y, int y1, int x2, int y3) FL_OVERRIDE; + void loop(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void focus_rect(int x, int y, int w, int h) FL_OVERRIDE; // ---- clipping - void push_clip(int x, int y, int w, int h); - void pop_clip(); - void push_no_clip(); - Fl_Region clip_region(); - void clip_region(Fl_Region r); - void restore_clip(); - int not_clipped(int x, int y, int w, int h); - int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); + void push_clip(int x, int y, int w, int h) FL_OVERRIDE; + void pop_clip() FL_OVERRIDE; + void push_no_clip() FL_OVERRIDE; + Fl_Region clip_region() FL_OVERRIDE; + void clip_region(Fl_Region r) FL_OVERRIDE; + void restore_clip() FL_OVERRIDE; + int not_clipped(int x, int y, int w, int h) FL_OVERRIDE; + int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) FL_OVERRIDE; // ---- matrix transformed drawing - void transformed_vertex(double xf, double yf); - void begin_points(); - void end_points(); - void begin_line(); - void end_line(); - void begin_loop(); - void end_loop(); - void begin_polygon(); - void end_polygon(); - void begin_complex_polygon(); - void gap(); - void end_complex_polygon(); - void fixloop(); - void circle(double x, double y, double r); - void arc(int x, int y, int w, int h, double a1, double a2); - void arc(double x, double y, double r, double start, double end); - void pie(int x, int y, int w, int h, double a1, double a2); - void line_style(int style, int width=0, char* dashes=0); - void color(Fl_Color c); - Fl_Color color() { return color_; } - void color(uchar r, uchar g, uchar b); + void transformed_vertex(double xf, double yf) FL_OVERRIDE; + void begin_points() FL_OVERRIDE; + void end_points() FL_OVERRIDE; + void begin_line() FL_OVERRIDE; + void end_line() FL_OVERRIDE; + void begin_loop() FL_OVERRIDE; + void end_loop() FL_OVERRIDE; + void begin_polygon() FL_OVERRIDE; + void end_polygon() FL_OVERRIDE; + void begin_complex_polygon() FL_OVERRIDE; + void gap() FL_OVERRIDE; + void end_complex_polygon() FL_OVERRIDE; + void fixloop() FL_OVERRIDE; + void circle(double x, double y, double r) FL_OVERRIDE; + void arc(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void arc(double x, double y, double r, double start, double end) FL_OVERRIDE; + void pie(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void line_style(int style, int width=0, char* dashes=0) FL_OVERRIDE; + void color(Fl_Color c) FL_OVERRIDE; + Fl_Color color() FL_OVERRIDE { return color_; } + void color(uchar r, uchar g, uchar b) FL_OVERRIDE; // --- implementation is in Fl_OpenGL_Graphics_Driver_font.cxx - void font(Fl_Font face, Fl_Fontsize fsize); - Fl_Font font(); - void draw(const char *str, int n, int x, int y); - void draw(const char *str, int n, float x, float y); - void draw(int angle, const char *str, int n, int x, int y); - double width(const char *str, int n); - double width(unsigned int c); - void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h); - int height(); - int descent(); + void font(Fl_Font face, Fl_Fontsize fsize) FL_OVERRIDE; + Fl_Font font() FL_OVERRIDE; + void draw(const char *str, int n, int x, int y) FL_OVERRIDE; + void draw(const char *str, int n, float x, float y) FL_OVERRIDE; + void draw(int angle, const char *str, int n, int x, int y) FL_OVERRIDE; + double width(const char *str, int n) FL_OVERRIDE; + double width(unsigned int c) FL_OVERRIDE; + void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h) FL_OVERRIDE; + int height() FL_OVERRIDE; + int descent() FL_OVERRIDE; }; #endif // FL_OPENGL_GRAPHICS_DRIVER_H diff --git a/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx b/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx index cdd77385c..a49941837 100644 --- a/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx +++ b/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx @@ -27,7 +27,7 @@ /** Support for printing on the Unix/Linux platform */ class Fl_Posix_Printer_Driver : public Fl_PostScript_File_Device { - virtual int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message=NULL); + int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message=NULL) FL_OVERRIDE; }; #if HAVE_DLSYM && HAVE_DLFCN_H @@ -56,8 +56,8 @@ public: GtkPrintJob *pjob; // data shared between begin_job() and end_job() char tmpfilename[50]; // name of temporary PostScript file containing to-be-printed data - virtual int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message=NULL); - virtual void end_job(); + int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message=NULL) FL_OVERRIDE; + void end_job() FL_OVERRIDE; static bool probe_for_GTK(); static void *ptr_gtk; // points to the GTK dynamic lib or NULL diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.H b/src/drivers/Posix/Fl_Posix_System_Driver.H index 0de91203b..a81fd6b7d 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.H +++ b/src/drivers/Posix/Fl_Posix_System_Driver.H @@ -47,25 +47,25 @@ class Fl_Posix_System_Driver : public Fl_System_Driver protected: int run_program(const char *program, char **argv, char *msg, int msglen); public: - virtual int mkdir(const char* f, int mode) {return ::mkdir(f, mode);} - virtual int open(const char* f, int oflags, int pmode) { + int mkdir(const char* f, int mode) FL_OVERRIDE {return ::mkdir(f, mode);} + int open(const char* f, int oflags, int pmode) FL_OVERRIDE { return pmode == -1 ? ::open(f, oflags) : ::open(f, oflags, pmode); } - virtual char *getenv(const char *v) { return ::getenv(v); } - virtual int putenv(const char *var) {return ::putenv(strdup(var));} - virtual int system(const char* cmd) {return ::system(cmd);} - virtual int execvp(const char *file, char *const *argv) {return ::execvp(file, argv);} - virtual int chmod(const char* f, int mode) {return ::chmod(f, mode);} - virtual int access(const char* f, int mode) { return ::access(f, mode);} - virtual int flstat(const char* f, struct stat *b) { return ::stat(f, b);} - virtual char *getcwd(char* b, int l) {return ::getcwd(b, l);} - virtual int chdir(const char* path) {return ::chdir(path);} - virtual int unlink(const char* f) {return ::unlink(f);} - virtual int rmdir(const char* f) {return ::rmdir(f);} - virtual int rename(const char* f, const char *n) {return ::rename(f, n);} - virtual const char *getpwnam(const char *login); + char *getenv(const char *v) FL_OVERRIDE { return ::getenv(v); } + int putenv(const char *var) FL_OVERRIDE {return ::putenv(strdup(var));} + int system(const char* cmd) FL_OVERRIDE {return ::system(cmd);} + int execvp(const char *file, char *const *argv) FL_OVERRIDE {return ::execvp(file, argv);} + int chmod(const char* f, int mode) FL_OVERRIDE {return ::chmod(f, mode);} + int access(const char* f, int mode) FL_OVERRIDE { return ::access(f, mode);} + int flstat(const char* f, struct stat *b) FL_OVERRIDE { return ::stat(f, b);} + char *getcwd(char* b, int l) FL_OVERRIDE {return ::getcwd(b, l);} + int chdir(const char* path) FL_OVERRIDE {return ::chdir(path);} + int unlink(const char* f) FL_OVERRIDE {return ::unlink(f);} + int rmdir(const char* f) FL_OVERRIDE {return ::rmdir(f);} + int rename(const char* f, const char *n) FL_OVERRIDE {return ::rename(f, n);} + const char *getpwnam(const char *login) FL_OVERRIDE; #if HAVE_DLFCN_H - virtual void *load(const char *filename); + void *load(const char *filename) FL_OVERRIDE; #if HAVE_DLSYM static void *ptr_gtk; static bool probe_for_GTK(int major, int minor, void **ptr_gtk); @@ -73,19 +73,19 @@ public: #endif static void *dlopen_or_dlsym(const char *lib_name, const char *func_name = NULL); // these 4 are implemented in Fl_lock.cxx - virtual void awake(void*); - virtual int lock(); - virtual void unlock(); - virtual void* thread_message(); - virtual int file_type(const char *filename); - virtual const char *home_directory_name() { return ::getenv("HOME"); } - virtual int dot_file_hidden() {return 1;} - virtual void gettime(time_t *sec, int *usec); - virtual char* strdup(const char *s) {return ::strdup(s);} - virtual int close_fd(int fd); + void awake(void*) FL_OVERRIDE; + int lock() FL_OVERRIDE; + void unlock() FL_OVERRIDE; + void* thread_message() FL_OVERRIDE; + int file_type(const char *filename) FL_OVERRIDE; + const char *home_directory_name() FL_OVERRIDE { return ::getenv("HOME"); } + int dot_file_hidden() FL_OVERRIDE {return 1;} + void gettime(time_t *sec, int *usec) FL_OVERRIDE; + char* strdup(const char *s) FL_OVERRIDE {return ::strdup(s);} + int close_fd(int fd) FL_OVERRIDE; #if defined(HAVE_PTHREAD) - virtual void lock_ring(); - virtual void unlock_ring(); + void lock_ring() FL_OVERRIDE; + void unlock_ring() FL_OVERRIDE; #endif }; diff --git a/src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H b/src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H index 7f7a0acce..fef8ded71 100644 --- a/src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H +++ b/src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H @@ -59,32 +59,32 @@ public: void page(int format); int start_postscript (int pagecount, enum Fl_Paged_Device::Page_Format format, enum Fl_Paged_Device::Page_Layout layout); int start_eps(int width, int height); - void draw_image(const uchar *data, int ix, int iy, int iw, int ih, int D, int LD); - void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3) { + void draw_image(const uchar *data, int ix, int iy, int iw, int ih, int D, int LD) FL_OVERRIDE; + void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3) FL_OVERRIDE { Fl_Cairo_Graphics_Driver::draw_image(call, data, x,y,w,h,delta); } - void font(int f, int s); - Fl_Font font(); - double width(const char *s, int n); - double width(unsigned u); - int height(); - int descent(); - void text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h); + void font(int f, int s) FL_OVERRIDE; + Fl_Font font() FL_OVERRIDE; + double width(const char *s, int n) FL_OVERRIDE; + double width(unsigned u) FL_OVERRIDE; + int height() FL_OVERRIDE; + int descent() FL_OVERRIDE; + void text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h) FL_OVERRIDE; // draw text at width measured on display void transformed_draw(const char* s, int n, double x, double y); - void draw(const char* s, int nBytes, int x, int y) {transformed_draw(s,nBytes,x,y); } - void draw(const char* s, int nBytes, float x, float y) {transformed_draw(s,nBytes,x,y); } - void draw(int angle, const char *str, int n, int x, int y) {Fl_Cairo_Graphics_Driver::draw(angle, str, n, x, y);} + void draw(const char* s, int nBytes, int x, int y) FL_OVERRIDE {transformed_draw(s,nBytes,x,y); } + void draw(const char* s, int nBytes, float x, float y) FL_OVERRIDE {transformed_draw(s,nBytes,x,y); } + void draw(int angle, const char *str, int n, int x, int y) FL_OVERRIDE {Fl_Cairo_Graphics_Driver::draw(angle, str, n, x, y);} - void point(int x, int y); - int not_clipped(int x, int y, int w, int h); - int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); - virtual int has_feature(driver_feature feature_mask) { return feature_mask & PRINTER; } + void point(int x, int y) FL_OVERRIDE; + int not_clipped(int x, int y, int w, int h) FL_OVERRIDE; + int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) FL_OVERRIDE; + virtual int has_feature(driver_feature feature_mask) FL_OVERRIDE { return feature_mask & PRINTER; } // draw image classes without caching them void draw_rgb_bitmap_(Fl_Image *img,int XP, int YP, int WP, int HP, int cx, int cy); - void draw_pixmap(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy); - void draw_bitmap(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy); - void draw_rgb(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy); + void draw_pixmap(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_bitmap(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_rgb(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; }; #else // ! USE_PANGO @@ -100,7 +100,7 @@ private: void close85(void *data); int scale_for_image_(Fl_Image *img, int XP, int YP, int WP, int HP,int cx, int cy); protected: - uchar **mask_bitmap() {return &mask;} + uchar **mask_bitmap() FL_OVERRIDE {return &mask;} public: Fl_PostScript_Graphics_Driver(); @@ -172,78 +172,78 @@ public: void page(int format); // implementation of drawing methods - void color(Fl_Color c); - void color(uchar r, uchar g, uchar b); - Fl_Color color(); + void color(Fl_Color c) FL_OVERRIDE; + void color(uchar r, uchar g, uchar b) FL_OVERRIDE; + Fl_Color color() FL_OVERRIDE; - void push_clip(int x, int y, int w, int h); - int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); - int not_clipped(int x, int y, int w, int h); - void push_no_clip(); - void pop_clip(); + void push_clip(int x, int y, int w, int h) FL_OVERRIDE; + int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) FL_OVERRIDE; + int not_clipped(int x, int y, int w, int h) FL_OVERRIDE; + void push_no_clip() FL_OVERRIDE; + void pop_clip() FL_OVERRIDE; - void line_style(int style, int width=0, char* dashes=0); + void line_style(int style, int width=0, char* dashes=0) FL_OVERRIDE; - void rect(int x, int y, int w, int h); - void rectf(int x, int y, int w, int h); + void rect(int x, int y, int w, int h) FL_OVERRIDE; + void rectf(int x, int y, int w, int h) FL_OVERRIDE; - void xyline(int x, int y, int x1); - void xyline(int x, int y, int x1, int y2); - void xyline(int x, int y, int x1, int y2, int x3); + void xyline(int x, int y, int x1) FL_OVERRIDE; + void xyline(int x, int y, int x1, int y2) FL_OVERRIDE; + void xyline(int x, int y, int x1, int y2, int x3) FL_OVERRIDE; - void yxline(int x, int y, int y1); - void yxline(int x, int y, int y1, int x2); - void yxline(int x, int y, int y1, int x2, int y3); + void yxline(int x, int y, int y1) FL_OVERRIDE; + void yxline(int x, int y, int y1, int x2) FL_OVERRIDE; + void yxline(int x, int y, int y1, int x2, int y3) FL_OVERRIDE; - void line(int x1, int y1, int x2, int y2); - void line(int x1, int y1, int x2, int y2, int x3, int y3); + void line(int x1, int y1, int x2, int y2) FL_OVERRIDE; + void line(int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; - void loop(int x0, int y0, int x1, int y1, int x2, int y2); - void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void point(int x, int y); + void loop(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void point(int x, int y) FL_OVERRIDE; - void begin_points(); - void begin_line(); - void begin_loop(); - void begin_polygon(); - void vertex(double x, double y); - void curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3); - void circle(double x, double y, double r); - void arc(double x, double y, double r, double start, double a); - void arc(int x, int y, int w, int h, double a1, double a2); - void pie(int x, int y, int w, int h, double a1, double a2); - void end_points(); - void end_line(); - void end_loop(); - void end_polygon(); - void begin_complex_polygon(){begin_polygon();} - void gap(){gap_=1;} - void end_complex_polygon(){end_polygon();} - void transformed_vertex(double x, double y); + void begin_points() FL_OVERRIDE; + void begin_line() FL_OVERRIDE; + void begin_loop() FL_OVERRIDE; + void begin_polygon() FL_OVERRIDE; + void vertex(double x, double y) FL_OVERRIDE; + void curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3) FL_OVERRIDE; + void circle(double x, double y, double r) FL_OVERRIDE; + void arc(double x, double y, double r, double start, double a) FL_OVERRIDE; + void arc(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void pie(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void end_points() FL_OVERRIDE; + void end_line() FL_OVERRIDE; + void end_loop() FL_OVERRIDE; + void end_polygon() FL_OVERRIDE; + void begin_complex_polygon() FL_OVERRIDE {begin_polygon();} + void gap() FL_OVERRIDE {gap_=1;} + void end_complex_polygon() FL_OVERRIDE {end_polygon();} + void transformed_vertex(double x, double y) FL_OVERRIDE; - void draw_image(const uchar* d, int x,int y,int w,int h, int delta=3, int ldelta=0); - void draw_image_mono(const uchar* d, int x,int y,int w,int h, int delta=1, int ld=0); - void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3); - void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1); + void draw_image(const uchar* d, int x,int y,int w,int h, int delta=3, int ldelta=0) FL_OVERRIDE; + void draw_image_mono(const uchar* d, int x,int y,int w,int h, int delta=1, int ld=0) FL_OVERRIDE; + void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3) FL_OVERRIDE; + void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1) FL_OVERRIDE; - void draw(const char* s, int nBytes, int x, int y) {transformed_draw(s,nBytes,x,y); } - void draw(const char* s, int nBytes, float x, float y) {transformed_draw(s,nBytes,x,y); } - void draw(int angle, const char *str, int n, int x, int y); - void rtl_draw(const char* s, int n, int x, int y); - void font(int face, int size); - Fl_Font font(); - double width(const char *, int); - double width(unsigned int u); - void text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h); - int height(); - int descent(); - void draw_pixmap(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy); - void draw_bitmap(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy); - void draw_rgb(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy); + void draw(const char* s, int nBytes, int x, int y) FL_OVERRIDE {transformed_draw(s,nBytes,x,y); } + void draw(const char* s, int nBytes, float x, float y) FL_OVERRIDE {transformed_draw(s,nBytes,x,y); } + void draw(int angle, const char *str, int n, int x, int y) FL_OVERRIDE; + void rtl_draw(const char* s, int n, int x, int y) FL_OVERRIDE; + void font(int face, int size) FL_OVERRIDE; + Fl_Font font() FL_OVERRIDE; + double width(const char *, int) FL_OVERRIDE; + double width(unsigned int u) FL_OVERRIDE; + void text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h) FL_OVERRIDE; + int height() FL_OVERRIDE; + int descent() FL_OVERRIDE; + void draw_pixmap(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_bitmap(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_rgb(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; ~Fl_PostScript_Graphics_Driver(); - virtual int has_feature(driver_feature feature_mask) { return feature_mask & PRINTER; } + int has_feature(driver_feature feature_mask) FL_OVERRIDE { return feature_mask & PRINTER; } void ps_origin(int x, int y); void ps_translate(int, int); diff --git a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.H b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.H index 14d469dbe..8ef586624 100644 --- a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.H +++ b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.H @@ -31,9 +31,9 @@ protected: Fl_Quartz_Copy_Surface_Driver(int w, int h); // implemented in Fl_cocoa.mm because uses Objective-c ~Fl_Quartz_Copy_Surface_Driver(); - void set_current(); - void translate(int x, int y); - void untranslate(); + void set_current() FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; }; #endif /* Fl_Quartz_Copy_Surface_Driver_H */ diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H index f5c9bd3a2..ca1ffce04 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H @@ -56,92 +56,92 @@ protected: CGLineJoin quartz_line_join_; CGFloat *quartz_line_pattern; int quartz_line_pattern_size; - virtual void cache_size(Fl_Image* img, int &width, int &height); + void cache_size(Fl_Image* img, int &width, int &height) FL_OVERRIDE; public: Fl_Quartz_Graphics_Driver(); - virtual int has_feature(driver_feature mask) { return mask & NATIVE; } - virtual void gc(void *ctxt) { gc_ = (CGContextRef)ctxt; global_gc(); } - virtual void *gc() {return gc_;} - char can_do_alpha_blending(); + int has_feature(driver_feature mask) FL_OVERRIDE { return mask & NATIVE; } + void gc(void *ctxt) FL_OVERRIDE { gc_ = (CGContextRef)ctxt; global_gc(); } + void *gc() FL_OVERRIDE {return gc_;} + char can_do_alpha_blending() FL_OVERRIDE; // --- bitmap stuff static CGImageRef create_bitmask(int w, int h, const uchar *array); // NOT virtual - virtual void delete_bitmask(fl_uintptr_t bm); - void draw_pixmap(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw_bitmap(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw_rgb(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy); - void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); - void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); - void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0); - void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); - void cache(Fl_Pixmap *img); - void cache(Fl_Bitmap *img); - void cache(Fl_RGB_Image *img); - void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_); - void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); + void delete_bitmask(fl_uintptr_t bm) FL_OVERRIDE; + void draw_pixmap(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_bitmap(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_rgb(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0) FL_OVERRIDE; + void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3) FL_OVERRIDE; + void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0) FL_OVERRIDE; + void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1) FL_OVERRIDE; + void cache(Fl_Pixmap *img) FL_OVERRIDE; + void cache(Fl_Bitmap *img) FL_OVERRIDE; + void cache(Fl_RGB_Image *img) FL_OVERRIDE; + void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_) FL_OVERRIDE; + void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) FL_OVERRIDE; void draw_CGImage(CGImageRef cgimg, int x, int y, int w, int h, int srcx, int srcy, int sw, int sh); static CGRect fl_cgrectmake_cocoa(int x, int y, int w, int h); - void add_rectangle_to_region(Fl_Region r, int x, int y, int w, int h); - Fl_Region XRectangleRegion(int x, int y, int w, int h); - void XDestroyRegion(Fl_Region r); + void add_rectangle_to_region(Fl_Region r, int x, int y, int w, int h) FL_OVERRIDE; + Fl_Region XRectangleRegion(int x, int y, int w, int h) FL_OVERRIDE; + void XDestroyRegion(Fl_Region r) FL_OVERRIDE; void high_resolution(bool b) { high_resolution_ = b; } protected: - void point(int x, int y); - void rect(int x, int y, int w, int h); - void focus_rect(int x, int y, int w, int h); - void rectf(int x, int y, int w, int h); - void line(int x, int y, int x1, int y1); - void line(int x, int y, int x1, int y1, int x2, int y2); - void xyline(int x, int y, int x1); - void xyline(int x, int y, int x1, int y2); - void xyline(int x, int y, int x1, int y2, int x3); - void yxline(int x, int y, int y1); - void yxline(int x, int y, int y1, int x2); - void yxline(int x, int y, int y1, int x2, int y3); - void loop(int x0, int y0, int x1, int y1, int x2, int y2); - void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); + void point(int x, int y) FL_OVERRIDE; + void rect(int x, int y, int w, int h) FL_OVERRIDE; + void focus_rect(int x, int y, int w, int h) FL_OVERRIDE; + void rectf(int x, int y, int w, int h) FL_OVERRIDE; + void line(int x, int y, int x1, int y1) FL_OVERRIDE; + void line(int x, int y, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void xyline(int x, int y, int x1) FL_OVERRIDE; + void xyline(int x, int y, int x1, int y2) FL_OVERRIDE; + void xyline(int x, int y, int x1, int y2, int x3) FL_OVERRIDE; + void yxline(int x, int y, int y1) FL_OVERRIDE; + void yxline(int x, int y, int y1, int x2) FL_OVERRIDE; + void yxline(int x, int y, int y1, int x2, int y3) FL_OVERRIDE; + void loop(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; // --- clipping - void push_clip(int x, int y, int w, int h); - int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); - int not_clipped(int x, int y, int w, int h); - void restore_clip(); - void end_points(); - void end_line(); - void end_polygon(); - void end_complex_polygon(); - void circle(double x, double y, double r); - void arc(int x, int y, int w, int h, double a1, double a2); - void pie(int x, int y, int w, int h, double a1, double a2); - void line_style(int style, int width=0, char* dashes=0); - void color(Fl_Color c); - Fl_Color color() { return color_; } - void color(uchar r, uchar g, uchar b); - void draw(const char *str, int n, int x, int y); - void draw(const char *str, int n, float x, float y); - void draw(int angle, const char *str, int n, int x, int y); + void push_clip(int x, int y, int w, int h) FL_OVERRIDE; + int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) FL_OVERRIDE; + int not_clipped(int x, int y, int w, int h) FL_OVERRIDE; + void restore_clip() FL_OVERRIDE; + void end_points() FL_OVERRIDE; + void end_line() FL_OVERRIDE; + void end_polygon() FL_OVERRIDE; + void end_complex_polygon() FL_OVERRIDE; + void circle(double x, double y, double r) FL_OVERRIDE; + void arc(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void pie(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void line_style(int style, int width=0, char* dashes=0) FL_OVERRIDE; + void color(Fl_Color c) FL_OVERRIDE; + Fl_Color color() FL_OVERRIDE { return color_; } + void color(uchar r, uchar g, uchar b) FL_OVERRIDE; + void draw(const char *str, int n, int x, int y) FL_OVERRIDE; + void draw(const char *str, int n, float x, float y) FL_OVERRIDE; + void draw(int angle, const char *str, int n, int x, int y) FL_OVERRIDE; double width(const UniChar* txt, int n); - void rtl_draw(const char *str, int n, int x, int y); - void font(Fl_Font face, Fl_Fontsize fsize); - double width(const char *str, int n); - double width(unsigned int c); - int height(); - int descent(); + void rtl_draw(const char *str, int n, int x, int y) FL_OVERRIDE; + void font(Fl_Font face, Fl_Fontsize fsize) FL_OVERRIDE; + double width(const char *str, int n) FL_OVERRIDE; + double width(unsigned int c) FL_OVERRIDE; + int height() FL_OVERRIDE; + int descent() FL_OVERRIDE; virtual bool high_resolution() { return high_resolution_; } - virtual void global_gc(); + void global_gc() FL_OVERRIDE; void quartz_restore_line_style(); inline Fl_Quartz_Font_Descriptor *valid_font_descriptor(); - virtual const char* get_font_name(Fl_Font fnum, int* ap); - virtual int get_font_sizes(Fl_Font fnum, int*& sizep); - virtual const char *font_name(int num); - virtual void font_name(int num, const char *name); - Fl_Fontdesc* calc_fl_fonts(void); + const char* get_font_name(Fl_Font fnum, int* ap) FL_OVERRIDE; + int get_font_sizes(Fl_Font fnum, int*& sizep) FL_OVERRIDE; + const char *font_name(int num) FL_OVERRIDE; + void font_name(int num, const char *name) FL_OVERRIDE; + Fl_Fontdesc* calc_fl_fonts(void) FL_OVERRIDE; - virtual void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h); - virtual Fl_Font set_fonts(const char* xstarname); + void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h) FL_OVERRIDE; + Fl_Font set_fonts(const char* xstarname) FL_OVERRIDE; void set_fontname_in_fontdesc(Fl_Fontdesc *f); - virtual void uncache_pixmap(fl_uintptr_t p); + void uncache_pixmap(fl_uintptr_t p) FL_OVERRIDE; #if HAS_ATSU && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 enum {use_CoreText = 1, use_ATSU}; @@ -167,16 +167,16 @@ protected: #else void descriptor_init(const char* name, Fl_Fontsize Size, Fl_Quartz_Font_Descriptor *d); #endif - virtual void overlay_rect(int x, int y, int w , int h); - virtual float override_scale(); - virtual void restore_scale(float); - virtual void antialias(int state); - virtual int antialias(); + void overlay_rect(int x, int y, int w , int h) FL_OVERRIDE; + float override_scale() FL_OVERRIDE; + void restore_scale(float) FL_OVERRIDE; + void antialias(int state) FL_OVERRIDE; + int antialias() FL_OVERRIDE; }; class Fl_Quartz_Printer_Graphics_Driver : public Fl_Quartz_Graphics_Driver { public: - virtual int has_feature(driver_feature mask) { return mask & (NATIVE | PRINTER); } + int has_feature(driver_feature mask) FL_OVERRIDE { return mask & (NATIVE | PRINTER); } }; #endif // FL_QUARTZ_GRAPHICS_DRIVER_H diff --git a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.H b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.H index f70a43ed6..b6f58ec8f 100644 --- a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.H +++ b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.H @@ -21,15 +21,15 @@ #include class Fl_Quartz_Image_Surface_Driver : public Fl_Image_Surface_Driver { - virtual void end_current(); + void end_current() FL_OVERRIDE; public: FLWindow *pre_window; Fl_Quartz_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off); ~Fl_Quartz_Image_Surface_Driver(); - void set_current(); - void translate(int x, int y); - void untranslate(); - Fl_RGB_Image *image(); + void set_current() FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; + Fl_RGB_Image *image() FL_OVERRIDE; }; #endif // FL_QUARTZ_IMAGE_SURFACE_DRIVER_H diff --git a/src/drivers/SVG/Fl_SVG_File_Surface.cxx b/src/drivers/SVG/Fl_SVG_File_Surface.cxx index ba8099d7f..e8ecd75a8 100644 --- a/src/drivers/SVG/Fl_SVG_File_Surface.cxx +++ b/src/drivers/SVG/Fl_SVG_File_Surface.cxx @@ -71,54 +71,54 @@ public: ~Fl_SVG_Graphics_Driver(); FILE* file() {return out_;} protected: - void rect(int x, int y, int w, int h); - void rectf(int x, int y, int w, int h); - void compute_dasharray(float s, char *dashes=0); - void line_style(int style, int width, char *dashes=0); - void line(int x1, int y1, int x2, int y2); - void line(int x1, int y1, int x2, int y2, int x3, int y3); + void rect(int x, int y, int w, int h) FL_OVERRIDE; + void rectf(int x, int y, int w, int h) FL_OVERRIDE; + virtual void compute_dasharray(float s, char *dashes=0); + void line_style(int style, int width, char *dashes=0) FL_OVERRIDE; + void line(int x1, int y1, int x2, int y2) FL_OVERRIDE; + void line(int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; void font_(int f, int s); - void font(int f, int s); - Fl_Font font(); - void draw(const char *str, int n, int x, int y); - void draw(const char*, int, float, float) ; - void draw(int, const char*, int, int, int) ; - void rtl_draw(const char *str, int n, int x, int y); - void color(uchar r, uchar g, uchar b); - void color(Fl_Color c); - Fl_Color color(); - double width(const char*, int); - double width(unsigned int c); - void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h); - int height() ; - int descent() ; - void draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy); + void font(int f, int s) FL_OVERRIDE; + Fl_Font font() FL_OVERRIDE; + void draw(const char *str, int n, int x, int y) FL_OVERRIDE; + void draw(const char*, int, float, float) FL_OVERRIDE; + void draw(int, const char*, int, int, int) FL_OVERRIDE; + void rtl_draw(const char *str, int n, int x, int y) FL_OVERRIDE; + void color(uchar r, uchar g, uchar b) FL_OVERRIDE; + void color(Fl_Color c) FL_OVERRIDE; + Fl_Color color() FL_OVERRIDE; + double width(const char*, int) FL_OVERRIDE; + double width(unsigned int c) FL_OVERRIDE; + void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h) FL_OVERRIDE; + int height() FL_OVERRIDE; + int descent() FL_OVERRIDE; + void draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; void define_rgb_png(Fl_RGB_Image *rgb, const char *name, int x, int y); void define_rgb_jpeg(Fl_RGB_Image *rgb, const char *name, int x, int y); - void draw_pixmap(Fl_Pixmap *pxm,int XP, int YP, int WP, int HP, int cx, int cy); - void draw_bitmap(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, int cy); - void draw_image(const uchar* buf, int x, int y, int w, int h, int d, int l); - void draw_image(Fl_Draw_Image_Cb cb, void* data, int x, int y, int w, int h, int d); - void draw_image_mono(const uchar* buf, int x, int y, int w, int h, int d, int l); - void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int x, int y, int w, int h, int d); - void push_clip(int x, int y, int w, int h); - void push_no_clip(); - void pop_clip(); - int clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, int& H); - int not_clipped(int x, int y, int w, int h); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void loop(int x0, int y0, int x1, int y1, int x2, int y2); - void point(int x, int y); - void end_points(); - void end_line(); - void end_polygon(); - void end_complex_polygon(); - void circle(double x, double y,double r); - void arc(int x,int y,int w,int h,double a1,double a2); - void arc(double x, double y, double r, double start, double end); - void pie(int x,int y,int w,int h,double a1,double a2); + void draw_pixmap(Fl_Pixmap *pxm,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_bitmap(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_image(const uchar* buf, int x, int y, int w, int h, int d, int l) FL_OVERRIDE; + void draw_image(Fl_Draw_Image_Cb cb, void* data, int x, int y, int w, int h, int d) FL_OVERRIDE; + void draw_image_mono(const uchar* buf, int x, int y, int w, int h, int d, int l) FL_OVERRIDE; + void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int x, int y, int w, int h, int d) FL_OVERRIDE; + void push_clip(int x, int y, int w, int h) FL_OVERRIDE; + void push_no_clip() FL_OVERRIDE; + void pop_clip() FL_OVERRIDE; + int clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, int& H) FL_OVERRIDE; + int not_clipped(int x, int y, int w, int h) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void loop(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void point(int x, int y) FL_OVERRIDE; + void end_points() FL_OVERRIDE; + void end_line() FL_OVERRIDE; + void end_polygon() FL_OVERRIDE; + void end_complex_polygon() FL_OVERRIDE; + void circle(double x, double y,double r) FL_OVERRIDE; + void arc(int x,int y,int w,int h,double a1,double a2) FL_OVERRIDE; + void arc(double x, double y, double r, double start, double end) FL_OVERRIDE; + void pie(int x,int y,int w,int h,double a1,double a2) FL_OVERRIDE; void arc_pie(char AorP, int x, int y, int w, int h, double a1, double a2); }; diff --git a/src/drivers/Unix/Fl_Unix_System_Driver.H b/src/drivers/Unix/Fl_Unix_System_Driver.H index 7234cc360..8bc365515 100644 --- a/src/drivers/Unix/Fl_Unix_System_Driver.H +++ b/src/drivers/Unix/Fl_Unix_System_Driver.H @@ -23,27 +23,27 @@ class Fl_RGB_Image; class Fl_Unix_System_Driver : public Fl_Posix_System_Driver { public: - virtual int clocale_vsnprintf(char *output, size_t output_size, const char *format, va_list args); - virtual int clocale_vsscanf(const char *input, const char *format, va_list args); - virtual int clocale_vprintf(FILE *output, const char *format, va_list args); - virtual int filename_list(const char *d, dirent ***list, + int clocale_vsnprintf(char *output, size_t output_size, const char *format, va_list args) FL_OVERRIDE; + int clocale_vsscanf(const char *input, const char *format, va_list args) FL_OVERRIDE; + int clocale_vprintf(FILE *output, const char *format, va_list args) FL_OVERRIDE; + int filename_list(const char *d, dirent ***list, int (*sort)(struct dirent **, struct dirent **), - char *errmsg=NULL, int errmsg_sz=0); - virtual int open_uri(const char *uri, char *msg, int msglen); - virtual int use_tooltip_timeout_condition() {return 1;} - virtual int file_browser_load_filesystem(Fl_File_Browser *browser, char *filename, int lname, Fl_File_Icon *icon); - virtual void newUUID(char *uuidBuffer); - virtual char *preference_rootnode(Fl_Preferences *prefs, Fl_Preferences::Root root, const char *vendor, - const char *application); - virtual int preferences_need_protection_check() {return 1;} - virtual int utf8locale(); - virtual const char *filename_name(const char *buf); - virtual void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0); - virtual void add_fd(int fd, Fl_FD_Handler cb, void* = 0); - virtual void remove_fd(int, int when); - virtual void remove_fd(int); - double wait(double time_to_wait); - int ready(); + char *errmsg=NULL, int errmsg_sz=0) FL_OVERRIDE; + int open_uri(const char *uri, char *msg, int msglen) FL_OVERRIDE; + int use_tooltip_timeout_condition() FL_OVERRIDE {return 1;} + int file_browser_load_filesystem(Fl_File_Browser *browser, char *filename, int lname, Fl_File_Icon *icon) FL_OVERRIDE; + void newUUID(char *uuidBuffer) FL_OVERRIDE; + char *preference_rootnode(Fl_Preferences *prefs, Fl_Preferences::Root root, const char *vendor, + const char *application) FL_OVERRIDE; + int preferences_need_protection_check() FL_OVERRIDE {return 1;} + int utf8locale() FL_OVERRIDE; + const char *filename_name(const char *buf) FL_OVERRIDE; + void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0) FL_OVERRIDE; + void add_fd(int fd, Fl_FD_Handler cb, void* = 0) FL_OVERRIDE; + void remove_fd(int, int when) FL_OVERRIDE; + void remove_fd(int) FL_OVERRIDE; + double wait(double time_to_wait) FL_OVERRIDE; + int ready() FL_OVERRIDE; static unsigned char *create_bmp(const unsigned char *data, int W, int H, int *return_size); static Fl_RGB_Image *own_bmp_to_RGB(char *bmp); static void read_int(uchar *c, int& i); diff --git a/src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.H b/src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.H index f5f6eee11..e10a801ce 100644 --- a/src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.H @@ -26,9 +26,9 @@ class Fl_Wayland_Copy_Surface_Driver : public Fl_Copy_Surface_Driver { protected: Fl_Wayland_Copy_Surface_Driver(int w, int h); ~Fl_Wayland_Copy_Surface_Driver(); - void set_current(); - void translate(int x, int y); - void untranslate(); + void set_current() FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; }; #endif // FL_WAYLAND_COPY_SURFACE_DRIVER_H diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H index e30143468..960f18c11 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.H @@ -38,21 +38,21 @@ class Fl_Wayland_Gl_Window_Driver : public Fl_Gl_Window_Driver { friend class Fl_Wayland_Gl_Plugin; bool egl_swap_in_progress; Fl_Wayland_Gl_Window_Driver(Fl_Gl_Window *win); - virtual float pixels_per_unit(); - virtual void make_current_before(); - virtual int mode_(int m, const int *a); - virtual void swap_buffers(); - virtual void resize(int is_a_resize, int w, int h); - virtual char swap_type(); - virtual Fl_Gl_Choice *find(int m, const int *alistp); - virtual GLContext create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g); - virtual void set_gl_context(Fl_Window* w, GLContext context); - virtual void delete_gl_context(GLContext); - virtual void make_overlay_current(); - virtual void redraw_overlay(); - virtual void gl_start(); - virtual void gl_visual(Fl_Gl_Choice *c); - char *alpha_mask_for_string(const char *str, int n, int w, int h, Fl_Fontsize fs); + float pixels_per_unit() FL_OVERRIDE; + void make_current_before() FL_OVERRIDE; + int mode_(int m, const int *a) FL_OVERRIDE; + void swap_buffers() FL_OVERRIDE; + void resize(int is_a_resize, int w, int h) FL_OVERRIDE; + char swap_type() FL_OVERRIDE; + Fl_Gl_Choice *find(int m, const int *alistp) FL_OVERRIDE; + GLContext create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g) FL_OVERRIDE; + void set_gl_context(Fl_Window* w, GLContext context) FL_OVERRIDE; + void delete_gl_context(GLContext) FL_OVERRIDE; + void make_overlay_current() FL_OVERRIDE; + void redraw_overlay() FL_OVERRIDE; + void gl_start() FL_OVERRIDE; + void gl_visual(Fl_Gl_Choice *c) FL_OVERRIDE; + char *alpha_mask_for_string(const char *str, int n, int w, int h, Fl_Fontsize fs) FL_OVERRIDE; static EGLDisplay egl_display; static EGLint configs_count; void init(); diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx index 3624d63f9..45a26e046 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx @@ -371,20 +371,20 @@ void Fl_Wayland_Gl_Window_Driver::swap_buffers() { class Fl_Wayland_Gl_Plugin : public Fl_Wayland_Plugin { public: Fl_Wayland_Gl_Plugin() : Fl_Wayland_Plugin(name()) { } - virtual const char *name() { return "gl.wayland.fltk.org"; } - virtual void do_swap(Fl_Window *w) { + const char *name() FL_OVERRIDE { return "gl.wayland.fltk.org"; } + void do_swap(Fl_Window *w) FL_OVERRIDE { Fl_Gl_Window_Driver *gldr = Fl_Gl_Window_Driver::driver(w->as_gl_window()); if (gldr->overlay() == w) gldr->swap_buffers(); } - virtual void invalidate(Fl_Window *w) { + void invalidate(Fl_Window *w) FL_OVERRIDE { w->as_gl_window()->valid(0); } - virtual void terminate() { + void terminate() FL_OVERRIDE { if (Fl_Wayland_Gl_Window_Driver::egl_display != EGL_NO_DISPLAY) { eglTerminate(Fl_Wayland_Gl_Window_Driver::egl_display); } } - virtual void destroy(struct gl_start_support *gl_start_support_) { + void destroy(struct gl_start_support *gl_start_support_) FL_OVERRIDE { eglDestroySurface(Fl_Wayland_Gl_Window_Driver::egl_display, gl_start_support_->egl_surface); wl_egl_window_destroy(gl_start_support_->egl_window); wl_subsurface_destroy(gl_start_support_->subsurface); diff --git a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H index 01932fc50..d736df9de 100644 --- a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H @@ -75,13 +75,13 @@ public: Fl_Wayland_Graphics_Driver(); static const uint32_t wld_format; void set_buffer(struct fl_wld_buffer *buffer, float scale = 0); - virtual void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen osrc, int srcx, int srcy); + void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen osrc, int srcx, int srcy) FL_OVERRIDE; static struct fl_wld_buffer *create_shm_buffer(int width, int height); static void buffer_release(struct wld_window *window); static void buffer_commit(struct wld_window *window, bool need_damage = true); static void cairo_init(struct fl_wld_buffer *buffer, int width, int height, int stride, cairo_format_t format); - virtual void *gc(); - virtual void gc(void *gc); + void *gc() FL_OVERRIDE; + void gc(void *gc) FL_OVERRIDE; }; #endif // FL_WAYLAND_GRAPHICS_DRIVER_H diff --git a/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.H b/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.H index 7959267f8..8e7246c24 100644 --- a/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.H @@ -21,15 +21,15 @@ #include class Fl_Wayland_Image_Surface_Driver : public Fl_Image_Surface_Driver { - virtual void end_current(); + void end_current() FL_OVERRIDE; struct wld_window *pre_window; public: Fl_Wayland_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off); ~Fl_Wayland_Image_Surface_Driver(); - virtual void set_current(); - virtual void translate(int x, int y); - virtual void untranslate(); - virtual Fl_RGB_Image *image(); + void set_current() FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; + Fl_RGB_Image *image() FL_OVERRIDE; }; #endif // FL_WAYLAND_IMAGE_SURFACE_DRIVER_H diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H index 8ef09fd68..afc895e01 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H @@ -117,49 +117,49 @@ public: struct zwp_text_input_manager_v3 *text_input_base; Fl_Wayland_Screen_Driver(); - virtual APP_SCALING_CAPABILITY rescalable() { return PER_SCREEN_APP_SCALING; } - virtual float scale(int n); - virtual void scale(int n, float f); + APP_SCALING_CAPABILITY rescalable() FL_OVERRIDE { return PER_SCREEN_APP_SCALING; } + float scale(int n) FL_OVERRIDE; + void scale(int n, float f) FL_OVERRIDE; int screen_num_unscaled(int x, int y); void copy_image(const unsigned char* data, int W, int H); // --- screen configuration void init_workarea(); - virtual void init(); - virtual int x(); - virtual int y(); - virtual int w(); - virtual int h(); - virtual void screen_xywh(int &X, int &Y, int &W, int &H, int n); - virtual void screen_dpi(float &h, float &v, int n=0); - virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n); + void init() FL_OVERRIDE; + int x() FL_OVERRIDE; + int y() FL_OVERRIDE; + int w() FL_OVERRIDE; + int h() FL_OVERRIDE; + void screen_xywh(int &X, int &Y, int &W, int &H, int n) FL_OVERRIDE; + void screen_dpi(float &h, float &v, int n=0) FL_OVERRIDE; + void screen_work_area(int &X, int &Y, int &W, int &H, int n) FL_OVERRIDE; // --- audible output - virtual void beep(int type); + void beep(int type) FL_OVERRIDE; // --- global events - virtual void flush(); - virtual void grab(Fl_Window* win); + void flush() FL_OVERRIDE; + void grab(Fl_Window* win) FL_OVERRIDE; // --- global colors - virtual void get_system_colors(); - virtual const char *get_system_scheme(); - virtual int dnd(int unused); - virtual int compose(int &del); - virtual void compose_reset(); - virtual Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win, bool may_capture_subwins, bool *did_capture_subwins); - virtual int get_mouse(int &x, int &y); - virtual void open_display_platform(); - virtual void close_display(); - virtual void display(const char *d); + void get_system_colors() FL_OVERRIDE; + const char *get_system_scheme() FL_OVERRIDE; + int dnd(int unused) FL_OVERRIDE; + int compose(int &del) FL_OVERRIDE; + void compose_reset() FL_OVERRIDE; + Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win, bool may_capture_subwins, bool *did_capture_subwins) FL_OVERRIDE; + int get_mouse(int &x, int &y) FL_OVERRIDE; + void open_display_platform() FL_OVERRIDE; + void close_display() FL_OVERRIDE; + void display(const char *d) FL_OVERRIDE; // --- compute dimensions of an Fl_Offscreen - virtual void offscreen_size(Fl_Offscreen o, int &width, int &height); - virtual int has_marked_text() const; + void offscreen_size(Fl_Offscreen o, int &width, int &height) FL_OVERRIDE; + int has_marked_text() const FL_OVERRIDE; static int next_marked_length; // next length of marked text after current marked text will have been replaced // --- clipboard operations // this one is in fl_wayland_clipboard_dnd.cxx - virtual void copy(const char *stuff, int len, int clipboard, const char *type); + void copy(const char *stuff, int len, int clipboard, const char *type) FL_OVERRIDE; // this one is in fl_wayland_clipboard_dnd.cxx - virtual void paste(Fl_Widget &receiver, int clipboard, const char *type); + void paste(Fl_Widget &receiver, int clipboard, const char *type) FL_OVERRIDE; // this one is in fl_wayland_clipboard_dnd.cxx - virtual int clipboard_contains(const char *type); + int clipboard_contains(const char *type) FL_OVERRIDE; // --- Wayland-special void set_cursor(); struct wl_cursor *default_cursor(); @@ -173,11 +173,11 @@ public: static bool own_output(struct wl_output *output); typedef enum {unspecified, MUTTER, WESTON, KDE} compositor_name; static compositor_name compositor; // identifies the used Wayland compositor - void set_spot(int font, int height, int x, int y, int w, int h, Fl_Window *win); - void reset_spot(); - virtual void *control_maximize_button(void *data); - int event_key(int k); - int get_key(int k); + void set_spot(int font, int height, int x, int y, int w, int h, Fl_Window *win) FL_OVERRIDE; + void reset_spot() FL_OVERRIDE; + void *control_maximize_button(void *data) FL_OVERRIDE; + int event_key(int k) FL_OVERRIDE; + int get_key(int k) FL_OVERRIDE; }; diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H index 2b12ededd..60e346915 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H @@ -77,7 +77,7 @@ public: static type_for_resize_window_between_screens data_for_resize_window_between_screens_; void decorated_win_size(int &w, int &h); void shape_bitmap_(Fl_Image* b); - void shape_alpha_(Fl_Image* img, int offset); + void shape_alpha_(Fl_Image* img, int offset) FL_OVERRIDE; void update_scale(); cairo_rectangle_int_t *subRect() { return subRect_; } // getter void subRect(cairo_rectangle_int_t *r); // setter @@ -93,40 +93,40 @@ public: static void resize_after_screen_change(void *data); // --- window data - virtual int decorated_w(); - virtual int decorated_h(); - virtual const Fl_Image* shape(); + int decorated_w() FL_OVERRIDE; + int decorated_h() FL_OVERRIDE; + const Fl_Image* shape() FL_OVERRIDE; // --- window management - virtual Fl_X *makeWindow(); - virtual void take_focus(); - virtual void flush(); - virtual void flush_overlay(); - virtual void draw_end(); - virtual void make_current(); - virtual void show(); - virtual void resize(int X,int Y,int W,int H); - virtual void label(const char *name, const char *mininame); - virtual void destroy_double_buffer(); - virtual void hide(); - virtual void map(); - virtual void unmap(); - virtual void fullscreen_on(); - virtual void fullscreen_off(int X, int Y, int W, int H); - virtual void use_border(); - virtual void size_range(); - virtual void iconize(); - virtual void decoration_sizes(int *top, int *left, int *right, int *bottom); + Fl_X *makeWindow() FL_OVERRIDE; + void take_focus() FL_OVERRIDE; + void flush() FL_OVERRIDE; + void flush_overlay() FL_OVERRIDE; + void draw_end() FL_OVERRIDE; + void make_current() FL_OVERRIDE; + void show() FL_OVERRIDE; + void resize(int X,int Y,int W,int H) FL_OVERRIDE; + void label(const char *name, const char *mininame) FL_OVERRIDE; + void destroy_double_buffer() FL_OVERRIDE; + void hide() FL_OVERRIDE; + void map() FL_OVERRIDE; + void unmap() FL_OVERRIDE; + void fullscreen_on() FL_OVERRIDE; + void fullscreen_off(int X, int Y, int W, int H) FL_OVERRIDE; + void use_border() FL_OVERRIDE; + void size_range() FL_OVERRIDE; + void iconize() FL_OVERRIDE; + void decoration_sizes(int *top, int *left, int *right, int *bottom) FL_OVERRIDE; // --- window cursor stuff - virtual int set_cursor(Fl_Cursor); - virtual int set_cursor(const Fl_RGB_Image*, int, int); + int set_cursor(Fl_Cursor) FL_OVERRIDE; + int set_cursor(const Fl_RGB_Image*, int, int) FL_OVERRIDE; - virtual void shape(const Fl_Image* img); - virtual void capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right); - virtual int scroll(int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, void (*draw_area)(void*, int,int,int,int), void* data); - virtual void wait_for_expose(); - virtual void reposition_menu_window(int x, int y); - virtual void menu_window_area(int &X, int &Y, int &W, int &H, int nscreen = -1); + void shape(const Fl_Image* img) FL_OVERRIDE; + void capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right) FL_OVERRIDE; + int scroll(int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, void (*draw_area)(void*, int,int,int,int), void* data) FL_OVERRIDE; + void wait_for_expose() FL_OVERRIDE; + void reposition_menu_window(int x, int y) FL_OVERRIDE; + void menu_window_area(int &X, int &Y, int &W, int &H, int nscreen = -1) FL_OVERRIDE; }; diff --git a/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.H index 6934fec15..62aab946a 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.H @@ -34,32 +34,32 @@ Consequently, FL_DOUBLE is enforced in all Fl_Gl_Window::mode_ values under Wayl class Fl_WinAPI_Gl_Window_Driver : public Fl_Gl_Window_Driver { friend Fl_Gl_Window_Driver* Fl_Gl_Window_Driver::newGlWindowDriver(Fl_Gl_Window *); Fl_WinAPI_Gl_Window_Driver(Fl_Gl_Window *win) : Fl_Gl_Window_Driver(win) {} - virtual float pixels_per_unit(); - virtual int mode_(int m, const int *a); - virtual void make_current_after(); - virtual void swap_buffers(); - virtual void invalidate() {} - virtual int flush_begin(char& valid_f); - virtual Fl_Gl_Choice *find(int m, const int *alistp); - virtual GLContext create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g); + float pixels_per_unit() FL_OVERRIDE; + int mode_(int m, const int *a) FL_OVERRIDE; + void make_current_after() FL_OVERRIDE; + void swap_buffers() FL_OVERRIDE; + void invalidate() FL_OVERRIDE {} + int flush_begin(char& valid_f) FL_OVERRIDE; + Fl_Gl_Choice *find(int m, const int *alistp) FL_OVERRIDE; + GLContext create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g) FL_OVERRIDE; GLContext do_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int layer); - virtual void set_gl_context(Fl_Window* w, GLContext context); - virtual void delete_gl_context(GLContext); - virtual void make_overlay_current(); - virtual void redraw_overlay(); - virtual void* GetProcAddress(const char *procName); - virtual void draw_string_legacy(const char* str, int n); - virtual void gl_bitmap_font(Fl_Font_Descriptor *fl_fontsize); - virtual void get_list(Fl_Font_Descriptor *fd, int r); - virtual int genlistsize(); - virtual void switch_to_GL1(); - virtual void switch_back(); + void set_gl_context(Fl_Window* w, GLContext context) FL_OVERRIDE; + void delete_gl_context(GLContext) FL_OVERRIDE; + void make_overlay_current() FL_OVERRIDE; + void redraw_overlay() FL_OVERRIDE; + void* GetProcAddress(const char *procName) FL_OVERRIDE; + void draw_string_legacy(const char* str, int n) FL_OVERRIDE; + void gl_bitmap_font(Fl_Font_Descriptor *fl_fontsize) FL_OVERRIDE; + void get_list(Fl_Font_Descriptor *fd, int r) FL_OVERRIDE; + int genlistsize() FL_OVERRIDE; + void switch_to_GL1() FL_OVERRIDE; + void switch_back() FL_OVERRIDE; #if HAVE_GL_OVERLAY - virtual void gl_hide_before(void *& overlay); - virtual int can_do_overlay(); - virtual int overlay_color(Fl_Color i); - void make_overlay(void*&overlay); + void gl_hide_before(void *& overlay) FL_OVERRIDE; + int can_do_overlay() FL_OVERRIDE; + int overlay_color(Fl_Color i) FL_OVERRIDE; + void make_overlay(void*&overlay) FL_OVERRIDE; #endif }; diff --git a/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx index 56b3c6d4b..2e59f124c 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx @@ -36,18 +36,18 @@ private: int top_margin; void absolute_printable_rect(int *x, int *y, int *w, int *h); Fl_WinAPI_Printer_Driver(void); - int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL); - int begin_page (void); - int printable_rect(int *w, int *h); - void margins(int *left, int *top, int *right, int *bottom); - void origin(int *x, int *y); - void origin(int x, int y); - void scale (float scale_x, float scale_y = 0.); - void rotate(float angle); - void translate(int x, int y); - void untranslate(void); - int end_page (void); - void end_job (void); + int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL) FL_OVERRIDE; + int begin_page (void) FL_OVERRIDE; + int printable_rect(int *w, int *h) FL_OVERRIDE; + void margins(int *left, int *top, int *right, int *bottom) FL_OVERRIDE; + void origin(int *x, int *y) FL_OVERRIDE; + void origin(int x, int y) FL_OVERRIDE; + void scale (float scale_x, float scale_y = 0.) FL_OVERRIDE; + void rotate(float angle) FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate(void) FL_OVERRIDE; + int end_page (void) FL_OVERRIDE; + void end_job (void) FL_OVERRIDE; ~Fl_WinAPI_Printer_Driver(void); }; diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H index 899b2cf3f..3bb5e11a6 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H @@ -45,58 +45,58 @@ public: for (int i = 0; i < MAX_SCREENS; i++) scale_of_screen[i] = 1; } // --- display management - virtual int visual(int flags); + int visual(int flags) FL_OVERRIDE; // --- screen configuration - virtual void init(); - virtual int x(); - virtual int y(); - virtual int w(); - virtual int h(); - virtual void screen_xywh(int &X, int &Y, int &W, int &H, int n); + void init() FL_OVERRIDE; + int x() FL_OVERRIDE; + int y() FL_OVERRIDE; + int w() FL_OVERRIDE; + int h() FL_OVERRIDE; + void screen_xywh(int &X, int &Y, int &W, int &H, int n) FL_OVERRIDE; void screen_xywh_unscaled(int &X, int &Y, int &W, int &H, int n); - virtual void screen_dpi(float &h, float &v, int n=0); + void screen_dpi(float &h, float &v, int n=0) FL_OVERRIDE; int screen_num_unscaled(int x, int y); - virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n); + void screen_work_area(int &X, int &Y, int &W, int &H, int n) FL_OVERRIDE; // --- audible output - virtual void beep(int type); + void beep(int type) FL_OVERRIDE; // --- global events - virtual void flush(); - virtual void grab(Fl_Window* win); + void flush() FL_OVERRIDE; + void grab(Fl_Window* win) FL_OVERRIDE; // --- global colors - virtual void get_system_colors(); - virtual int dnd(int unused); - virtual int compose(int &del); - virtual Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win, bool may_capture_subwins, bool *did_capture_subwins); + void get_system_colors() FL_OVERRIDE; + int dnd(int unused) FL_OVERRIDE; + int compose(int &del) FL_OVERRIDE; + Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win, bool may_capture_subwins, bool *did_capture_subwins) FL_OVERRIDE; Fl_RGB_Image *read_win_rectangle_unscaled(int X, int Y, int w, int h, Fl_Window *win); - virtual int get_mouse(int &x, int &y); - virtual void enable_im(); - virtual void disable_im(); - virtual void open_display_platform(); - virtual void offscreen_size(Fl_Offscreen off, int &width, int &height); - virtual APP_SCALING_CAPABILITY rescalable() { + int get_mouse(int &x, int &y) FL_OVERRIDE; + void enable_im() FL_OVERRIDE; + void disable_im() FL_OVERRIDE; + void open_display_platform() FL_OVERRIDE; + void offscreen_size(Fl_Offscreen off, int &width, int &height) FL_OVERRIDE; + APP_SCALING_CAPABILITY rescalable() FL_OVERRIDE { return PER_SCREEN_APP_SCALING; } - virtual float scale(int n) { + float scale(int n) FL_OVERRIDE { return scale_of_screen[n]; } - virtual void scale(int n, float f) { + void scale(int n, float f) FL_OVERRIDE { scale_of_screen[n] = f; } - virtual void desktop_scale_factor(); - virtual void default_icons(const Fl_RGB_Image *icons[], int count); + void desktop_scale_factor() FL_OVERRIDE; + void default_icons(const Fl_RGB_Image *icons[], int count) FL_OVERRIDE; // this one is implemented in Fl_win32.cxx - virtual void copy(const char *stuff, int len, int clipboard, const char *type); + void copy(const char *stuff, int len, int clipboard, const char *type) FL_OVERRIDE; // this one is implemented in Fl_win32.cxx - virtual void paste(Fl_Widget &receiver, int clipboard, const char *type); + void paste(Fl_Widget &receiver, int clipboard, const char *type) FL_OVERRIDE; // this one is implemented in Fl_win32.cxx - virtual int clipboard_contains(const char *type); + int clipboard_contains(const char *type) FL_OVERRIDE; // this one is implemented in Fl_win32.cxx - virtual void clipboard_notify_change(); + void clipboard_notify_change() FL_OVERRIDE; // this one is implemented in Fl_win32.cxx - void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win); + void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win) FL_OVERRIDE; // these two are implemented in Fl_get_key_win32.cxx - virtual int event_key(int); - virtual int get_key(int); + int event_key(int) FL_OVERRIDE; + int get_key(int) FL_OVERRIDE; }; diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H index e6e7f5cf9..10047b632 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H @@ -41,80 +41,80 @@ class Fl_WinAPI_System_Driver : public Fl_System_Driver { public: - virtual void warning(const char *format, va_list args); - virtual void error(const char *format, va_list args); - virtual void fatal(const char *format, va_list args); - virtual char *utf2mbcs(const char *s); - virtual char *getenv(const char *var); - virtual int putenv(const char *var); - virtual int open(const char *fnam, int oflags, int pmode); - virtual int open_ext(const char *fnam, int binary, int oflags, int pmode); - virtual FILE *fopen(const char *fnam, const char *mode); - virtual int system(const char *cmd); - virtual int execvp(const char *file, char *const *argv); - virtual int chmod(const char *fnam, int mode); - virtual int access(const char *fnam, int mode); - virtual int flstat(const char *fnam, struct stat *b); - virtual char *getcwd(char *b, int l); - virtual int chdir(const char *path); - virtual int unlink(const char *fnam); - virtual int mkdir(const char *fnam, int mode); - virtual int rmdir(const char *fnam); - virtual int rename(const char *fnam, const char *newnam); - virtual unsigned utf8towc(const char *src, unsigned srclen, wchar_t* dst, unsigned dstlen); - virtual unsigned utf8fromwc(char *dst, unsigned dstlen, const wchar_t* src, unsigned srclen); - virtual int utf8locale(); - virtual unsigned utf8to_mb(const char *src, unsigned srclen, char *dst, unsigned dstlen); - virtual unsigned utf8from_mb(char *dst, unsigned dstlen, const char *src, unsigned srclen); - virtual int clocale_vprintf(FILE *output, const char *format, va_list args); - virtual int clocale_vsnprintf(char *output, size_t output_size, const char *format, va_list args); - virtual int clocale_vsscanf(const char *input, const char *format, va_list args); - virtual int filename_list(const char *d, dirent ***list, + void warning(const char *format, va_list args) FL_OVERRIDE; + void error(const char *format, va_list args) FL_OVERRIDE; + void fatal(const char *format, va_list args) FL_OVERRIDE; + char *utf2mbcs(const char *s) FL_OVERRIDE; + char *getenv(const char *var) FL_OVERRIDE; + int putenv(const char *var) FL_OVERRIDE; + int open(const char *fnam, int oflags, int pmode) FL_OVERRIDE; + int open_ext(const char *fnam, int binary, int oflags, int pmode) FL_OVERRIDE; + FILE *fopen(const char *fnam, const char *mode) FL_OVERRIDE; + int system(const char *cmd) FL_OVERRIDE; + int execvp(const char *file, char *const *argv) FL_OVERRIDE; + int chmod(const char *fnam, int mode) FL_OVERRIDE; + int access(const char *fnam, int mode) FL_OVERRIDE; + int flstat(const char *fnam, struct stat *b) FL_OVERRIDE; + char *getcwd(char *b, int l) FL_OVERRIDE; + int chdir(const char *path) FL_OVERRIDE; + int unlink(const char *fnam) FL_OVERRIDE; + int mkdir(const char *fnam, int mode) FL_OVERRIDE; + int rmdir(const char *fnam) FL_OVERRIDE; + int rename(const char *fnam, const char *newnam) FL_OVERRIDE; + unsigned utf8towc(const char *src, unsigned srclen, wchar_t* dst, unsigned dstlen) FL_OVERRIDE; + unsigned utf8fromwc(char *dst, unsigned dstlen, const wchar_t* src, unsigned srclen) FL_OVERRIDE; + int utf8locale() FL_OVERRIDE; + unsigned utf8to_mb(const char *src, unsigned srclen, char *dst, unsigned dstlen) FL_OVERRIDE; + unsigned utf8from_mb(char *dst, unsigned dstlen, const char *src, unsigned srclen) FL_OVERRIDE; + int clocale_vprintf(FILE *output, const char *format, va_list args) FL_OVERRIDE; + int clocale_vsnprintf(char *output, size_t output_size, const char *format, va_list args) FL_OVERRIDE; + int clocale_vsscanf(const char *input, const char *format, va_list args) FL_OVERRIDE; + int filename_list(const char *d, dirent ***list, int (*sort)(struct dirent **, struct dirent **), - char *errmsg=NULL, int errmsg_sz=0); - virtual int filename_expand(char *to,int tolen, const char *from); - virtual int filename_relative(char *to, int tolen, const char *from, const char *base); - virtual int filename_absolute(char *to, int tolen, const char *from); - virtual int filename_isdir(const char *n); - virtual int filename_isdir_quick(const char *n); - virtual const char *filename_ext(const char *buf); - virtual int open_uri(const char *uri, char *msg, int msglen); - virtual int use_recent_tooltip_fix() {return 1;} - virtual int file_browser_load_filesystem(Fl_File_Browser *browser, char *filename, int lname, Fl_File_Icon *icon); - virtual int file_browser_load_directory(const char *directory, char *filename, size_t name_size, + char *errmsg=NULL, int errmsg_sz=0) FL_OVERRIDE; + int filename_expand(char *to,int tolen, const char *from) FL_OVERRIDE; + int filename_relative(char *to, int tolen, const char *from, const char *base) FL_OVERRIDE; + int filename_absolute(char *to, int tolen, const char *from) FL_OVERRIDE; + int filename_isdir(const char *n) FL_OVERRIDE; + int filename_isdir_quick(const char *n) FL_OVERRIDE; + const char *filename_ext(const char *buf) FL_OVERRIDE; + int open_uri(const char *uri, char *msg, int msglen) FL_OVERRIDE; + int use_recent_tooltip_fix() FL_OVERRIDE {return 1;} + int file_browser_load_filesystem(Fl_File_Browser *browser, char *filename, int lname, Fl_File_Icon *icon) FL_OVERRIDE; + int file_browser_load_directory(const char *directory, char *filename, size_t name_size, dirent ***pfiles, Fl_File_Sort_F *sort, - char *errmsg=NULL, int errmsg_sz=0); - virtual void newUUID(char *uuidBuffer); - virtual char *preference_rootnode(Fl_Preferences *prefs, Fl_Preferences::Root root, const char *vendor, - const char *application); - virtual void *load(const char *filename); - virtual void png_extra_rgba_processing(unsigned char *array, int w, int h); - virtual const char *next_dir_sep(const char *start); + char *errmsg=NULL, int errmsg_sz=0) FL_OVERRIDE; + void newUUID(char *uuidBuffer) FL_OVERRIDE; + char *preference_rootnode(Fl_Preferences *prefs, Fl_Preferences::Root root, const char *vendor, + const char *application) FL_OVERRIDE; + void *load(const char *filename) FL_OVERRIDE; + void png_extra_rgba_processing(unsigned char *array, int w, int h) FL_OVERRIDE; + const char *next_dir_sep(const char *start) FL_OVERRIDE; // these 3 are implemented in Fl_lock.cxx - virtual void awake(void*); - virtual int lock(); - virtual void unlock(); + void awake(void*) FL_OVERRIDE; + int lock() FL_OVERRIDE; + void unlock() FL_OVERRIDE; // this one is implemented in Fl_win32.cxx - virtual void* thread_message(); - virtual int file_type(const char *filename); - virtual const char *home_directory_name(); - virtual const char *filesystems_label() { return "My Computer"; } - virtual int backslash_as_slash() {return 1;} - virtual int colon_is_drive() {return 1;} - virtual int case_insensitive_filenames() {return 1;} + void* thread_message() FL_OVERRIDE; + int file_type(const char *filename) FL_OVERRIDE; + const char *home_directory_name() FL_OVERRIDE; + const char *filesystems_label() FL_OVERRIDE { return "My Computer"; } + int backslash_as_slash() FL_OVERRIDE {return 1;} + int colon_is_drive() FL_OVERRIDE {return 1;} + int case_insensitive_filenames() FL_OVERRIDE {return 1;} // this one is implemented in Fl_win32.cxx - virtual const char *filename_name(const char *buf); - virtual void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0); - virtual void add_fd(int fd, Fl_FD_Handler cb, void* = 0); - virtual void remove_fd(int, int when); - virtual void remove_fd(int); - virtual void gettime(time_t *sec, int *usec); - virtual char* strdup(const char *s) { return ::_strdup(s); } - virtual void lock_ring(); - virtual void unlock_ring(); - virtual double wait(double time_to_wait); - virtual int ready(); - virtual int close_fd(int fd); + const char *filename_name(const char *buf) FL_OVERRIDE; + void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0) FL_OVERRIDE; + void add_fd(int fd, Fl_FD_Handler cb, void* = 0) FL_OVERRIDE; + void remove_fd(int, int when) FL_OVERRIDE; + void remove_fd(int) FL_OVERRIDE; + void gettime(time_t *sec, int *usec) FL_OVERRIDE; + char* strdup(const char *s) FL_OVERRIDE { return ::_strdup(s); } + void lock_ring() FL_OVERRIDE; + void unlock_ring() FL_OVERRIDE; + double wait(double time_to_wait) FL_OVERRIDE; + int ready() FL_OVERRIDE; + int close_fd(int fd) FL_OVERRIDE; }; #endif // FL_WINAPI_SYSTEM_DRIVER_H diff --git a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.H index afc8cc39b..bc834b48c 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.H @@ -60,7 +60,7 @@ class Fl_WinAPI_Window_Driver : public Fl_Window_Driver } *shape_data_; private: void shape_bitmap_(Fl_Image* b); - void shape_alpha_(Fl_Image* img, int offset); + void shape_alpha_(Fl_Image* img, int offset) FL_OVERRIDE; public: Fl_WinAPI_Window_Driver(Fl_Window*); ~Fl_WinAPI_Window_Driver(); @@ -80,43 +80,43 @@ public: int fake_X_wm(int &X, int &Y, int &bt, int &bx, int &by, DWORD style = 0, DWORD styleEx = 0); void make_fullscreen(int X, int Y, int W, int H); // --- window data - virtual int decorated_w(); - virtual int decorated_h(); - virtual const Fl_Image* shape(); + int decorated_w() FL_OVERRIDE; + int decorated_h() FL_OVERRIDE; + const Fl_Image* shape() FL_OVERRIDE; // --- window management - virtual Fl_X *makeWindow(); - virtual void size_range() { + Fl_X *makeWindow() FL_OVERRIDE; + void size_range() FL_OVERRIDE { // currently nothing to do } - virtual void flush_double(); - virtual void flush_overlay(); - virtual void draw_begin(); - virtual void make_current(); - virtual void show(); - virtual void label(const char *name,const char *iname); - virtual void resize(int X,int Y,int W,int H); - virtual void hide(); - virtual void map(); - virtual void unmap(); - virtual void fullscreen_on(); - virtual void fullscreen_off(int X, int Y, int W, int H); - virtual void iconize(); - virtual void decoration_sizes(int *top, int *left, int *right, int *bottom); + void flush_double() FL_OVERRIDE; + void flush_overlay() FL_OVERRIDE; + void draw_begin() FL_OVERRIDE; + void make_current() FL_OVERRIDE; + void show() FL_OVERRIDE; + void label(const char *name,const char *iname) FL_OVERRIDE; + void resize(int X,int Y,int W,int H) FL_OVERRIDE; + void hide() FL_OVERRIDE; + void map() FL_OVERRIDE; + void unmap() FL_OVERRIDE; + void fullscreen_on() FL_OVERRIDE; + void fullscreen_off(int X, int Y, int W, int H) FL_OVERRIDE; + void iconize() FL_OVERRIDE; + void decoration_sizes(int *top, int *left, int *right, int *bottom) FL_OVERRIDE; // --- window cursor stuff - virtual int set_cursor(Fl_Cursor); - virtual int set_cursor(const Fl_RGB_Image*, int, int); + int set_cursor(Fl_Cursor) FL_OVERRIDE; + int set_cursor(const Fl_RGB_Image*, int, int) FL_OVERRIDE; - virtual void shape(const Fl_Image* img); - virtual void icons(const Fl_RGB_Image *icons[], int count); - virtual const void *icon() const; - virtual void icon(const void * ic); - virtual void free_icons(); + void shape(const Fl_Image* img) FL_OVERRIDE; + void icons(const Fl_RGB_Image *icons[], int count) FL_OVERRIDE; + const void *icon() const FL_OVERRIDE; + void icon(const void * ic) FL_OVERRIDE; + void free_icons() FL_OVERRIDE; void set_icons(); // driver-internal support function // this one is implemented in Fl_win32.cxx - virtual void capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right); - virtual int scroll(int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, - void (*draw_area)(void*, int,int,int,int), void* data); + void capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right) FL_OVERRIDE; + int scroll(int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, + void (*draw_area)(void*, int,int,int,int), void* data) FL_OVERRIDE; static void resize_after_screen_change(void *data); }; diff --git a/src/drivers/X11/Fl_X11_Gl_Window_Driver.H b/src/drivers/X11/Fl_X11_Gl_Window_Driver.H index 72c4af1e5..026f3ec4a 100644 --- a/src/drivers/X11/Fl_X11_Gl_Window_Driver.H +++ b/src/drivers/X11/Fl_X11_Gl_Window_Driver.H @@ -27,26 +27,26 @@ class Fl_Gl_Choice; class Fl_X11_Gl_Window_Driver : public Fl_Gl_Window_Driver { friend Fl_Gl_Window_Driver* Fl_Gl_Window_Driver::newGlWindowDriver(Fl_Gl_Window *); Fl_X11_Gl_Window_Driver(Fl_Gl_Window *win) : Fl_Gl_Window_Driver(win) {} - virtual float pixels_per_unit(); - virtual void before_show(int& need_after); - virtual int mode_(int m, const int *a); - virtual void swap_buffers(); - virtual char swap_type(); - virtual Fl_Gl_Choice *find(int m, const int *alistp); - virtual GLContext create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g); - virtual void set_gl_context(Fl_Window* w, GLContext context); - virtual void delete_gl_context(GLContext); - virtual void make_overlay_current(); - virtual void redraw_overlay(); - virtual void waitGL(); - virtual void gl_visual(Fl_Gl_Choice*); // support for Fl::gl_visual() - virtual void gl_start(); - virtual void draw_string_legacy(const char* str, int n); - virtual void gl_bitmap_font(Fl_Font_Descriptor *fl_fontsize); - virtual void get_list(Fl_Font_Descriptor *fd, int r); - virtual int genlistsize(); + float pixels_per_unit() FL_OVERRIDE; + void before_show(int& need_after) FL_OVERRIDE; + int mode_(int m, const int *a) FL_OVERRIDE; + void swap_buffers() FL_OVERRIDE; + char swap_type() FL_OVERRIDE; + Fl_Gl_Choice *find(int m, const int *alistp) FL_OVERRIDE; + GLContext create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g) FL_OVERRIDE; + void set_gl_context(Fl_Window* w, GLContext context) FL_OVERRIDE; + void delete_gl_context(GLContext) FL_OVERRIDE; + void make_overlay_current() FL_OVERRIDE; + void redraw_overlay() FL_OVERRIDE; + void waitGL() FL_OVERRIDE; + void gl_visual(Fl_Gl_Choice*) FL_OVERRIDE; // support for Fl::gl_visual() + void gl_start() FL_OVERRIDE; + void draw_string_legacy(const char* str, int n) FL_OVERRIDE; + void gl_bitmap_font(Fl_Font_Descriptor *fl_fontsize) FL_OVERRIDE; + void get_list(Fl_Font_Descriptor *fd, int r) FL_OVERRIDE; + int genlistsize() FL_OVERRIDE; #if !USE_XFT - virtual Fl_Font_Descriptor** fontnum_to_fontdescriptor(int fnum); + virtual Fl_Font_Descriptor** fontnum_to_fontdescriptor(int fnum) FL_OVERRIDE; #endif //static GLContext create_gl_context(XVisualInfo* vis); }; diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.H b/src/drivers/X11/Fl_X11_Screen_Driver.H index 5ff64ccad..17826a94d 100644 --- a/src/drivers/X11/Fl_X11_Screen_Driver.H +++ b/src/drivers/X11/Fl_X11_Screen_Driver.H @@ -51,10 +51,10 @@ protected: public: #if USE_XFT // scaling does not work without Xft float current_xft_dpi; // current value of the Xft.dpi X resource - virtual APP_SCALING_CAPABILITY rescalable() { return PER_SCREEN_APP_SCALING; } - virtual float scale(int n) {return screens[n].scale;} - virtual void scale(int n, float f) { screens[n].scale = f;} - virtual void desktop_scale_factor(); + APP_SCALING_CAPABILITY rescalable() FL_OVERRIDE { return PER_SCREEN_APP_SCALING; } + float scale(int n) FL_OVERRIDE {return screens[n].scale;} + void scale(int n, float f) FL_OVERRIDE { screens[n].scale = f;} + void desktop_scale_factor() FL_OVERRIDE; int screen_num_unscaled(int x, int y); #endif @@ -62,57 +62,57 @@ public: static int ewmh_supported(); static void copy_image(const unsigned char* data, int W, int H, int destination); // --- display management - virtual void display(const char *disp); - virtual int XParseGeometry(const char*, int*, int*, unsigned int*, unsigned int*); - virtual int poll_or_select_with_delay(double time_to_wait); - virtual int poll_or_select(); - virtual void own_colormap(); - virtual const char *shortcut_add_key_name(unsigned key, char *p, char *buf, const char **); - virtual int need_menu_handle_part1_extra() {return 1;} - virtual int need_menu_handle_part2() {return 1;} + void display(const char *disp) FL_OVERRIDE; + int XParseGeometry(const char*, int*, int*, unsigned int*, unsigned int*) FL_OVERRIDE; + int poll_or_select_with_delay(double time_to_wait) FL_OVERRIDE; + int poll_or_select() FL_OVERRIDE; + void own_colormap() FL_OVERRIDE; + const char *shortcut_add_key_name(unsigned key, char *p, char *buf, const char **) FL_OVERRIDE; + int need_menu_handle_part1_extra() FL_OVERRIDE {return 1;} + int need_menu_handle_part2() FL_OVERRIDE {return 1;} // these 2 are in Fl_get_key.cxx - virtual int event_key(int); - virtual int get_key(int); - virtual int visual(int flags); + int event_key(int) FL_OVERRIDE; + int get_key(int) FL_OVERRIDE; + int visual(int flags) FL_OVERRIDE; // --- screen configuration void init_workarea(); - virtual void init(); - virtual int x(); - virtual int y(); - virtual int w(); - virtual int h(); - virtual void screen_xywh(int &X, int &Y, int &W, int &H, int n); - virtual void screen_dpi(float &h, float &v, int n=0); - virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n); + void init() FL_OVERRIDE; + int x() FL_OVERRIDE; + int y() FL_OVERRIDE; + int w() FL_OVERRIDE; + int h() FL_OVERRIDE; + void screen_xywh(int &X, int &Y, int &W, int &H, int n) FL_OVERRIDE; + void screen_dpi(float &h, float &v, int n=0) FL_OVERRIDE; + void screen_work_area(int &X, int &Y, int &W, int &H, int n) FL_OVERRIDE; // --- audible output - virtual void beep(int type); + void beep(int type) FL_OVERRIDE; // --- global events - virtual void flush(); - virtual void grab(Fl_Window* win); + void flush() FL_OVERRIDE; + void grab(Fl_Window* win) FL_OVERRIDE; // --- global colors - virtual int parse_color(const char* p, uchar& r, uchar& g, uchar& b); - virtual void get_system_colors(); - virtual const char *get_system_scheme(); - virtual int dnd(int unused); - virtual int compose(int &del); - virtual void compose_reset(); - virtual int text_display_can_leak() const; - virtual Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win, bool may_capture_subwins, bool *did_capture_subwins); - virtual int get_mouse(int &x, int &y); + int parse_color(const char* p, uchar& r, uchar& g, uchar& b) FL_OVERRIDE; + void get_system_colors() FL_OVERRIDE; + const char *get_system_scheme() FL_OVERRIDE; + int dnd(int unused) FL_OVERRIDE; + int compose(int &del) FL_OVERRIDE; + void compose_reset() FL_OVERRIDE; + int text_display_can_leak() const FL_OVERRIDE; + Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win, bool may_capture_subwins, bool *did_capture_subwins) FL_OVERRIDE; + int get_mouse(int &x, int &y) FL_OVERRIDE; - virtual void open_display_platform(); - virtual void close_display(); + void open_display_platform() FL_OVERRIDE; + void close_display() FL_OVERRIDE; // --- compute dimensions of an Fl_Offscreen - virtual void offscreen_size(Fl_Offscreen o, int &width, int &height); - virtual void default_icons(const Fl_RGB_Image *icons[], int count); + void offscreen_size(Fl_Offscreen o, int &width, int &height) FL_OVERRIDE; + void default_icons(const Fl_RGB_Image *icons[], int count) FL_OVERRIDE; // this one is in Fl_x.cxx - virtual void copy(const char *stuff, int len, int clipboard, const char *type); + void copy(const char *stuff, int len, int clipboard, const char *type) FL_OVERRIDE; // this one is in Fl_x.cxx - virtual void paste(Fl_Widget &receiver, int clipboard, const char *type); + void paste(Fl_Widget &receiver, int clipboard, const char *type) FL_OVERRIDE; // this one is in Fl_x.cxx - virtual int clipboard_contains(const char *type); + int clipboard_contains(const char *type) FL_OVERRIDE; // this one is in Fl_x.cxx - virtual void clipboard_notify_change(); + void clipboard_notify_change() FL_OVERRIDE; // for support of input methods static char fl_is_over_the_spot; static XRectangle fl_spot; @@ -125,11 +125,11 @@ public: static void xim_activate(Window xid); static void xim_deactivate(void); static void init_xim(); - virtual void enable_im(); - virtual void disable_im(); - virtual void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win); - virtual void reset_spot(); - virtual void set_status(int X, int Y, int W, int H); + void enable_im() FL_OVERRIDE; + void disable_im() FL_OVERRIDE; + void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win) FL_OVERRIDE; + void reset_spot() FL_OVERRIDE; + void set_status(int X, int Y, int W, int H) FL_OVERRIDE; }; diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx index 2a5239eae..9e3465f13 100644 --- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx @@ -48,7 +48,7 @@ extern Atom fl_NET_WORKAREA; -// these are set by Fl::args() and override any system colors: from Fl_get_system_colors.cxx +// these are set by Fl::args() and FL_OVERRIDE any system colors: from Fl_get_system_colors.cxx extern const char *fl_fg; extern const char *fl_bg; extern const char *fl_bg2; diff --git a/src/drivers/X11/Fl_X11_Window_Driver.H b/src/drivers/X11/Fl_X11_Window_Driver.H index a2a19d12c..6cb54dd95 100644 --- a/src/drivers/X11/Fl_X11_Window_Driver.H +++ b/src/drivers/X11/Fl_X11_Window_Driver.H @@ -80,59 +80,59 @@ private: void decorated_win_size(int &w, int &h); void combine_mask(); void shape_bitmap_(Fl_Image* b); - void shape_alpha_(Fl_Image* img, int offset); + void shape_alpha_(Fl_Image* img, int offset) FL_OVERRIDE; void flush_double(int erase_overlay); void sendxjunk(); void activate_window(); public: Fl_X11_Window_Driver(Fl_Window*); - virtual ~Fl_X11_Window_Driver(); + ~Fl_X11_Window_Driver() FL_OVERRIDE; static inline Fl_X11_Window_Driver* driver(const Fl_Window *w) {return (Fl_X11_Window_Driver*)Fl_Window_Driver::driver(w);} #if USE_XFT static void resize_after_screen_change(void *data); #endif // USE_XFT // --- window data - virtual int decorated_w(); - virtual int decorated_h(); - virtual const Fl_Image* shape(); + int decorated_w() FL_OVERRIDE; + int decorated_h() FL_OVERRIDE; + const Fl_Image* shape() FL_OVERRIDE; // --- window management - virtual Fl_X *makeWindow(); - virtual void take_focus(); - virtual void flush_double(); - virtual void flush_overlay(); - virtual void draw_begin(); - virtual void make_current(); - virtual void show(); - virtual void resize(int X,int Y,int W,int H); - virtual void label(const char *name, const char *mininame); - virtual void destroy_double_buffer(); - virtual void hide(); - virtual void map(); - virtual void unmap(); - virtual void fullscreen_on(); - virtual void fullscreen_off(int X, int Y, int W, int H); - virtual void use_border(); - virtual void size_range(); - virtual void iconize(); - virtual void decoration_sizes(int *top, int *left, int *right, int *bottom); - virtual void show_with_args_begin(); - virtual void show_with_args_end(int argc, char **argv); + Fl_X *makeWindow() FL_OVERRIDE; + void take_focus() FL_OVERRIDE; + void flush_double() FL_OVERRIDE; + void flush_overlay() FL_OVERRIDE; + void draw_begin() FL_OVERRIDE; + void make_current() FL_OVERRIDE; + void show() FL_OVERRIDE; + void resize(int X,int Y,int W,int H) FL_OVERRIDE; + void label(const char *name, const char *mininame) FL_OVERRIDE; + void destroy_double_buffer() FL_OVERRIDE; + void hide() FL_OVERRIDE; + void map() FL_OVERRIDE; + void unmap() FL_OVERRIDE; + void fullscreen_on() FL_OVERRIDE; + void fullscreen_off(int X, int Y, int W, int H) FL_OVERRIDE; + void use_border() FL_OVERRIDE; + void size_range() FL_OVERRIDE; + void iconize() FL_OVERRIDE; + void decoration_sizes(int *top, int *left, int *right, int *bottom) FL_OVERRIDE; + void show_with_args_begin() FL_OVERRIDE; + void show_with_args_end(int argc, char **argv) FL_OVERRIDE; // --- window cursor stuff - virtual int set_cursor(Fl_Cursor); - virtual int set_cursor(const Fl_RGB_Image*, int, int); + int set_cursor(Fl_Cursor) FL_OVERRIDE; + int set_cursor(const Fl_RGB_Image*, int, int) FL_OVERRIDE; - virtual void shape(const Fl_Image* img); - virtual void icons(const Fl_RGB_Image *icons[], int count); - virtual const void *icon() const; - virtual void icon(const void * ic); - virtual void free_icons(); + void shape(const Fl_Image* img) FL_OVERRIDE; + void icons(const Fl_RGB_Image *icons[], int count) FL_OVERRIDE; + const void *icon() const FL_OVERRIDE; + void icon(const void * ic) FL_OVERRIDE; + void free_icons() FL_OVERRIDE; void set_icons(); // driver-internal support function - virtual void capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right); - virtual int scroll(int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, void (*draw_area)(void*, int,int,int,int), void* data); - virtual fl_uintptr_t os_id(); + void capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right) FL_OVERRIDE; + int scroll(int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, void (*draw_area)(void*, int,int,int,int), void* data) FL_OVERRIDE; + fl_uintptr_t os_id() FL_OVERRIDE; }; diff --git a/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.H b/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.H index e67447b4d..2932a3f1c 100644 --- a/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.H +++ b/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.H @@ -25,15 +25,15 @@ class Fl_Xlib_Copy_Surface_Driver : public Fl_Copy_Surface_Driver { friend class Fl_Copy_Surface_Driver; - virtual void end_current(); + void end_current() FL_OVERRIDE; protected: Fl_Offscreen xid; Window oldwindow; Fl_Xlib_Copy_Surface_Driver(int w, int h); ~Fl_Xlib_Copy_Surface_Driver(); - void set_current(); - void translate(int x, int y); - void untranslate(); + void set_current() FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; #if FLTK_USE_CAIRO cairo_t *cairo_; #endif diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H index 016ace499..6142217d5 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H @@ -57,26 +57,26 @@ private: unsigned depth_; // depth of translation stack int stack_x_[FL_XLIB_GRAPHICS_TRANSLATION_STACK_SIZE]; // translation stack allowing cumulative translations int stack_y_[FL_XLIB_GRAPHICS_TRANSLATION_STACK_SIZE]; - virtual void set_current_(); + void set_current_() FL_OVERRIDE; int clip_max_; // +/- x/y coordinate limit (16-bit coordinate space) - virtual void draw_fixed(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - virtual void draw_fixed(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - virtual void draw_fixed(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy); + void draw_fixed(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_fixed(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_fixed(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; #if USE_PANGO double do_width_unscaled_(const char *str, int n); #endif protected: - virtual void draw_image_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); - virtual void draw_image_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); - virtual void draw_image_mono_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0); - virtual void draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); + void draw_image_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0) FL_OVERRIDE; + void draw_image_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3) FL_OVERRIDE; + void draw_image_mono_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0) FL_OVERRIDE; + void draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1) FL_OVERRIDE; #if HAVE_XRENDER - virtual void draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy); + void draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; int scale_and_render_pixmap(Fl_Offscreen pixmap, int depth, double scale_x, double scale_y, int XP, int YP, int WP, int HP); #endif - virtual int height_unscaled(); - virtual int descent_unscaled(); - virtual Fl_Region scale_clip(float f); + int height_unscaled() FL_OVERRIDE; + int descent_unscaled() FL_OVERRIDE; + Fl_Region scale_clip(float f) FL_OVERRIDE; #if USE_XFT void drawUCS4(const void *str, int n, int x, int y); #endif @@ -95,24 +95,24 @@ private: #endif static GC gc_; uchar *mask_bitmap_; - uchar **mask_bitmap() {return &mask_bitmap_;} + uchar **mask_bitmap() FL_OVERRIDE {return &mask_bitmap_;} XPoint *short_point; #if USE_XFT static Window draw_window; static struct _XftDraw* draw_; #endif - void cache(Fl_RGB_Image *img); + void cache(Fl_RGB_Image *img) FL_OVERRIDE; public: Fl_Xlib_Graphics_Driver(void); - virtual ~Fl_Xlib_Graphics_Driver(); + ~Fl_Xlib_Graphics_Driver() FL_OVERRIDE; void translate_all(int dx, int dy); void untranslate_all(); - virtual void scale(float f); + void scale(float f) FL_OVERRIDE; float scale() {return Fl_Graphics_Driver::scale();} - virtual int has_feature(driver_feature mask) { return mask & NATIVE; } - virtual void *gc() { return gc_; } - virtual void gc(void *value); - char can_do_alpha_blending(); + int has_feature(driver_feature mask) FL_OVERRIDE { return mask & NATIVE; } + void *gc() FL_OVERRIDE { return gc_; } + void gc(void *value) FL_OVERRIDE; + char can_do_alpha_blending() FL_OVERRIDE; #if USE_XFT static void destroy_xft_draw(Window id); #endif @@ -120,38 +120,38 @@ public: // --- bitmap stuff static unsigned long create_bitmask(int w, int h, const uchar *array); // NOT virtual - virtual void delete_bitmask(fl_uintptr_t bm); - virtual void draw_unscaled(const char* str, int n, int x, int y); - virtual void draw_unscaled(int angle, const char *str, int n, int x, int y); - virtual void rtl_draw_unscaled(const char* str, int n, int x, int y); - virtual void font_unscaled(Fl_Font face, Fl_Fontsize size); - void cache(Fl_Pixmap *img); - virtual void uncache_pixmap(fl_uintptr_t p); - void cache(Fl_Bitmap *img); - void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_); - virtual double width_unscaled(const char *str, int n); - virtual double width_unscaled(unsigned int c); - virtual void text_extents_unscaled(const char*, int n, int& dx, int& dy, int& w, int& h); - virtual Fl_Fontsize size_unscaled(); - virtual void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); - void add_rectangle_to_region(Fl_Region r, int x, int y, int w, int h); - Fl_Region XRectangleRegion(int x, int y, int w, int h); - void XDestroyRegion(Fl_Region r); + void delete_bitmask(fl_uintptr_t bm) FL_OVERRIDE; + void draw_unscaled(const char* str, int n, int x, int y) FL_OVERRIDE; + void draw_unscaled(int angle, const char *str, int n, int x, int y) FL_OVERRIDE; + void rtl_draw_unscaled(const char* str, int n, int x, int y) FL_OVERRIDE; + void font_unscaled(Fl_Font face, Fl_Fontsize size) FL_OVERRIDE; + void cache(Fl_Pixmap *img) FL_OVERRIDE; + void uncache_pixmap(fl_uintptr_t p) FL_OVERRIDE; + void cache(Fl_Bitmap *img) FL_OVERRIDE; + void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_) FL_OVERRIDE; + double width_unscaled(const char *str, int n) FL_OVERRIDE; + double width_unscaled(unsigned int c) FL_OVERRIDE; + void text_extents_unscaled(const char*, int n, int& dx, int& dy, int& w, int& h) FL_OVERRIDE; + Fl_Fontsize size_unscaled() FL_OVERRIDE; + void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) FL_OVERRIDE; + void add_rectangle_to_region(Fl_Region r, int x, int y, int w, int h) FL_OVERRIDE; + Fl_Region XRectangleRegion(int x, int y, int w, int h) FL_OVERRIDE; + void XDestroyRegion(Fl_Region r) FL_OVERRIDE; protected: - virtual void transformed_vertex0(float x, float y); - void fixloop(); - virtual void focus_rect(int x, int y, int w, int h); - virtual void rectf_unscaled(int x, int y, int w, int h); - virtual void colored_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b); - virtual void line_unscaled(int x, int y, int x1, int y1); - virtual void xyline_unscaled(int x, int y, int x1); - virtual void *change_pen_width(int lwidth); - virtual void reset_pen_width(void *data); - virtual void yxline_unscaled(int x, int y, int y1); - virtual void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2); - virtual void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - virtual void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2); - virtual void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); + void transformed_vertex0(float x, float y) FL_OVERRIDE; + void fixloop() FL_OVERRIDE; + void focus_rect(int x, int y, int w, int h) FL_OVERRIDE; + void rectf_unscaled(int x, int y, int w, int h) FL_OVERRIDE; + void colored_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) FL_OVERRIDE; + void line_unscaled(int x, int y, int x1, int y1) FL_OVERRIDE; + void xyline_unscaled(int x, int y, int x1) FL_OVERRIDE; + void *change_pen_width(int lwidth) FL_OVERRIDE; + void reset_pen_width(void *data) FL_OVERRIDE; + void yxline_unscaled(int x, int y, int y1) FL_OVERRIDE; + void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; + void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE; + void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE; // Scaling and clipping stuff for internal usage. // Currently specific to Fl_Xlib_Graphics_Driver (16-bit coordinate clipping) @@ -184,36 +184,36 @@ protected: void draw_clipped_line(int x1, int y1, int x2, int y2); // --- clipping - void push_clip(int x, int y, int w, int h); - int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); - int not_clipped(int x, int y, int w, int h); - void restore_clip(); - void end_points(); - void end_line(); - void end_loop(); - void end_polygon(); - void end_complex_polygon(); - bool can_fill_non_convex_polygon(); - void gap(); - virtual void ellipse_unscaled(double xt, double yt, double rx, double ry); - virtual void arc_unscaled(int x, int y, int w, int h, double a1, double a2); - virtual void pie_unscaled(int x, int y, int w, int h, double a1, double a2); - virtual void line_style_unscaled(int style, int width, char* dashes); - void color(Fl_Color c); - void set_color(Fl_Color i, unsigned int c); - void free_color(Fl_Color i, int overlay); - Fl_Color color() { return color_; } - void color(uchar r, uchar g, uchar b); - virtual float scale_font_for_PostScript(Fl_Font_Descriptor *desc, int s); - virtual const char* get_font_name(Fl_Font fnum, int* ap); - virtual int get_font_sizes(Fl_Font fnum, int*& sizep); + void push_clip(int x, int y, int w, int h) FL_OVERRIDE; + int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) FL_OVERRIDE; + int not_clipped(int x, int y, int w, int h) FL_OVERRIDE; + void restore_clip() FL_OVERRIDE; + void end_points() FL_OVERRIDE; + void end_line() FL_OVERRIDE; + void end_loop() FL_OVERRIDE; + void end_polygon() FL_OVERRIDE; + void end_complex_polygon() FL_OVERRIDE; + bool can_fill_non_convex_polygon() FL_OVERRIDE; + void gap() FL_OVERRIDE; + void ellipse_unscaled(double xt, double yt, double rx, double ry) FL_OVERRIDE; + void arc_unscaled(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void pie_unscaled(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE; + void line_style_unscaled(int style, int width, char* dashes) FL_OVERRIDE; + void color(Fl_Color c) FL_OVERRIDE; + void set_color(Fl_Color i, unsigned int c) FL_OVERRIDE; + void free_color(Fl_Color i, int overlay) FL_OVERRIDE; + Fl_Color color() FL_OVERRIDE { return color_; } + void color(uchar r, uchar g, uchar b) FL_OVERRIDE; + float scale_font_for_PostScript(Fl_Font_Descriptor *desc, int s) FL_OVERRIDE; + const char* get_font_name(Fl_Font fnum, int* ap) FL_OVERRIDE; + int get_font_sizes(Fl_Font fnum, int*& sizep) FL_OVERRIDE; #if !USE_XFT - virtual unsigned font_desc_size(); - virtual float scale_bitmap_for_PostScript(); + unsigned font_desc_size() FL_OVERRIDE; + float scale_bitmap_for_PostScript() FL_OVERRIDE; #endif - virtual const char *font_name(int num); - virtual void font_name(int num, const char *name); - virtual Fl_Font set_fonts(const char* xstarname); + const char *font_name(int num) FL_OVERRIDE; + void font_name(int num, const char *name) FL_OVERRIDE; + Fl_Font set_fonts(const char* xstarname) FL_OVERRIDE; }; #endif // FL_XLIB_GRAPHICS_DRIVER_H diff --git a/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H b/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H index 3f8ecda7f..ab702840d 100644 --- a/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H +++ b/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H @@ -23,15 +23,15 @@ #endif // FLTK_USE_CAIRO class Fl_Xlib_Image_Surface_Driver : public Fl_Image_Surface_Driver { - virtual void end_current(); + void end_current() FL_OVERRIDE; public: Window pre_window; Fl_Xlib_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off); ~Fl_Xlib_Image_Surface_Driver(); - void set_current(); - void translate(int x, int y); - void untranslate(); - Fl_RGB_Image *image(); + void set_current() FL_OVERRIDE; + void translate(int x, int y) FL_OVERRIDE; + void untranslate() FL_OVERRIDE; + Fl_RGB_Image *image() FL_OVERRIDE; #if FLTK_USE_CAIRO cairo_t *cairo_; #endif diff --git a/src/fl_dnd_win32.cxx b/src/fl_dnd_win32.cxx index 1c76558ae..5a4408191 100644 --- a/src/fl_dnd_win32.cxx +++ b/src/fl_dnd_win32.cxx @@ -60,7 +60,7 @@ class FLDropTarget : public IDropTarget public: FLDropTarget() : m_cRefCount(0) { } // initialize virtual ~FLDropTarget() { } - HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, LPVOID *ppvObject ) { + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, LPVOID *ppvObject ) FL_OVERRIDE { if (IID_IUnknown==riid || IID_IDropTarget==riid) { *ppvObject=this; @@ -70,14 +70,14 @@ public: *ppvObject = NULL; return E_NOINTERFACE; } - ULONG STDMETHODCALLTYPE AddRef() { return ++m_cRefCount; } - ULONG STDMETHODCALLTYPE Release() { + ULONG STDMETHODCALLTYPE AddRef() FL_OVERRIDE { return ++m_cRefCount; } + ULONG STDMETHODCALLTYPE Release() FL_OVERRIDE { long nTemp; nTemp = --m_cRefCount; // this is a static object, do not 'delete this' (issue #569) return nTemp; } - HRESULT STDMETHODCALLTYPE DragEnter( IDataObject *pDataObj, DWORD /*grfKeyState*/, POINTL pt, DWORD *pdwEffect) { + HRESULT STDMETHODCALLTYPE DragEnter( IDataObject *pDataObj, DWORD /*grfKeyState*/, POINTL pt, DWORD *pdwEffect) FL_OVERRIDE { if( !pDataObj ) return E_INVALIDARG; // set e_modifiers here from grfKeyState, set e_x and e_root_x // check if FLTK handles this drag and return if it can't (i.e. BMP drag without filename) @@ -107,7 +107,7 @@ public: lastEffect = *pdwEffect; return S_OK; } - HRESULT STDMETHODCALLTYPE DragOver( DWORD /*grfKeyState*/, POINTL pt, DWORD *pdwEffect) { + HRESULT STDMETHODCALLTYPE DragOver( DWORD /*grfKeyState*/, POINTL pt, DWORD *pdwEffect) FL_OVERRIDE { if ( px==pt.x && py==pt.y ) { *pdwEffect = lastEffect; @@ -143,7 +143,7 @@ public: Fl::flush(); return S_OK; } - HRESULT STDMETHODCALLTYPE DragLeave() { + HRESULT STDMETHODCALLTYPE DragLeave() FL_OVERRIDE { if ( fl_dnd_target_window && fillCurrentDragData(0)) { Fl::handle( FL_DND_LEAVE, fl_dnd_target_window ); @@ -152,7 +152,7 @@ public: } return S_OK; } - HRESULT STDMETHODCALLTYPE Drop( IDataObject *data, DWORD /*grfKeyState*/, POINTL pt, DWORD* /*pdwEffect*/) { + HRESULT STDMETHODCALLTYPE Drop( IDataObject *data, DWORD /*grfKeyState*/, POINTL pt, DWORD* /*pdwEffect*/) FL_OVERRIDE { if ( !fl_dnd_target_window ) return S_OK; Fl_Window *target = fl_dnd_target_window; @@ -326,7 +326,7 @@ class FLDropSource : public IDropSource public: FLDropSource() { m_cRefCount = 0; } virtual ~FLDropSource() { } - HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, LPVOID *ppvObject ) { + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, LPVOID *ppvObject ) FL_OVERRIDE { if (IID_IUnknown==riid || IID_IDropSource==riid) { *ppvObject=this; @@ -336,16 +336,16 @@ public: *ppvObject = NULL; return E_NOINTERFACE; } - ULONG STDMETHODCALLTYPE AddRef() { return ++m_cRefCount; } - ULONG STDMETHODCALLTYPE Release() { + ULONG STDMETHODCALLTYPE AddRef() FL_OVERRIDE { return ++m_cRefCount; } + ULONG STDMETHODCALLTYPE Release() FL_OVERRIDE { long nTemp; nTemp = --m_cRefCount; if(nTemp==0) delete this; return nTemp; } - STDMETHODIMP GiveFeedback( DWORD ) { return DRAGDROP_S_USEDEFAULTCURSORS; } - STDMETHODIMP QueryContinueDrag( BOOL esc, DWORD keyState ) { + STDMETHODIMP GiveFeedback( DWORD ) FL_OVERRIDE { return DRAGDROP_S_USEDEFAULTCURSORS; } + STDMETHODIMP QueryContinueDrag( BOOL esc, DWORD keyState ) FL_OVERRIDE { if ( esc ) return DRAGDROP_S_CANCEL; if ( !(keyState & (MK_LBUTTON|MK_MBUTTON|MK_RBUTTON)) ) @@ -359,11 +359,11 @@ public: int n; LONG m_lRefCount; - ULONG __stdcall AddRef(void) { + ULONG __stdcall AddRef(void) FL_OVERRIDE { return InterlockedIncrement(&m_lRefCount); } - ULONG __stdcall Release(void) { + ULONG __stdcall Release(void) FL_OVERRIDE { LONG count = InterlockedDecrement(&m_lRefCount); if(count == 0) { delete this; @@ -374,7 +374,7 @@ public: } - HRESULT __stdcall QueryInterface(REFIID iid, void **ppvObject) { + HRESULT __stdcall QueryInterface(REFIID iid, void **ppvObject) FL_OVERRIDE { if(iid == IID_IEnumFORMATETC || iid == IID_IUnknown) { AddRef(); *ppvObject = this; @@ -385,7 +385,7 @@ public: } } - HRESULT __stdcall Next(ULONG celt, FORMATETC * rgelt, ULONG *pceltFetched) { + HRESULT __stdcall Next(ULONG celt, FORMATETC * rgelt, ULONG *pceltFetched) FL_OVERRIDE { if (n > 0) return S_FALSE; for (ULONG i = 0; i < celt; i++) { n++; @@ -399,17 +399,17 @@ public: return S_OK; } - HRESULT __stdcall Skip(ULONG celt) { + HRESULT __stdcall Skip(ULONG celt) FL_OVERRIDE { n += celt; return (n == 0) ? S_OK : S_FALSE; } - HRESULT __stdcall Reset(void) { + HRESULT __stdcall Reset(void) FL_OVERRIDE { n = 0; return S_OK; } - HRESULT __stdcall Clone(IEnumFORMATETC **ppenum){ + HRESULT __stdcall Clone(IEnumFORMATETC **ppenum) FL_OVERRIDE { *ppenum = new FLEnum(); return S_OK; } @@ -437,7 +437,7 @@ class FLDataObject : public IDataObject public: FLDataObject() { m_cRefCount = 1; }// m_EnumF = new FLEnum();} virtual ~FLDataObject() { } - HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, LPVOID *ppvObject ) { + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, LPVOID *ppvObject ) FL_OVERRIDE { if (IID_IUnknown==riid || IID_IDataObject==riid) { *ppvObject=this; @@ -447,8 +447,8 @@ public: *ppvObject = NULL; return E_NOINTERFACE; } - ULONG STDMETHODCALLTYPE AddRef() { return ++m_cRefCount; } - ULONG STDMETHODCALLTYPE Release() { + ULONG STDMETHODCALLTYPE AddRef() FL_OVERRIDE { return ++m_cRefCount; } + ULONG STDMETHODCALLTYPE Release() FL_OVERRIDE { long nTemp; nTemp = --m_cRefCount; if(nTemp==0) @@ -456,7 +456,7 @@ public: return nTemp; } // GetData currently allows UNICODE text through Global Memory only - HRESULT STDMETHODCALLTYPE GetData( FORMATETC *pformatetcIn, STGMEDIUM *pmedium ) { + HRESULT STDMETHODCALLTYPE GetData( FORMATETC *pformatetcIn, STGMEDIUM *pmedium ) FL_OVERRIDE { if ((pformatetcIn->dwAspect & DVASPECT_CONTENT) && (pformatetcIn->tymed & TYMED_HGLOBAL) && (pformatetcIn->cfFormat == CF_UNICODETEXT)) @@ -502,7 +502,7 @@ public: } return DV_E_FORMATETC; } - HRESULT STDMETHODCALLTYPE QueryGetData( FORMATETC *pformatetc ) + HRESULT STDMETHODCALLTYPE QueryGetData( FORMATETC *pformatetc ) FL_OVERRIDE { if ((pformatetc->dwAspect & DVASPECT_CONTENT) && (pformatetc->tymed & TYMED_HGLOBAL) && @@ -516,15 +516,15 @@ public: // } // all the following methods are not really needed for a DnD object - HRESULT STDMETHODCALLTYPE GetDataHere( FORMATETC* /*pformatetcIn*/, STGMEDIUM* /*pmedium*/) { return E_NOTIMPL; } - HRESULT STDMETHODCALLTYPE GetCanonicalFormatEtc( FORMATETC* /*in*/, FORMATETC* /*out*/) { return E_NOTIMPL; } - HRESULT STDMETHODCALLTYPE SetData( FORMATETC* /*pformatetc*/, STGMEDIUM* /*pmedium*/, BOOL /*fRelease*/) { return E_NOTIMPL; } - HRESULT STDMETHODCALLTYPE EnumFormatEtc( DWORD /*dir*/, IEnumFORMATETC** /*ppenumFormatEtc*/) { return E_NOTIMPL; } -// HRESULT STDMETHODCALLTYPE EnumFormatEtc( DWORD dir, IEnumFORMATETC** ppenumFormatEtc) {*ppenumFormatEtc = m_EnumF; return S_OK;} + HRESULT STDMETHODCALLTYPE GetDataHere( FORMATETC* /*pformatetcIn*/, STGMEDIUM* /*pmedium*/) FL_OVERRIDE { return E_NOTIMPL; } + HRESULT STDMETHODCALLTYPE GetCanonicalFormatEtc( FORMATETC* /*in*/, FORMATETC* /*out*/) FL_OVERRIDE { return E_NOTIMPL; } + HRESULT STDMETHODCALLTYPE SetData( FORMATETC* /*pformatetc*/, STGMEDIUM* /*pmedium*/, BOOL /*fRelease*/) FL_OVERRIDE { return E_NOTIMPL; } + HRESULT STDMETHODCALLTYPE EnumFormatEtc( DWORD /*dir*/, IEnumFORMATETC** /*ppenumFormatEtc*/) FL_OVERRIDE { return E_NOTIMPL; } +// HRESULT STDMETHODCALLTYPE EnumFormatEtc( DWORD dir, IEnumFORMATETC** ppenumFormatEtc) FL_OVERRIDE {*ppenumFormatEtc = m_EnumF; return S_OK;} HRESULT STDMETHODCALLTYPE DAdvise( FORMATETC* /*pformatetc*/, DWORD /*advf*/, - IAdviseSink* /*pAdvSink*/, DWORD* /*pdwConnection*/) { return E_NOTIMPL; } - HRESULT STDMETHODCALLTYPE DUnadvise( DWORD /*dwConnection*/) { return E_NOTIMPL; } - HRESULT STDMETHODCALLTYPE EnumDAdvise( IEnumSTATDATA** /*ppenumAdvise*/) { return E_NOTIMPL; } + IAdviseSink* /*pAdvSink*/, DWORD* /*pdwConnection*/) FL_OVERRIDE { return E_NOTIMPL; } + HRESULT STDMETHODCALLTYPE DUnadvise( DWORD /*dwConnection*/) FL_OVERRIDE { return E_NOTIMPL; } + HRESULT STDMETHODCALLTYPE EnumDAdvise( IEnumSTATDATA** /*ppenumAdvise*/) FL_OVERRIDE { return E_NOTIMPL; } }; diff --git a/src/fl_show_colormap.cxx b/src/fl_show_colormap.cxx index d4677181a..1793547bc 100644 --- a/src/fl_show_colormap.cxx +++ b/src/fl_show_colormap.cxx @@ -32,8 +32,8 @@ class ColorMenu : public Fl_Window { Fl_Color which, previous; int done; void drawbox(Fl_Color); - void draw(); - int handle(int); + void draw() FL_OVERRIDE; + int handle(int) FL_OVERRIDE; public: ColorMenu(Fl_Color oldcol); Fl_Color run(); diff --git a/test/CubeView.h b/test/CubeView.h index 67424d3bb..9568e93c9 100644 --- a/test/CubeView.h +++ b/test/CubeView.h @@ -81,13 +81,13 @@ public: void pany(double y) { yshift = y; } #if HAVE_GL - /* The widget class draw() override. + /* The widget class draw() FL_OVERRIDE. * * The draw() function initializes Gl for another round of * drawing, then calls specialized functions for drawing each * of the entities displayed in the cube view. */ - void draw(); + void draw() FL_OVERRIDE; #endif /* HAVE_GL */ private: diff --git a/test/animated.cxx b/test/animated.cxx index 15dde5d68..33f242bd6 100644 --- a/test/animated.cxx +++ b/test/animated.cxx @@ -109,7 +109,7 @@ class window: public Fl_Double_Window { public: window(int X, int Y, const char *lbl): Fl_Double_Window(X, Y, lbl) {} - void draw() { + void draw() FL_OVERRIDE { Fl_Double_Window::draw(); // Test both cx/cy offset and clipping. Both borders should have a 5-pixel edge, diff --git a/test/arc.cxx b/test/arc.cxx index 3931c53fe..b38b7d2f0 100644 --- a/test/arc.cxx +++ b/test/arc.cxx @@ -23,7 +23,7 @@ double args[6] = {140, 140, 50, 0, 360, 0}; const char* name[6] = {"X", "Y", "R", "start", "end", "rotate"}; class Drawing : public Fl_Widget { - void draw() { + void draw() FL_OVERRIDE { fl_push_clip(x(),y(),w(),h()); fl_color(FL_DARK3); fl_rectf(x(),y(),w(),h()); diff --git a/test/blocks.cxx b/test/blocks.cxx index d50944f79..b2ab76435 100644 --- a/test/blocks.cxx +++ b/test/blocks.cxx @@ -489,8 +489,8 @@ class BlockWindow : public Fl_Double_Window { BlockWindow(int W, int H, const char *L = 0); ~BlockWindow(); - void draw(); - int handle(int event); + void draw() FL_OVERRIDE; + int handle(int event) FL_OVERRIDE; void new_game(); int score() { return (score_); } void up_level(); diff --git a/test/boxtype.cxx b/test/boxtype.cxx index 17733947a..29a89c3b6 100644 --- a/test/boxtype.cxx +++ b/test/boxtype.cxx @@ -52,7 +52,7 @@ static const int inactive = 0; // deactivate boxes and use green background class BoxGroup : public Fl_Group { public: BoxGroup(int x, int y, int w, int h) : Fl_Group(x,y,w,h) {} - void draw() { + void draw() FL_OVERRIDE { draw_box(); if (outline + box_bg) { // outline or box_bg or both Fl_Widget*const* a = array(); diff --git a/test/checkers.cxx b/test/checkers.cxx index e0904ba02..65539178b 100644 --- a/test/checkers.cxx +++ b/test/checkers.cxx @@ -894,8 +894,8 @@ void draw_piece(int which, int x, int y) { //---------------------------------------------------------------- class Board : public Fl_Double_Window { - void draw(); - int handle(int); + void draw() FL_OVERRIDE; + int handle(int) FL_OVERRIDE; public: void drag_piece(int, int, int); void drop_piece(int); diff --git a/test/clipboard.cxx b/test/clipboard.cxx index 3688d01cb..a8f840912 100644 --- a/test/clipboard.cxx +++ b/test/clipboard.cxx @@ -54,7 +54,7 @@ public: : Fl_Box(FL_FLAT_BOX, x, y, w, h, 0) { align(FL_ALIGN_CENTER | FL_ALIGN_CLIP); } - void draw() { + void draw() FL_OVERRIDE { draw_box(); Fl_Image *img = image(); if (img) { // draw the chess pattern below the box centered image @@ -87,7 +87,7 @@ class clipboard_viewer : public Fl_Tabs { public: clipboard_viewer(int x, int y, int w, int h) : Fl_Tabs(x, y, w, h) {} - virtual int handle(int event) { + int handle(int event) FL_OVERRIDE { if (event != FL_PASTE) return Fl_Tabs::handle(event); if (strcmp(Fl::event_clipboard_type(), Fl::clipboard_image) == 0) { // an image is being pasted diff --git a/test/color_chooser.cxx b/test/color_chooser.cxx index 257e2a89a..61fbc4caf 100644 --- a/test/color_chooser.cxx +++ b/test/color_chooser.cxx @@ -48,7 +48,7 @@ void make_image() { } class Pens : public Fl_Box { - void draw(); + void draw() FL_OVERRIDE; public: Pens(int X, int Y, int W, int H, const char* L) : Fl_Box(X,Y,W,H,L) {} diff --git a/test/contrast.cxx b/test/contrast.cxx index 5cd340d13..5619635c4 100644 --- a/test/contrast.cxx +++ b/test/contrast.cxx @@ -75,7 +75,7 @@ public: return idx_; } - virtual void draw() { + void draw() FL_OVERRIDE { draw_box(); // draw small filled rectangle with "original" color fl_color(ocol_); diff --git a/test/coordinates.cxx b/test/coordinates.cxx index f3f92c018..171b5e83b 100644 --- a/test/coordinates.cxx +++ b/test/coordinates.cxx @@ -90,7 +90,7 @@ public: } protected: - int handle(int event) { + int handle(int event) FL_OVERRIDE { static char buffer[128]; static const char* fmt = "Mouse position relative to main window: %3d,%3d"; int result = Fl_Window::handle(event); diff --git a/test/cube.cxx b/test/cube.cxx index 2b904e4dc..2dacb5976 100644 --- a/test/cube.cxx +++ b/test/cube.cxx @@ -47,8 +47,8 @@ public: #include class cube_box : public Fl_Gl_Window { - void draw(); - int handle(int); + void draw() FL_OVERRIDE; + int handle(int) FL_OVERRIDE; public: double lasttime; int wire; diff --git a/test/cursor.cxx b/test/cursor.cxx index 4f80f4180..9ae677521 100644 --- a/test/cursor.cxx +++ b/test/cursor.cxx @@ -64,7 +64,7 @@ void setcursor(Fl_Widget *o, void *) { // draw the label without any ^C or \nnn conversions: class CharBox : public Fl_Box { - void draw() { + void draw() FL_OVERRIDE { fl_font(FL_FREE_FONT,14); fl_draw(label(), x()+w()/2, y()+h()/2); } diff --git a/test/curve.cxx b/test/curve.cxx index 3b92be159..cdbfc846c 100644 --- a/test/curve.cxx +++ b/test/curve.cxx @@ -28,7 +28,7 @@ const char* name[9] = { int points; class Drawing : public Fl_Widget { - void draw() { + void draw() FL_OVERRIDE { fl_push_clip(x(),y(),w(),h()); fl_color(FL_DARK3); fl_rectf(x(),y(),w(),h()); diff --git a/test/device.cxx b/test/device.cxx index 0a0d64081..b1ab2e7a2 100644 --- a/test/device.cxx +++ b/test/device.cxx @@ -36,7 +36,7 @@ class MyWidget: public Fl_Box{ protected: - void draw(){ + void draw() FL_OVERRIDE { Fl_Box::draw(); fl_color(FL_RED); fl_rectf(x()+5,y()+5,w()-10,h()-10); @@ -66,7 +66,7 @@ public: class MyWidget2: public Fl_Box { protected: - void draw() { + void draw() FL_OVERRIDE { Fl_Box::draw(); int d; // fl_line_style(0); @@ -171,7 +171,7 @@ public: class MyWidget3: public Fl_Box { protected: - void draw() { + void draw() FL_OVERRIDE { Fl_Box::draw(); double d; // fl_line_style(0); @@ -203,7 +203,7 @@ public: class MyWidget4: public Fl_Box{ protected: - void draw(){ + void draw() FL_OVERRIDE { Fl_Box::draw(); fl_push_matrix(); fl_translate(x(),y()); @@ -365,7 +365,7 @@ public: class MyWidget5: public Fl_Box { protected: - void draw(){ + void draw() FL_OVERRIDE { Fl_Box::draw(); fl_push_matrix(); @@ -622,7 +622,7 @@ void copy(Fl_Widget *, void *data) { class My_Button:public Fl_Button { protected: - void draw() { + void draw() FL_OVERRIDE { if (type() == FL_HIDDEN_BUTTON) return; Fl_Color col = value() ? selection_color() : color(); draw_box(value() ? (down_box()?down_box():fl_down(box())) : box(), col); diff --git a/test/doublebuffer.cxx b/test/doublebuffer.cxx index aa5d1d44b..7b42a1ce1 100644 --- a/test/doublebuffer.cxx +++ b/test/doublebuffer.cxx @@ -69,14 +69,14 @@ void bad_draw(int w,int h,int which) { } class single_blink_window : public Fl_Single_Window { - void draw() {bad_draw(w(),h(),0); draw_child(*child(0));} + void draw() FL_OVERRIDE {bad_draw(w(),h(),0); draw_child(*child(0));} public: single_blink_window(int x, int y,int w,int h,const char *l) : Fl_Single_Window(x,y,w,h,l) {resizable(this);} }; class double_blink_window : public Fl_Double_Window { - void draw() {bad_draw(w(),h(),1); draw_child(*child(0));} + void draw() FL_OVERRIDE {bad_draw(w(),h(),1); draw_child(*child(0));} public: double_blink_window(int x, int y, int w,int h,const char *l) : Fl_Double_Window(x,y,w,h,l) {resizable(this);} diff --git a/test/fonts.cxx b/test/fonts.cxx index ef161eae3..04e11ad75 100644 --- a/test/fonts.cxx +++ b/test/fonts.cxx @@ -32,7 +32,7 @@ Fl_Tile *tile; Fl_Window *vector_font_editor = 0; class FontDisplay : public Fl_Widget { - void draw(); + void draw() FL_OVERRIDE; public: int font, size; FontDisplay(Fl_Boxtype B, int X, int Y, int W, int H, const char* L = 0) : @@ -109,7 +109,7 @@ class LetterBox : public Fl_Group public: LetterBox(int x, int y, int w, int h, const char *l) : Fl_Group(x, y, w, h, l) { } - void draw() { + void draw() FL_OVERRIDE { draw_box(); fl_push_clip(x(), y(), w(), h()); draw_label(x(), y()-5, w(), h()-16, FL_ALIGN_CENTER); @@ -270,7 +270,7 @@ class Ut_Main_Window : public Fl_Double_Window public: Ut_Main_Window(int w, int h, const char *l=0) : Fl_Double_Window(w, h, l) { } - int handle(int event) { + int handle(int event) FL_OVERRIDE { if (event==FL_KEYBOARD && Fl::event_key()==FL_F+1) { if (!vector_font_editor) vector_font_editor = create_editor(); vector_font_editor->show(); diff --git a/test/fullscreen.cxx b/test/fullscreen.cxx index 96f2c7cb5..1d68df7f0 100644 --- a/test/fullscreen.cxx +++ b/test/fullscreen.cxx @@ -65,7 +65,7 @@ #include class shape_window : public Fl_Gl_Window { - void draw(); + void draw() FL_OVERRIDE; public: int sides; shape_window(int x,int y,int w,int h,const char *l=0); @@ -123,7 +123,7 @@ void shape_window::draw() { class fullscreen_window : public Fl_Single_Window { public: fullscreen_window(int W, int H, const char *t=0); - int handle (int e); + int handle (int e) FL_OVERRIDE; Fl_Toggle_Light_Button *b3; Fl_Toggle_Light_Button *b4; }; diff --git a/test/gl_overlay.cxx b/test/gl_overlay.cxx index fc0218604..3d46377bc 100644 --- a/test/gl_overlay.cxx +++ b/test/gl_overlay.cxx @@ -36,8 +36,8 @@ public: #include class shape_window : public Fl_Gl_Window { - void draw(); - void draw_overlay(); + void draw() FL_OVERRIDE; + void draw_overlay() FL_OVERRIDE; public: int sides; int overlay_sides; diff --git a/test/handle_events.cxx b/test/handle_events.cxx index 9db0f5378..30a17707a 100644 --- a/test/handle_events.cxx +++ b/test/handle_events.cxx @@ -29,7 +29,7 @@ // Class to handle events class app : public WINDOW_TYPE { protected: - int handle(int); + int handle(int) FL_OVERRIDE; public: // storage for the last event int eventnum, ex, ey; diff --git a/test/keyboard.h b/test/keyboard.h index 8105e56df..b00f7cf20 100644 --- a/test/keyboard.h +++ b/test/keyboard.h @@ -21,7 +21,7 @@ # include class MyWindow : public Fl_Window { - int handle(int); + int handle(int) FL_OVERRIDE; public: MyWindow(int w, int h, const char *t=0L) : Fl_Window( w, h, t ) { } diff --git a/test/line_style.cxx b/test/line_style.cxx index 083ed5b50..f1517ee86 100644 --- a/test/line_style.cxx +++ b/test/line_style.cxx @@ -28,7 +28,7 @@ Fl_Choice *choice[3]; Fl_Check_Button *draw_line; class test_box: public Fl_Double_Window { - void draw(); + void draw() FL_OVERRIDE; public: test_box(int x,int y,int w,int h,const char *l=0) : Fl_Double_Window(x,y,w,h,l) {} diff --git a/test/mandelbrot.h b/test/mandelbrot.h index d6bae813f..023fa0d73 100644 --- a/test/mandelbrot.h +++ b/test/mandelbrot.h @@ -21,7 +21,7 @@ #include class Drawing_Area : public Fl_Box { - void draw(); + void draw() FL_OVERRIDE; public: uchar *buffer; int W,H; @@ -34,8 +34,8 @@ public: double X,Y,scale; int sx, sy, sw, sh; // selection box void erase_box(); - int handle(int); - void resize(int,int,int,int); + int handle(int) FL_OVERRIDE; + void resize(int,int,int,int) FL_OVERRIDE; void new_display(); enum { MAX_BRIGHTNESS = 16, diff --git a/test/offscreen.cxx b/test/offscreen.cxx index c43ffaad4..0f3cfa07e 100644 --- a/test/offscreen.cxx +++ b/test/offscreen.cxx @@ -48,8 +48,8 @@ public: return false; } private: - void draw(); - int handle(int event); + void draw() FL_OVERRIDE; + int handle(int event) FL_OVERRIDE; // Generate "random" values for the line display double random_val(int v) const { diff --git a/test/overlay.cxx b/test/overlay.cxx index f510d5c9f..efddc4126 100644 --- a/test/overlay.cxx +++ b/test/overlay.cxx @@ -27,7 +27,7 @@ int width=10,height=10; class overlay : public Fl_Overlay_Window { public: overlay(int w,int h) : Fl_Overlay_Window(w,h) {} - void draw_overlay(); + void draw_overlay() FL_OVERRIDE; }; void overlay::draw_overlay() { diff --git a/test/resize-arrows.h b/test/resize-arrows.h index 2ef73019b..7097f4d06 100644 --- a/test/resize-arrows.h +++ b/test/resize-arrows.h @@ -32,7 +32,7 @@ class Harrow : public Fl_Box { public: Harrow(int X, int Y, int W, int H, const char *T = 0); - void draw(); + void draw() FL_OVERRIDE; }; /** Varrow is an Fl_Box with a vertical arrow drawn down the middle. @@ -44,7 +44,7 @@ class Varrow : public Fl_Box { public: Varrow(int X, int Y, int W, int H, const char *T = 0); - void draw(); + void draw() FL_OVERRIDE; }; #endif // RESIZE_ARROWS_H diff --git a/test/rotated_text.cxx b/test/rotated_text.cxx index 7c34bf8e9..bc674b018 100644 --- a/test/rotated_text.cxx +++ b/test/rotated_text.cxx @@ -39,7 +39,7 @@ Fl_Double_Window *window; //code taken from fl_engraved_label.cxx class Rotated_Label_Box : public Fl_Widget{ protected: - void draw(){ + void draw() FL_OVERRIDE { draw_box(); fl_font(labelfont(), labelsize()); fl_color(labelcolor()); diff --git a/test/scroll.cxx b/test/scroll.cxx index 5403613ea..28711423a 100644 --- a/test/scroll.cxx +++ b/test/scroll.cxx @@ -26,7 +26,7 @@ #include class Drawing : public Fl_Widget { - void draw(); + void draw() FL_OVERRIDE; public: Drawing(int X,int Y,int W,int H,const char* L) : Fl_Widget(X,Y,W,H,L) { align(FL_ALIGN_TOP); diff --git a/test/shape.cxx b/test/shape.cxx index ec042e462..962e66473 100644 --- a/test/shape.cxx +++ b/test/shape.cxx @@ -26,7 +26,7 @@ #include class shape_window : public Fl_Gl_Window { - void draw(); + void draw() FL_OVERRIDE; public: int sides; shape_window(int x,int y,int w,int h,const char *l=0); diff --git a/test/subwindow.cxx b/test/subwindow.cxx index 73a954824..a175f6815 100644 --- a/test/subwindow.cxx +++ b/test/subwindow.cxx @@ -44,7 +44,7 @@ #endif class EnterExit : public Fl_Box { - int handle(int); + int handle(int) FL_OVERRIDE; public: EnterExit(int x, int y, int w, int h, const char *l) : Fl_Box(FL_BORDER_BOX,x,y,w,h,l) {} }; @@ -56,8 +56,8 @@ int EnterExit::handle(int e) { } class testwindow : public Fl_Window { - int handle(int); - void draw(); + int handle(int) FL_OVERRIDE; + void draw() FL_OVERRIDE; int cx, cy; char key; Fl_Cursor crsr; public: diff --git a/test/sudoku.cxx b/test/sudoku.cxx index d7b856bc7..97766ac2f 100644 --- a/test/sudoku.cxx +++ b/test/sudoku.cxx @@ -140,8 +140,8 @@ class SudokuCell : public Fl_Widget { public: SudokuCell(int X, int Y, int W, int H); - void draw(); - int handle(int event); + void draw() FL_OVERRIDE; + int handle(int event) FL_OVERRIDE; void readonly(bool r) { readonly_ = r; redraw(); } bool readonly() const { return readonly_; } void test_value(int v, int n) { test_value_[n] = v; redraw(); } @@ -189,7 +189,7 @@ class Sudoku : public Fl_Double_Window { void load_game(); void new_game(time_t seed); int next_value(SudokuCell *c); - void resize(int X, int Y, int W, int H); + void resize(int X, int Y, int W, int H) FL_OVERRIDE; void save_game(); void solve_game(); void update_helpers(); diff --git a/test/table.cxx b/test/table.cxx index bbca5af1f..06df9bf86 100644 --- a/test/table.cxx +++ b/test/table.cxx @@ -31,7 +31,7 @@ private: protected: void draw_cell(TableContext context, // table cell drawing - int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0); + int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0) FL_OVERRIDE; static void event_callback(Fl_Widget*, void*); void event_callback2(); // callback for table events diff --git a/test/unittest_circles.cxx b/test/unittest_circles.cxx index e6027527c..3a03c4cae 100644 --- a/test/unittest_circles.cxx +++ b/test/unittest_circles.cxx @@ -108,7 +108,7 @@ public: : Fl_Gl_Window(x, y, w, h) { box(FL_FLAT_BOX); } - void draw() { + void draw() FL_OVERRIDE { draw_begin(); Fl_Window::draw(); draw_circles(); @@ -125,7 +125,7 @@ public: box(FL_FLAT_BOX); end(); } - void draw() { + void draw() FL_OVERRIDE { Fl_Window::draw(); draw_circles(); } diff --git a/test/unittest_complex_shapes.cxx b/test/unittest_complex_shapes.cxx index fbfc64906..7ef7733d2 100644 --- a/test/unittest_complex_shapes.cxx +++ b/test/unittest_complex_shapes.cxx @@ -44,7 +44,7 @@ public: box(FL_FLAT_BOX); end(); } - void draw() { + void draw() FL_OVERRIDE { draw_begin(); Fl_Window::draw(); draw_complex((Ut_Complex_Shapes_Test*)parent()); @@ -61,7 +61,7 @@ public: box(FL_FLAT_BOX); end(); } - void draw() { + void draw() FL_OVERRIDE { Fl_Window::draw(); draw_complex((Ut_Complex_Shapes_Test*)parent()); } diff --git a/test/unittest_fast_shapes.cxx b/test/unittest_fast_shapes.cxx index 1572b2be7..f88e3ae64 100644 --- a/test/unittest_fast_shapes.cxx +++ b/test/unittest_fast_shapes.cxx @@ -192,7 +192,7 @@ public: : Fl_Gl_Window(x, y, w, h) { box(FL_FLAT_BOX); } - void draw() { + void draw() FL_OVERRIDE { draw_begin(); fl_color(color()); fl_rectf(0, 0, w(), h()); @@ -210,7 +210,7 @@ public: box(FL_FLAT_BOX); end(); } - void draw() { + void draw() FL_OVERRIDE { Fl_Window::draw(); draw_fast_shapes(); } diff --git a/test/unittest_images.cxx b/test/unittest_images.cxx index cccde78e7..bb8b2bc06 100644 --- a/test/unittest_images.cxx +++ b/test/unittest_images.cxx @@ -213,7 +213,7 @@ public: end(); // make sure this ImageTest group is closed } // constructor ends - void draw() { + void draw() FL_OVERRIDE { Fl_Group::draw(); // top left: RGB diff --git a/test/unittest_points.cxx b/test/unittest_points.cxx index 91a9fda23..be5c569c2 100644 --- a/test/unittest_points.cxx +++ b/test/unittest_points.cxx @@ -33,7 +33,7 @@ public: : Fl_Window(x, y, w, h) { end(); } - void draw() { + void draw() FL_OVERRIDE { int i; fl_color(FL_WHITE); fl_rectf(0, 0, 10, 10); @@ -58,7 +58,7 @@ public: box(FL_FLAT_BOX); end(); } - void draw() { + void draw() FL_OVERRIDE { Fl_Gl_Window::draw_begin(); Fl_Window::draw(); @@ -247,7 +247,7 @@ public: t = new Fl_Box(x+w-1,y+h-1, 1, 1); resizable(t); } - void draw() { + void draw() FL_OVERRIDE { Fl_Group::draw(); int a = x()+16, b = y()+34, i, j; // Test 1: pixel size diff --git a/test/unittest_scrollbarsize.cxx b/test/unittest_scrollbarsize.cxx index ef685b3e6..7fb4dab5a 100644 --- a/test/unittest_scrollbarsize.cxx +++ b/test/unittest_scrollbarsize.cxx @@ -32,7 +32,7 @@ class Ut_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[10]; switch ( context ) { case CONTEXT_STARTPAGE: // before page is drawn.. diff --git a/test/unittest_symbol.cxx b/test/unittest_symbol.cxx index e6506ae4d..742660c12 100644 --- a/test/unittest_symbol.cxx +++ b/test/unittest_symbol.cxx @@ -51,7 +51,7 @@ public: Ut_Symbol_Test(int x, int y, int w, int h) : Fl_Widget(x, y, w, h) { } - void draw(void) { + void draw(void) FL_OVERRIDE { int x0 = x(); // origin is current window position for Fl_Box int y0 = y(); int w0 = w(); diff --git a/test/unittest_text.cxx b/test/unittest_text.cxx index c8c91a588..7c83c8e7c 100644 --- a/test/unittest_text.cxx +++ b/test/unittest_text.cxx @@ -67,7 +67,7 @@ public: resizable(dummy); end(); } - void draw(void) { + void draw(void) FL_OVERRIDE { int x0 = x(); // origin is current window position for Fl_Box int y0 = y(); int w0 = w(); diff --git a/test/unittest_viewport.cxx b/test/unittest_viewport.cxx index a4424ace8..f572c8ed6 100644 --- a/test/unittest_viewport.cxx +++ b/test/unittest_viewport.cxx @@ -38,11 +38,11 @@ public: align(FL_ALIGN_INSIDE|FL_ALIGN_CENTER|FL_ALIGN_WRAP); box(FL_BORDER_BOX); } - void show() { + void show() FL_OVERRIDE { Fl_Box::show(); mainwin->test_alignment(1); } - void hide() { + void hide() FL_OVERRIDE { Fl_Box::hide(); mainwin->test_alignment(0); } diff --git a/test/unittests.h b/test/unittests.h index 475065d7c..8d04f15ca 100644 --- a/test/unittests.h +++ b/test/unittests.h @@ -80,7 +80,7 @@ class Ut_Main_Window : public Fl_Double_Window { public: Ut_Main_Window(int w, int h, const char *l=0L); void draw_alignment_indicators(); - void draw(); + void draw() FL_OVERRIDE; void test_alignment(int v); private: int draw_alignment_test_; diff --git a/test/utf8.cxx b/test/utf8.cxx index eab5a547a..2f2d928a1 100644 --- a/test/utf8.cxx +++ b/test/utf8.cxx @@ -75,7 +75,7 @@ static void cb_exit(Fl_Button*, void*) { */ class FontDisplay : public Fl_Widget { - void draw(void); + void draw(void) FL_OVERRIDE; public: int font, size; @@ -481,7 +481,7 @@ class right_left_input : public Fl_Input { public: right_left_input (int x, int y, int w, int h) : Fl_Input(x, y, w, h) {} - void draw() { + void draw() FL_OVERRIDE { if (type() == FL_HIDDEN_INPUT) return; Fl_Boxtype b = box(); if (damage() & FL_DAMAGE_ALL) draw_box(b, color()); @@ -526,7 +526,7 @@ class UCharDropBox : public Fl_Output { public: UCharDropBox(int x, int y, int w, int h, const char *label=0) : Fl_Output(x, y, w, h, label) { } - int handle(int event) { + int handle(int event) FL_OVERRIDE { switch (event) { case FL_DND_ENTER: return 1; case FL_DND_DRAG: return 1;