source:
orxonox.OLD/trunk/src/lib/gui/gl/glgui_text.h
@
9468
Last change on this file since 9468 was 9406, checked in by bensch, 18 years ago | |
---|---|
File size: 1.3 KB |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[5365] | 2 | * @file glgui_text.h |
3 | * The gl_TEXT widget of th openglGUI | |
[5360] | 4 | * |
5 | */ | |
[1853] | 6 | |
[5365] | 7 | #ifndef _GLGUI_TEXT_H |
8 | #define _GLGUI_TEXT_H | |
[1853] | 9 | |
[5365] | 10 | #include "glgui_widget.h" |
[8980] | 11 | #include "limited_width_text.h" |
[4838] | 12 | // FORWARD DECLARATION |
[7779] | 13 | namespace OrxGui |
14 | { | |
[3543] | 15 | |
[7779] | 16 | //! This is part of the openglGUI class |
17 | /** | |
18 | * | |
19 | */ | |
[8972] | 20 | class GLGuiText : public GLGuiWidget |
[7779] | 21 | { |
[3543] | 22 | |
[7779] | 23 | public: |
24 | GLGuiText(); | |
25 | virtual ~GLGuiText(); | |
[2036] | 26 | |
[8973] | 27 | void setText(const std::string& text); |
28 | void append(const std::string& appendText); | |
29 | void appendCharacter(char character); | |
30 | void removeCharacters(unsigned int chars); | |
31 | void clear(); | |
[1853] | 32 | |
[8991] | 33 | void setChangedTextColor(const Color& color); |
34 | ||
[9406] | 35 | void setLineWidth(float lineWidth) { this->_text.setLineWidth(lineWidth); }; |
[8980] | 36 | void setDotsPosition(LimitedWidthText::DotsPosition dotsPosition) { this->_text.setDotsPosition(dotsPosition); }; |
37 | ||
[8973] | 38 | const std::string& text() const { return _text.text(); }; |
[1853] | 39 | |
[8973] | 40 | |
41 | virtual void draw() const; | |
42 | ||
[9406] | 43 | sigslot::signal1<const std::string&> textChanged; |
[8973] | 44 | |
45 | protected: | |
46 | virtual void updateFrontColor(); | |
47 | virtual void hiding(); | |
48 | virtual void showing(); | |
49 | virtual void resize(); | |
50 | ||
[7779] | 51 | private: |
[8035] | 52 | void init(); |
[8973] | 53 | void changedText(); |
[8035] | 54 | |
55 | ||
56 | private: | |
[8980] | 57 | LimitedWidthText _text; |
[8991] | 58 | |
59 | Color _changedTextColor; | |
[7779] | 60 | }; |
61 | } | |
[1853] | 62 | |
[5365] | 63 | #endif /* _GLGUI_TEXT_H */ |
Note: See TracBrowser
for help on using the repository browser.