source:
orxonox.OLD/trunk/src/lib/gui/gl/glgui_bar.h
@
10766
Last change on this file since 10766 was 9869, checked in by bensch, 18 years ago | |
---|---|
File size: 1.0 KB |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[5365] | 2 | * @file glgui_bar.h |
[5360] | 3 | * The gl_ widget of th openglGUI |
4 | * | |
5 | */ | |
[1853] | 6 | |
[5365] | 7 | #ifndef _GLGUI_BAR_H |
8 | #define _GLGUI_BAR_H | |
[1853] | 9 | |
[5365] | 10 | #include "glgui_widget.h" |
[1853] | 11 | |
[3543] | 12 | |
[7779] | 13 | namespace OrxGui |
14 | { | |
[3543] | 15 | |
[2036] | 16 | |
[7779] | 17 | //! This is Bar part of the openglGUI class |
18 | /** | |
19 | * The Bar shows the part value. | |
20 | */ | |
21 | class GLGuiBar : public GLGuiWidget | |
22 | { | |
[9869] | 23 | ObjectListDeclaration(GLGuiBar); |
[7779] | 24 | public: |
25 | GLGuiBar(); | |
26 | virtual ~GLGuiBar(); | |
[1853] | 27 | |
[8983] | 28 | void setValue(float value); |
29 | void setMinimum(float minimum); | |
30 | void setMaximum(float maximum); | |
31 | void setRange(float minimum, float maximum); | |
[6287] | 32 | |
[8991] | 33 | void setChangedValueColor(const Color& color); |
34 | ||
[8986] | 35 | float value() const { return this->_value; }; |
36 | float minimum() const { return this->_minimum; }; | |
37 | float maximum() const { return this->_maximum; }; | |
[3245] | 38 | |
[7779] | 39 | virtual void update() { }; |
40 | virtual void draw() const; | |
41 | ||
[8972] | 42 | protected: |
43 | virtual void resize(); | |
44 | ||
[6287] | 45 | private: |
[7779] | 46 | void init(); |
47 | ||
48 | private: | |
[8983] | 49 | float _value; |
[6287] | 50 | |
[8983] | 51 | Rect2D _frontRect; |
52 | ||
53 | float _minimum; | |
54 | float _maximum; | |
[8991] | 55 | |
56 | Color _changedValueColor; | |
[7779] | 57 | }; |
58 | } | |
[5360] | 59 | #endif /* _GLGUI__H */ |
Note: See TracBrowser
for help on using the repository browser.