]> git.tdb.fi Git - libs/gltk.git/blob - source/hslider.h
Make autosize_special const and add a const autosize overload
[libs/gltk.git] / source / hslider.h
1 #ifndef MSP_GLTK_HSLIDER_H_
2 #define MSP_GLTK_HSLIDER_H_
3
4 #include "slider.h"
5
6 namespace Msp {
7 namespace GLtk {
8
9 /**
10 Horizontal slider widget.  A special part named "slider" will be positioned at
11 the current value of the widget.
12 */
13 class HSlider: public Slider
14 {
15 private:
16         unsigned slider_size;
17
18 public:
19         HSlider();
20
21         virtual const char *get_class() const { return "hslider"; }
22
23 private:
24         virtual void autosize_special(const Part &, Geometry &) const;
25         virtual void rebuild_special(const Part &);
26
27 public:
28         virtual void button_press(int, int, unsigned);
29         virtual void button_release(int, int, unsigned);
30         virtual void pointer_motion(int, int);
31 private:
32         virtual void on_geometry_change();
33         virtual void on_style_change();
34 };
35
36 } // namespace GLtk
37 } // namespace Msp
38
39 #endif