summaryrefslogtreecommitdiff
path: root/test/fast_slow.fl
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-10-06 18:21:25 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-10-06 18:21:25 +0000
commitf9039b2ae21988783feae9b362818e7923e82d14 (patch)
tree6d6fe3679d73448758f9794e7d4d4f6b22a4adad /test/fast_slow.fl
parent67e89232f9ba067825a158734a09e0fa21aacbe3 (diff)
Initial revision
git-svn-id: file:///fltk/svn/fltk/trunk@2 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test/fast_slow.fl')
-rw-r--r--test/fast_slow.fl36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/fast_slow.fl b/test/fast_slow.fl
new file mode 100644
index 000000000..71ee657d1
--- /dev/null
+++ b/test/fast_slow.fl
@@ -0,0 +1,36 @@
+# data file for the Fltk User Interface Designer (fluid)
+version 0.99
+gridx 10
+gridy 10
+snap 3
+Function {} {open
+} {
+ Fl_Window {} {open
+ xywh {143 188 318 443} resizable visible
+ } {
+ Fl_Slider control {
+ label {move
+this}
+ callback {fast->value(o->value());
+if (!Fl::pushed()) slow->value(o->value());}
+ xywh {90 200 30 200}
+ code0 {o->when(FL_WHEN_CHANGED|FL_WHEN_RELEASE|FL_WHEN_NOT_CHANGED);}
+ }
+ Fl_Slider fast {
+ label {fast
+redraw}
+ xywh {140 200 30 200} deactivate
+ }
+ Fl_Slider slow {
+ label {slow
+redraw}
+ xywh {190 200 30 200} deactivate
+ }
+ Fl_Box {} {
+ label {The left slider has changed( FL_WHEN_CHANGED | FL_WHEN_RELEASE | FL_WHEN_NOT_CHANGED) so it produces a callback on both drag and release mouse events.
+The middle slider (representing a widget with low overhead) is changed on every mouse movement.
+The right slider (representing a widget with high overhead) is only updated when the mouse is released, by checking if Fl::pushed() is zero.} selected
+ xywh {10 10 300 180} box DOWN_BOX color {53 47} labelfont 4 labelsize 12 align 148
+ }
+ }
+}