]> git.tdb.fi Git - libs/gltk.git/blob - source/hslider.h
Loader improvements
[libs/gltk.git] / source / hslider.h
1 /* $Id$
2
3 This file is part of libmspgltk
4 Copyright © 2007, 2010-2011  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GLTK_HSLIDER_H_
9 #define MSP_GLTK_HSLIDER_H_
10
11 #include "slider.h"
12
13 namespace Msp {
14 namespace GLtk {
15
16 /**
17 Horizontal slider widget.  A special part named "slider" will be positioned at
18 the current value of the widget.
19 */
20 class HSlider: public Slider
21 {
22 private:
23         unsigned slider_size;
24
25 public:
26         HSlider();
27
28         virtual const char *get_class() const { return "hslider"; }
29
30 private:
31         virtual void render_special(const Part &) const;
32
33 public:
34         virtual void button_press(int, int, unsigned);
35         virtual void button_release(int, int, unsigned);
36         virtual void pointer_motion(int, int);
37 private:
38         virtual void on_geometry_change();
39         virtual void on_style_change();
40 };
41
42 } // namespace GLtk
43 } // namespace Msp
44
45 #endif