mirror of https://github.com/fltk/fltk
Changed the valuators demo so only one copy of the callback code is
generated. This also demonstrates a second function put into fluid. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@469 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
cf2a058806
commit
db2a9d49ce
|
@ -5,6 +5,13 @@ code_name {.cxx}
|
|||
gridx 5
|
||||
gridy 5
|
||||
snap 3
|
||||
Function {callback(Fl_Valuator* o, void*)} {open private return_type void
|
||||
} {
|
||||
code {printf("%g \\r", o->value());
|
||||
fflush(stdout);} {selected
|
||||
}
|
||||
}
|
||||
|
||||
Function {} {open
|
||||
} {
|
||||
Fl_Window {} {
|
||||
|
@ -18,20 +25,17 @@ Function {} {open
|
|||
}
|
||||
Fl_Slider {} {
|
||||
label 0
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {30 45 20 145} selection_color 1 labelsize 8 align 1
|
||||
}
|
||||
Fl_Slider {} {
|
||||
label FL_VERT_FILL_SLIDER
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {70 55 20 145} type {Vert Fill} selection_color 1 labelsize 8
|
||||
}
|
||||
Fl_Slider {} {
|
||||
label FL_VERT_NICE_SLIDER
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {105 45 20 145} type {Vert Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8 align 1
|
||||
}
|
||||
Fl_Box {} {
|
||||
|
@ -40,50 +44,42 @@ fflush(stdout);}
|
|||
}
|
||||
Fl_Value_Slider {} {
|
||||
label 0
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {30 260 30 145} selection_color 1 labelsize 8 align 1
|
||||
}
|
||||
Fl_Value_Slider {} {
|
||||
label FL_VERT_FILL_SLIDER
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {70 275 30 140} type {Vert Fill} selection_color 1 labelsize 8
|
||||
}
|
||||
Fl_Value_Slider {} {
|
||||
label FL_VERT_NICE_SLIDER
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {110 260 20 145} type {Vert Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8 align 1
|
||||
}
|
||||
Fl_Slider {} {
|
||||
label FL_HORIZONTAL
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {140 80 130 20} type Horizontal selection_color 1 labelsize 8
|
||||
}
|
||||
Fl_Slider {} {
|
||||
label FL_HOR_FILL_SLIDER
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {140 120 130 20} type {Horz Fill} selection_color 1 labelsize 8
|
||||
}
|
||||
Fl_Slider {} {
|
||||
label FL_HOR_NICE_SLIDER
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {140 160 130 20} type {Horz Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8
|
||||
}
|
||||
Fl_Value_Slider {} {
|
||||
label FL_HOR_SLIDER
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {140 290 130 20} type Horizontal selection_color 1 labelsize 8
|
||||
}
|
||||
Fl_Value_Slider {} {
|
||||
label FL_HOR_FILL_SLIDER
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {140 330 130 20} type {Horz Fill} selection_color 1 labelsize 8
|
||||
}
|
||||
Fl_Box {} {
|
||||
|
@ -92,20 +88,17 @@ fflush(stdout);}
|
|||
}
|
||||
Fl_Value_Slider {} {
|
||||
label FL_HOR_NICE_SLIDER
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {140 370 130 20} type {Horz Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8
|
||||
}
|
||||
Fl_Adjuster {} {
|
||||
label {w()>h()}
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {440 60 75 25} labelsize 8
|
||||
}
|
||||
Fl_Adjuster {} {
|
||||
label {w()<h()}
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {520 35 25 75} labelsize 8
|
||||
}
|
||||
Fl_Box {} {
|
||||
|
@ -114,14 +107,12 @@ fflush(stdout);}
|
|||
}
|
||||
Fl_Counter {} {
|
||||
label 0
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {360 160 180 30} labelsize 8
|
||||
}
|
||||
Fl_Counter {} {
|
||||
label FL_SIMPLE_COUNTER
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {360 205 180 30} type Simple labelsize 8
|
||||
}
|
||||
Fl_Box {} {
|
||||
|
@ -130,21 +121,18 @@ fflush(stdout);}
|
|||
}
|
||||
Fl_Dial {} {
|
||||
label 0
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {315 280 65 65} color 10 selection_color 1 labelsize 8 value 0.5
|
||||
code0 {o->angles(0,315);}
|
||||
}
|
||||
Fl_Dial {} {
|
||||
label FL_LINE_DIAL
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {395 280 65 65} type Line color 10 selection_color 1 labelsize 8 value 0.5
|
||||
}
|
||||
Fl_Dial {} {
|
||||
label FL_FILL_DIAL
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);} selected
|
||||
callback callback
|
||||
xywh {475 280 65 65} type Fill color 10 selection_color 1 labelsize 8 value 1
|
||||
code0 {o->angles(0,360);}
|
||||
}
|
||||
|
@ -154,14 +142,12 @@ fflush(stdout);} selected
|
|||
}
|
||||
Fl_Roller {} {
|
||||
label 0
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {315 390 20 95} labelsize 8
|
||||
}
|
||||
Fl_Roller {} {
|
||||
label FL_HORIZONTAL
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {340 430 90 20} type Horizontal labelsize 8
|
||||
}
|
||||
Fl_Box {} {
|
||||
|
@ -178,14 +164,12 @@ fflush(stdout);}
|
|||
}
|
||||
Fl_Value_Input {} {
|
||||
label 0
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {30 460 110 30} labelsize 8 maximum 100 step 0.1
|
||||
}
|
||||
Fl_Value_Output {} {
|
||||
label 0
|
||||
callback {printf("%g \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {170 460 110 30} labelsize 8 maximum 100 step 0.1
|
||||
}
|
||||
Fl_Box {} {
|
||||
|
@ -194,14 +178,12 @@ fflush(stdout);}
|
|||
}
|
||||
Fl_Scrollbar {} {
|
||||
label 0
|
||||
callback {printf("%d \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {395 20 20 105} labelsize 8 align 1 maximum 100
|
||||
}
|
||||
Fl_Scrollbar {} {
|
||||
label FL_HORIZONTAL
|
||||
callback {printf("%d \\r",o->value());
|
||||
fflush(stdout);}
|
||||
callback callback
|
||||
xywh {300 65 95 20} type Horizontal labelsize 8 maximum 100
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue