-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfast_slow.fl
44 lines (42 loc) · 1.22 KB
/
fast_slow.fl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# data file for the FLTK User Interface Designer (FLUID)
version 2.0001
images_dir ./
header_name {.h}
code_name {.cxx}
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}
extra_code {o->when(FL_WHEN_CHANGED|FL_WHEN_RELEASE|FL_WHEN_NOT_CHANGED);}
}
Fl_Slider fast {
label {fast
redraw}
xywh {140 200 30 200}
extra_code {o->set_output();}
}
Fl_Slider slow {
label {slow
redraw}
xywh {190 200 30 200}
extra_code {o->set_output();}
}
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} align 148 box DOWN_BOX color 53 selection_color 47
}
}
}