// generated by Fast Light User Interface Designer (fluid) version 1.0400

#include "valuators.h"

Fl_Simple_Terminal *tty=(Fl_Simple_Terminal *)0;

int main(int argc, char **argv) {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = new Fl_Double_Window(580, 640, "Valuator classes, showing values for type()");
    w = o; (void)w;
    o->color((Fl_Color)43);
    o->selection_color((Fl_Color)43);
    { Fl_Group* o = new Fl_Group(10, 10, 280, 210, "Fl_Slider");
      o->box(FL_ENGRAVED_BOX);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
      { Fl_Slider* o = new Fl_Slider(30, 45, 20, 145, "0");
        o->tooltip("Vertical Slider");
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Slider FL_VERT_SLIDER"));
        o->align(Fl_Align(FL_ALIGN_TOP));
      } // Fl_Slider* o
      { Fl_Slider* o = new Fl_Slider(70, 55, 20, 145, "FL_VERT_FILL_SLIDER");
        o->type(2);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Slider FL_VERT_FILL_SLIDER"));
      } // Fl_Slider* o
      { Fl_Slider* o = new Fl_Slider(105, 45, 20, 145, "FL_VERT_NICE_SLIDER");
        o->type(4);
        o->box(FL_FLAT_BOX);
        o->color((Fl_Color)10);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Slider FL_VERT_NICE_SLIDER"));
        o->align(Fl_Align(FL_ALIGN_TOP));
      } // Fl_Slider* o
      { Fl_Slider* o = new Fl_Slider(140, 80, 130, 20, "FL_HORIZONTAL");
        o->type(1);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Slider FL_HORIZONTAL"));
      } // Fl_Slider* o
      { Fl_Slider* o = new Fl_Slider(140, 120, 130, 20, "FL_HOR_FILL_SLIDER");
        o->type(3);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Slider FL_HOR_FILL_SLIDER"));
      } // Fl_Slider* o
      { Fl_Slider* o = new Fl_Slider(140, 160, 130, 20, "FL_HOR_NICE_SLIDER");
        o->type(5);
        o->box(FL_FLAT_BOX);
        o->color((Fl_Color)10);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Slider FL_HOR_NICE_SLIDER"));
      } // Fl_Slider* o
      o->end();
    } // Fl_Group* o
    { Fl_Group* o = new Fl_Group(10, 230, 280, 210, "Fl_Value_Slider");
      o->box(FL_ENGRAVED_BOX);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
      { Fl_Value_Slider* o = new Fl_Value_Slider(30, 260, 30, 145, "0");
        o->tooltip("Value Slider");
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("FL_VERT_SLIDER"));
        o->align(Fl_Align(FL_ALIGN_TOP));
      } // Fl_Value_Slider* o
      { Fl_Value_Slider* o = new Fl_Value_Slider(70, 275, 30, 140, "FL_VERT_FILL_SLIDER");
        o->type(2);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Value_Slider FL_VERT_FILL_SLIDER"));
      } // Fl_Value_Slider* o
      { 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((Fl_Color)10);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Value_Slider FL_VERT_NICE_SLIDER"));
        o->align(Fl_Align(FL_ALIGN_TOP));
      } // Fl_Value_Slider* o
      { Fl_Value_Slider* o = new Fl_Value_Slider(140, 290, 130, 20, "FL_HOR_SLIDER");
        o->type(1);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Value_Slider FL_HOR_SLIDER"));
      } // Fl_Value_Slider* o
      { Fl_Value_Slider* o = new Fl_Value_Slider(140, 330, 130, 20, "FL_HOR_FILL_SLIDER");
        o->type(3);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Value_Slider FL_HOR_FILL_SLIDER"));
      } // Fl_Value_Slider* o
      { 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((Fl_Color)10);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Value_Slider FL_HOR_NICE_SLIDER"));
      } // Fl_Value_Slider* o
      o->end();
    } // Fl_Group* o
    { Fl_Group* o = new Fl_Group(10, 450, 135, 50, "Fl_Value_Input");
      o->box(FL_ENGRAVED_BOX);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
      { Fl_Value_Input* o = new Fl_Value_Input(30, 470, 105, 25, "0");
        o->tooltip("Value Input");
        o->labelsize(8);
        o->maximum(100);
        o->step(0.1);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Value_Input"));
      } // Fl_Value_Input* o
      o->end();
    } // Fl_Group* o
    { Fl_Group* o = new Fl_Group(155, 450, 135, 50, "Fl_Value_Output");
      o->box(FL_ENGRAVED_BOX);
      o->labelfont(1);
      o->user_data((void*)("Fl_Value_Output"));
      o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
      { Fl_Value_Output* o = new Fl_Value_Output(170, 470, 105, 25, "0");
        o->tooltip("Value Output");
        o->labelsize(8);
        o->maximum(100);
        o->step(0.1);
        o->callback((Fl_Callback*)callback);
      } // Fl_Value_Output* o
      o->end();
    } // Fl_Group* o
    { Fl_Group* o = new Fl_Group(300, 10, 130, 120, "   Fl_Scrollbar");
      o->box(FL_ENGRAVED_BOX);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
      { Fl_Scrollbar* o = new Fl_Scrollbar(305, 55, 95, 20, "FL_HORIZONTAL");
        o->tooltip("Horizontal Scrollbar");
        o->type(1);
        o->labelsize(8);
        o->maximum(100);
        o->Fl_Slider::value(20);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Scrollbar FL_HORIZONTAL"));
      } // Fl_Scrollbar* o
      { Fl_Scrollbar* o = new Fl_Scrollbar(405, 30, 20, 90, "FL_VERTICAL (0) ->");
        o->tooltip("Vertical Scrollbar");
        o->labelsize(8);
        o->maximum(100);
        o->Fl_Slider::value(20);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Scrollbar FL_VERTICAL"));
        o->align(Fl_Align(FL_ALIGN_LEFT_BOTTOM));
      } // Fl_Scrollbar* o
      o->end();
    } // Fl_Group* o
    { Fl_Group* o = new Fl_Group(440, 10, 130, 120, "Fl_Adjuster");
      o->box(FL_ENGRAVED_BOX);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
      { Fl_Adjuster* o = new Fl_Adjuster(450, 60, 75, 25, "w()>h()");
        o->tooltip("Horizontal Adjuster");
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Adjuster w()>h()"));
      } // Fl_Adjuster* o
      { Fl_Adjuster* o = new Fl_Adjuster(530, 35, 25, 75, "w()<h()");
        o->tooltip("Vertical Adjuster");
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Adjuster w()<h()"));
      } // Fl_Adjuster* o
      o->end();
    } // Fl_Group* o
    { Fl_Group* o = new Fl_Group(300, 140, 130, 120, "Fl_Counter");
      o->box(FL_ENGRAVED_BOX);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
      { Fl_Counter* o = new Fl_Counter(310, 175, 110, 25, "0");
        o->tooltip("Standard Counter");
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Counter"));
      } // Fl_Counter* o
      { Fl_Counter* o = new Fl_Counter(310, 215, 110, 25, "FL_SIMPLE_COUNTER");
        o->tooltip("Simple Counter");
        o->type(1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Counter FL_SIMPLE_COUNTER"));
      } // Fl_Counter* o
      o->end();
    } // Fl_Group* o
    { Fl_Group* o = new Fl_Group(440, 140, 130, 120, "Fl_Spinner");
      o->box(FL_ENGRAVED_BOX);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
      { Fl_Spinner* o = new Fl_Spinner(465, 176, 80, 24, "FL_INT_INPUT");
        o->labelsize(8);
        o->minimum(-30);
        o->maximum(30);
        o->step(2);
        o->value(5);
        o->callback((Fl_Callback*)callback_spinner, (void*)("Fl_Spinner FL_INT_INPUT"));
        o->align(Fl_Align(FL_ALIGN_BOTTOM));
      } // Fl_Spinner* o
      { Fl_Spinner* o = new Fl_Spinner(465, 216, 80, 24, "FL_FLOAT_INPUT");
        o->type(1);
        o->labelsize(8);
        o->minimum(0);
        o->maximum(1);
        o->step(0.01);
        o->value(0.05);
        o->callback((Fl_Callback*)callback_spinner, (void*)("Fl_Spinner FL_FLOAT_INPUT"));
        o->align(Fl_Align(FL_ALIGN_BOTTOM));
        o->wrap(0); // disable wrap mode
      } // Fl_Spinner* o
      o->end();
    } // Fl_Group* o
    { Fl_Group* o = new Fl_Group(300, 270, 270, 105, "Fl_Dial");
      o->box(FL_ENGRAVED_BOX);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
      { Fl_Dial* o = new Fl_Dial(320, 295, 65, 65, "0");
        o->tooltip("Standard Dial");
        o->color((Fl_Color)10);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->value(0.5);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Dial"));
        o->angles(0,315);
      } // Fl_Dial* o
      { Fl_Dial* o = new Fl_Dial(400, 295, 65, 65, "FL_LINE_DIAL");
        o->tooltip("Line Dial");
        o->type(1);
        o->color((Fl_Color)10);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->value(0.5);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Dial FL_LINE_DIAL"));
      } // Fl_Dial* o
      { Fl_Dial* o = new Fl_Dial(480, 295, 65, 65, "FL_FILL_DIAL");
        o->tooltip("Fill Dial");
        o->type(2);
        o->color((Fl_Color)10);
        o->selection_color((Fl_Color)1);
        o->labelsize(8);
        o->value(1);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Dial FL_FILL_DIAL"));
        o->angles(0,360);
      } // Fl_Dial* o
      o->end();
    } // Fl_Group* o
    { Fl_Group* o = new Fl_Group(300, 385, 150, 115, "Fl_Roller");
      o->box(FL_ENGRAVED_BOX);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
      { Fl_Roller* o = new Fl_Roller(315, 390, 20, 95, "0");
        o->tooltip("Vertical Roller");
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Roller FL_VERTICAL"));
      } // Fl_Roller* o
      { Fl_Roller* o = new Fl_Roller(345, 430, 90, 20, "FL_HORIZONTAL");
        o->tooltip("Horizontal Roller");
        o->type(1);
        o->labelsize(8);
        o->callback((Fl_Callback*)callback, (void*)("Fl_Roller FL_HORIZONTAL"));
      } // Fl_Roller* o
      o->end();
    } // Fl_Group* o
    { Fl_Box* o = new Fl_Box(460, 385, 110, 115, "Some widgets have color(FL_GREEN) and color2(FL_RED) to show the areas these \
effect.");
      o->box(FL_BORDER_FRAME);
      o->color(FL_FOREGROUND_COLOR);
      o->selection_color(FL_FOREGROUND_COLOR);
      o->labelsize(11);
      o->align(Fl_Align(FL_ALIGN_WRAP));
    } // Fl_Box* o
    { Fl_Simple_Terminal* o = tty = new Fl_Simple_Terminal(10, 513, 560, 117);
      tty->box(FL_NO_BOX);
      tty->color(FL_FOREGROUND_COLOR);
      tty->selection_color(FL_BACKGROUND_COLOR);
      tty->labeltype(FL_NORMAL_LABEL);
      tty->labelfont(0);
      tty->labelsize(14);
      tty->labelcolor(FL_FOREGROUND_COLOR);
      tty->align(Fl_Align(FL_ALIGN_CENTER));
      tty->when(FL_WHEN_RELEASE);
      o->ansi(true);
    } // Fl_Simple_Terminal* tty
    o->end();
  } // Fl_Double_Window* o
  w->show(argc, argv);
  return Fl::run();
}

void callback(Fl_Widget* o, void*) {
  const char *name = (const char*)(o->user_data() ? o->user_data() : "???");
  tty->printf("callback(): %s value() = \033[2m%g\033[0m\n",
              name, ((Fl_Valuator*)o)->value());
}

/**
 Spinner doesn't derive from Fl_Valuator..
*/
void callback_spinner(Fl_Widget* o, void*) {
  const char *name = (const char*)(o->user_data() ? o->user_data() : "???");
  tty->printf("callback(): %s value() = \033[2m%g\033[0m\n",
              name, ((Fl_Spinner*)o)->value());
}
