]> git.tdb.fi Git - libs/gltk.git/blob - source/hslider.h
Pass coordinates relative to the receiving widget's geometry
[libs/gltk.git] / source / hslider.h
1 /* $Id$
2
3 This file is part of libmspgltk
4 Copyright © 2007  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(const Resources &);
27         virtual void button_press(int, int, unsigned);
28         virtual void button_release(int, int, unsigned);
29         virtual void pointer_motion(int, int);
30 private:
31         virtual const char *get_class() const { return "hslider"; }
32         virtual void render_special(const Part &) const;
33
34         virtual void on_geometry_change();
35         virtual void on_style_change();
36 };
37
38 } // namespace GLtk
39 } // namespace Msp
40
41 #endif