#include <stdio.h>
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Value_Slider.H>

void slider_handler(Fl_Widget *a, void *b)
{
	printf("slider value: %f\n", ((Fl_Value_Slider*)a)->value());
}

int main(int argc, char **argv)
{

	Fl_Window *root;
	Fl_Value_Slider *s;

	root = new Fl_Window(200, 130);
	s = new Fl_Value_Slider(90, 10, 20, 100, "Slider");
	s->textcolor(FL_RED);
	s->value(1);
	s->range(1,10);
	s->step(1);
	s->callback(slider_handler, 0);

	root->end();
	root->show(argc, argv);
	Fl::run(); 
}
