/**
Sliders are used to adjust numeric values visually. This class provides the
-common interface for sliders - see classes HSlider and VSlider (NYI) for
-concrete variations.
+common interface for sliders - see classes HSlider and VSlider for concrete
+variations.
*/
class Slider: public Widget
{
+public:
+ class Loader: public Widget::Loader
+ {
+ public:
+ Loader(Slider &);
+ Slider &get_object() const;
+ };
+
protected:
double min, max;
double value;
double step;
+ bool dragging;
+ double drag_start_pos;
+ double drag_start_value;
+ unsigned drag_area_size;
+
public:
sigc::signal<void, double> signal_value_changed;
void set_range(double, double);
void set_step(double);
double get_value() const { return value; }
+protected:
+ void start_drag(int);
+ void drag(int);
+ void end_drag();
};
} // namespace GLtk