summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2022-12-30 19:14:36 +0100
committerGitHub <noreply@github.com>2022-12-30 19:14:36 +0100
commit44c874b731f9f58c2f50c3c6076371058cbe26e3 (patch)
tree2386dfcc700c41a1109fc78b96875c11056abcc9 /test
parentf58a93a159105336136ce6e54ab7fc161e4fa15a (diff)
Use `FL_OVERRIDE` for all overridden virtual methods (#611)
FL_OVERRIDE is defined as `override` for C++11 and higher FL_OVERRIDE is defined as `override` for VisualC 2015 and newer Don't interfere with Fl_Widget::override()
Diffstat (limited to 'test')
-rw-r--r--test/CubeView.h4
-rw-r--r--test/animated.cxx2
-rw-r--r--test/arc.cxx2
-rw-r--r--test/blocks.cxx4
-rw-r--r--test/boxtype.cxx2
-rw-r--r--test/checkers.cxx4
-rw-r--r--test/clipboard.cxx4
-rw-r--r--test/color_chooser.cxx2
-rw-r--r--test/contrast.cxx2
-rw-r--r--test/coordinates.cxx2
-rw-r--r--test/cube.cxx4
-rw-r--r--test/cursor.cxx2
-rw-r--r--test/curve.cxx2
-rw-r--r--test/device.cxx12
-rw-r--r--test/doublebuffer.cxx4
-rw-r--r--test/fonts.cxx6
-rw-r--r--test/fullscreen.cxx4
-rw-r--r--test/gl_overlay.cxx4
-rw-r--r--test/handle_events.cxx2
-rw-r--r--test/keyboard.h2
-rw-r--r--test/line_style.cxx2
-rw-r--r--test/mandelbrot.h6
-rw-r--r--test/offscreen.cxx4
-rw-r--r--test/overlay.cxx2
-rw-r--r--test/resize-arrows.h4
-rw-r--r--test/rotated_text.cxx2
-rw-r--r--test/scroll.cxx2
-rw-r--r--test/shape.cxx2
-rw-r--r--test/subwindow.cxx6
-rw-r--r--test/sudoku.cxx6
-rw-r--r--test/table.cxx2
-rw-r--r--test/unittest_circles.cxx4
-rw-r--r--test/unittest_complex_shapes.cxx4
-rw-r--r--test/unittest_fast_shapes.cxx4
-rw-r--r--test/unittest_images.cxx2
-rw-r--r--test/unittest_points.cxx6
-rw-r--r--test/unittest_scrollbarsize.cxx2
-rw-r--r--test/unittest_symbol.cxx2
-rw-r--r--test/unittest_text.cxx2
-rw-r--r--test/unittest_viewport.cxx4
-rw-r--r--test/unittests.h2
-rw-r--r--test/utf8.cxx6
42 files changed, 73 insertions, 73 deletions
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 <FL/gl.h>
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 <FL/Fl_Gl_Window.H>
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 <FL/Fl_Gl_Window.H>
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 <FL/Fl_Window.H>
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 <FL/Fl_Input.H>
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 <FL/math.h>
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 <FL/Fl_Gl_Window.H>
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;