summaryrefslogtreecommitdiff
path: root/test/resize-arrows.h
diff options
context:
space:
mode:
authorDuncan Gibson <engelsman@users.noreply.github.com>2020-07-15 01:11:31 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-20 14:08:47 +0200
commitc132ac564ed46464c05de0a70e2afc3822916a67 (patch)
tree16af9684fa1f05e6cd20cfe0b376e7924108ae63 /test/resize-arrows.h
parent4858882e1e4af51cbe7125752f83216c273eed7c (diff)
add resize examples as per STR3433
add example code for creating images for resize.dox based on Article #415: How does resizing work? https://www.fltk.org/articles.php?L415 see also https://www.fltk.org/str.php?L3433
Diffstat (limited to 'test/resize-arrows.h')
-rw-r--r--test/resize-arrows.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/test/resize-arrows.h b/test/resize-arrows.h
new file mode 100644
index 000000000..2ef73019b
--- /dev/null
+++ b/test/resize-arrows.h
@@ -0,0 +1,50 @@
+//
+// Resize example for use in the Fast Light Tool Kit (FLTK) documentation.
+//
+// See Article #415: How does resizing work?
+// https://www.fltk.org/articles.php?L415
+//
+// Copyright 1998-2020 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// https://www.fltk.org/COPYING.php
+//
+// Please see the following page on how to report bugs and issues:
+//
+// https://www.fltk.org/bugs.php
+//
+
+#ifndef RESIZE_ARROWS_H
+#define RESIZE_ARROWS_H
+
+#include <FL/Fl.H>
+#include <FL/Fl_Box.H>
+
+/** Harrow is an Fl_Box with a horizontal arrow drawn across the middle.
+
+ The arrow is drawn in black on a white background.
+ By default, the box has no border, and the label is below the box.
+ */
+class Harrow : public Fl_Box {
+public:
+ Harrow(int X, int Y, int W, int H, const char *T = 0);
+
+ void draw();
+};
+
+/** Varrow is an Fl_Box with a vertical arrow drawn down the middle.
+
+ The arrow is drawn in black on a white background.
+ By default, the box has no border, and the label is to the right of the box.
+ */
+class Varrow : public Fl_Box {
+public:
+ Varrow(int X, int Y, int W, int H, const char *T = 0);
+
+ void draw();
+};
+
+#endif // RESIZE_ARROWS_H