]> git.tdb.fi Git - libs/gltk.git/blob - source/hslider.h
Rework event passing system to allow for pointer grabs
[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 class HSlider: public Slider
10 {
11 public:
12         HSlider(const Resources &);
13         void button_press(int, int, unsigned);
14         void button_release(int, int, unsigned);
15         void pointer_motion(int, int);
16 private:
17         bool dragging;
18         int drag_start_x;
19         double drag_start_value;
20
21         const char *get_class() const { return "hslider"; }
22         void render_part(const Part &) const;
23         unsigned get_slider_width() const;
24 };
25
26 } // namespace GLtk
27 } // namespace Msp
28
29 #endif