fltk/test/valuators.C
Michael R Sweet f9039b2ae2 Initial revision
git-svn-id: file:///fltk/svn/fltk/trunk@2 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-10-06 18:21:25 +00:00

359 lines
9.6 KiB
C

// generated by Fast Light User Interface Designer (fluid) version 0.99
#include "valuators.H"
static void cb_0(Fl_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_VERT_FILL_SLIDER(Fl_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_VERT_NICE_SLIDER(Fl_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_01(Fl_Value_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_VERT_FILL_SLIDER1(Fl_Value_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_VERT_NICE_SLIDER1(Fl_Value_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_HORIZONTAL(Fl_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_HOR_FILL_SLIDER(Fl_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_HOR_NICE_SLIDER(Fl_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_HOR_SLIDER(Fl_Value_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_HOR_FILL_SLIDER1(Fl_Value_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_HOR_NICE_SLIDER1(Fl_Value_Slider* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_w(Fl_Adjuster* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_w1(Fl_Adjuster* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_02(Fl_Counter* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_SIMPLE_COUNTER(Fl_Counter* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_03(Fl_Dial* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_LINE_DIAL(Fl_Dial* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_FILL_DIAL(Fl_Dial* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_04(Fl_Roller* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_FL_HORIZONTAL1(Fl_Roller* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_05(Fl_Value_Input* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_06(Fl_Value_Output* o, void*) {
printf("%g \r",o->value());
fflush(stdout);
}
static void cb_07(Fl_Scrollbar* o, void*) {
printf("%d \r",o->value());
fflush(stdout);
}
static void cb_FL_HORIZONTAL2(Fl_Scrollbar* o, void*) {
printf("%d \r",o->value());
fflush(stdout);
}
int main(int argc, char **argv) {
Fl_Window *w;
{ Fl_Window* o = w = new Fl_Window(567, 506, "Valuator classes, showing values for type()");
o->color(43);
o->selection_color(43);
{ Fl_Box* o = new Fl_Box(10, 10, 280, 210, "Fl_Slider");
o->box(FL_ENGRAVED_BOX);
o->labelfont(1);
o->labelsize(12);
o->align(17);
}
{ Fl_Slider* o = new Fl_Slider(30, 45, 20, 145, "0");
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_0);
o->align(1);
}
{ Fl_Slider* o = new Fl_Slider(70, 55, 20, 145, "FL_VERT_FILL_SLIDER");
o->type(2);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_VERT_FILL_SLIDER);
}
{ Fl_Slider* o = new Fl_Slider(105, 45, 20, 145, "FL_VERT_NICE_SLIDER");
o->type(4);
o->box(FL_FLAT_BOX);
o->color(10);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_VERT_NICE_SLIDER);
o->align(1);
}
{ Fl_Box* o = new Fl_Box(10, 230, 280, 205, "Fl_Value_Slider");
o->box(FL_ENGRAVED_BOX);
o->labelfont(1);
o->labelsize(12);
o->align(17);
}
{ Fl_Value_Slider* o = new Fl_Value_Slider(30, 260, 30, 145, "0");
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_01);
o->align(1);
}
{ Fl_Value_Slider* o = new Fl_Value_Slider(70, 275, 30, 140, "FL_VERT_FILL_SLIDER");
o->type(2);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_VERT_FILL_SLIDER1);
}
{ Fl_Value_Slider* o = new Fl_Value_Slider(110, 260, 20, 145, "FL_VERT_NICE_SLIDER");
o->type(4);
o->box(FL_FLAT_BOX);
o->color(10);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_VERT_NICE_SLIDER1);
o->align(1);
}
{ Fl_Slider* o = new Fl_Slider(140, 80, 130, 20, "FL_HORIZONTAL");
o->type(1);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_HORIZONTAL);
}
{ Fl_Slider* o = new Fl_Slider(140, 120, 130, 20, "FL_HOR_FILL_SLIDER");
o->type(3);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_HOR_FILL_SLIDER);
}
{ Fl_Slider* o = new Fl_Slider(140, 160, 130, 20, "FL_HOR_NICE_SLIDER");
o->type(5);
o->box(FL_FLAT_BOX);
o->color(10);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_HOR_NICE_SLIDER);
}
{ Fl_Value_Slider* o = new Fl_Value_Slider(140, 290, 130, 20, "FL_HOR_SLIDER");
o->type(1);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_HOR_SLIDER);
}
{ Fl_Value_Slider* o = new Fl_Value_Slider(140, 330, 130, 20, "FL_HOR_FILL_SLIDER");
o->type(3);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_HOR_FILL_SLIDER1);
}
{ Fl_Box* o = new Fl_Box(430, 10, 125, 120, "Fl_Adjuster");
o->box(FL_ENGRAVED_BOX);
o->labelfont(1);
o->labelsize(12);
o->align(17);
}
{ Fl_Value_Slider* o = new Fl_Value_Slider(140, 370, 130, 20, "FL_HOR_NICE_SLIDER");
o->type(5);
o->box(FL_FLAT_BOX);
o->color(10);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_HOR_NICE_SLIDER1);
}
{ Fl_Adjuster* o = new Fl_Adjuster(440, 60, 75, 25, "w()>h()");
o->labelsize(8);
o->callback((Fl_Callback*)cb_w);
}
{ Fl_Adjuster* o = new Fl_Adjuster(520, 35, 25, 75, "w()<h()");
o->labelsize(8);
o->callback((Fl_Callback*)cb_w1);
}
{ Fl_Box* o = new Fl_Box(345, 135, 210, 115, "Fl_Counter");
o->box(FL_ENGRAVED_BOX);
o->labelfont(1);
o->labelsize(12);
o->align(17);
}
{ Fl_Counter* o = new Fl_Counter(360, 160, 180, 30, "0");
o->labelsize(8);
o->minimum(-1e+06);
o->maximum(1e+06);
o->callback((Fl_Callback*)cb_02);
}
{ Fl_Counter* o = new Fl_Counter(360, 205, 180, 30, "FL_SIMPLE_COUNTER");
o->type(1);
o->labelsize(8);
o->minimum(-1e+06);
o->maximum(1e+06);
o->callback((Fl_Callback*)cb_FL_SIMPLE_COUNTER);
}
{ Fl_Box* o = new Fl_Box(300, 260, 255, 105, "Fl_Dial");
o->box(FL_ENGRAVED_BOX);
o->labelfont(1);
o->labelsize(12);
o->align(17);
}
{ Fl_Dial* o = new Fl_Dial(315, 280, 65, 65, "0");
o->color(10);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_03);
}
{ Fl_Dial* o = new Fl_Dial(395, 280, 65, 65, "FL_LINE_DIAL");
o->type(1);
o->color(10);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_LINE_DIAL);
}
{ Fl_Dial* o = new Fl_Dial(475, 280, 65, 65, "FL_FILL_DIAL");
o->type(2);
o->color(10);
o->selection_color(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_FILL_DIAL);
}
{ Fl_Box* o = new Fl_Box(300, 375, 145, 120, "Fl_Roller");
o->box(FL_ENGRAVED_BOX);
o->labelfont(1);
o->labelsize(12);
o->align(17);
}
{ Fl_Roller* o = new Fl_Roller(315, 390, 20, 95, "0");
o->labelsize(8);
o->callback((Fl_Callback*)cb_04);
}
{ Fl_Roller* o = new Fl_Roller(340, 430, 90, 20, "FL_HORIZONTAL");
o->type(1);
o->labelsize(8);
o->callback((Fl_Callback*)cb_FL_HORIZONTAL1);
}
{ Fl_Box* o = new Fl_Box(10, 445, 140, 50, "Fl_Value_Input");
o->box(FL_ENGRAVED_BOX);
o->labelfont(1);
o->labelsize(12);
o->align(17);
}
{ Fl_Box* o = new Fl_Box(455, 375, 100, 120, "Some widgets have color(FL_GREEN) and color2(FL_RED) to show the areas the\
se effect.");
o->box(FL_BORDER_FRAME);
o->color(0);
o->selection_color(0);
o->labelsize(10);
o->align(128);
}
{ Fl_Box* o = new Fl_Box(155, 445, 135, 50, "Fl_Value_Output");
o->box(FL_ENGRAVED_BOX);
o->labelfont(1);
o->labelsize(12);
o->align(17);
}
{ Fl_Value_Input* o = new Fl_Value_Input(30, 460, 110, 30, "0");
o->labelsize(8);
o->maximum(100);
o->step(0.1);
o->callback((Fl_Callback*)cb_05);
o->when(4);
}
{ Fl_Value_Output* o = new Fl_Value_Output(170, 460, 110, 30, "0");
o->labelsize(8);
o->maximum(100);
o->step(0.1);
o->callback((Fl_Callback*)cb_06);
}
{ Fl_Box* o = new Fl_Box(295, 10, 130, 120, " Fl_Scrollbar");
o->box(FL_ENGRAVED_BOX);
o->labelfont(1);
o->labelsize(12);
o->align(21);
}
{ Fl_Scrollbar* o = new Fl_Scrollbar(395, 20, 20, 105, "0");
o->labelsize(8);
o->maximum(100);
o->callback((Fl_Callback*)cb_07);
o->align(1);
}
{ Fl_Scrollbar* o = new Fl_Scrollbar(300, 65, 95, 20, "FL_HORIZONTAL");
o->type(1);
o->labelsize(8);
o->maximum(100);
o->callback((Fl_Callback*)cb_FL_HORIZONTAL2);
}
o->end();
}
w->show(argc, argv);
return Fl::run();
}