Line | |
---|
1 | /*! |
---|
2 | * @file glgui_bar.h |
---|
3 | * The gl_ widget of th openglGUI |
---|
4 | * |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _GLGUI_BAR_H |
---|
8 | #define _GLGUI_BAR_H |
---|
9 | |
---|
10 | #include "glgui_widget.h" |
---|
11 | |
---|
12 | |
---|
13 | namespace OrxGui |
---|
14 | { |
---|
15 | |
---|
16 | |
---|
17 | //! This is Bar part of the openglGUI class |
---|
18 | /** |
---|
19 | * The Bar shows the part value. |
---|
20 | */ |
---|
21 | class GLGuiBar : public GLGuiWidget |
---|
22 | { |
---|
23 | |
---|
24 | public: |
---|
25 | GLGuiBar(); |
---|
26 | virtual ~GLGuiBar(); |
---|
27 | |
---|
28 | void setValue(float value); |
---|
29 | void setMinimum(float minimum); |
---|
30 | void setMaximum(float maximum); |
---|
31 | void setRange(float minimum, float maximum); |
---|
32 | |
---|
33 | float getValue() const { return this->_value; }; |
---|
34 | float getMinimum() const { return this->_minimum; }; |
---|
35 | float getMaximum() const { return this->_maximum; }; |
---|
36 | |
---|
37 | virtual void update() { }; |
---|
38 | virtual void draw() const; |
---|
39 | |
---|
40 | protected: |
---|
41 | virtual void resize(); |
---|
42 | |
---|
43 | private: |
---|
44 | void init(); |
---|
45 | |
---|
46 | private: |
---|
47 | float _value; |
---|
48 | |
---|
49 | Rect2D _frontRect; |
---|
50 | |
---|
51 | float _minimum; |
---|
52 | float _maximum; |
---|
53 | }; |
---|
54 | } |
---|
55 | #endif /* _GLGUI__H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.