diff options
Diffstat (limited to 'test/clipboard.cxx')
| -rw-r--r-- | test/clipboard.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/clipboard.cxx b/test/clipboard.cxx index 562868761..0c74b91aa 100644 --- a/test/clipboard.cxx +++ b/test/clipboard.cxx @@ -59,7 +59,7 @@ public: : Fl_Box(FL_FLAT_BOX, x, y, w, h, 0) { align(FL_ALIGN_CENTER | FL_ALIGN_CLIP); } - void draw() override { + void draw() { draw_box(); Fl_Image *img = image(); if (img) { // draw the chess pattern below the box centered image @@ -104,9 +104,9 @@ public: flex->layout(); } - int handle(int event) override { + int handle(int event) { if (event != FL_PASTE) { - auto val = value(); + Fl_Widget *val = value(); int ret = Fl_Tabs::handle(event); if (value() != val) { // tabs have been changed layout(); // re-arrange buttons @@ -124,7 +124,7 @@ public: #if defined(_WIN32) && defined(DEBUG_CLIPBOARD_DATA) - OpenClipboard(nullptr); // + OpenClipboard(0); // char *p = title + strlen(title); int format = EnumClipboardFormats(0); if (format && format < CF_MAX) { @@ -171,7 +171,7 @@ public: // clipboard viewer refresh callback: // 2nd argument must be `clipboard_viewer *` void refresh_cb(Fl_Widget *, void *v) { - auto tabs = (clipboard_viewer *)v; + clipboard_viewer *tabs = (clipboard_viewer *)v; if (Fl::clipboard_contains(Fl::clipboard_image)) { Fl::paste(*tabs, 1, Fl::clipboard_image); // try to find image in the clipboard return; @@ -200,8 +200,8 @@ void save_cb(Fl_Widget *wid, void *) { // "wrap mode" callback (switch wrapping on/off) void wrap_cb(Fl_Widget *w, void *d) { - auto display = (Fl_Text_Display *)d; - auto wrap = (Fl_Check_Button *)w; + Fl_Text_Display *display = (Fl_Text_Display *)d; + Fl_Check_Button *wrap = (Fl_Check_Button *)w; if (wrap->value()) { display->wrap_mode(Fl_Text_Display::WRAP_AT_BOUNDS, 0); } else { @@ -213,13 +213,13 @@ void wrap_cb(Fl_Widget *w, void *d) { // called after clipboard was changed or at application activation void clipboard_cb(int source, void *data) { if (source == 1) - refresh_cb(nullptr, data); + refresh_cb(0, data); } int main(int argc, char **argv) { fl_register_images(); // required for the X11 platform to allow pasting of images Fl_Window *win = new Fl_Window(500, 550, "FLTK Clipboard Viewer"); - auto tabs = new clipboard_viewer(0, 0, 500, 500); + clipboard_viewer *tabs = new clipboard_viewer(0, 0, 500, 500); Fl_Group *g = new Fl_Group(5, 30, 490, 460, Fl::clipboard_image); // will display the image form g->box(FL_FLAT_BOX); image_box = new chess(5, 30, 490, 440); @@ -242,7 +242,7 @@ int main(int argc, char **argv) { flex->margin(10, 0, 10, 0); // margins: left, top, right, bottom flex->gap(10); - auto refresh = new Fl_Button(0, 0, 0, 0, "Refresh from clipboard"); + Fl_Button *refresh = new Fl_Button(0, 0, 0, 0, "Refresh from clipboard"); flex->fixed(refresh, 200); refresh->callback(refresh_cb, (void *)tabs); |
