source:
orxonox.OLD/trunk/src/lib/gui/gl/glgui_textfield.h
@
10619
Last change on this file since 10619 was 9869, checked in by bensch, 18 years ago | |
---|---|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[5365] | 2 | * @file glgui_textfield.h |
[9015] | 3 | * The gl_TEXTFIELD widget of th openglGUI |
[5360] | 4 | * |
5 | */ | |
[1853] | 6 | |
[5365] | 7 | #ifndef _GLGUI_TEXTFIELD_H |
8 | #define _GLGUI_TEXTFIELD_H | |
[1853] | 9 | |
[5365] | 10 | #include "glgui_widget.h" |
[9015] | 11 | #include "multi_line_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 | */ | |
20 | class GLGuiTextfield : public GLGuiWidget | |
21 | { | |
[9869] | 22 | ObjectListDeclaration(GLGuiTextfield); |
[7779] | 23 | public: |
24 | GLGuiTextfield(); | |
25 | virtual ~GLGuiTextfield(); | |
[2036] | 26 | |
[9015] | 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 | |
[9015] | 33 | void setChangedTextColor(const Color& color); |
[1853] | 34 | |
[9015] | 35 | const std::string& text() const { return _text.text(); }; |
36 | ||
37 | ||
[7919] | 38 | virtual void draw() const; |
39 | ||
[9406] | 40 | sigslot::signal1<const std::string&> textChanged; |
[9015] | 41 | |
42 | protected: | |
43 | virtual void updateFrontColor(); | |
44 | virtual void hiding(); | |
45 | virtual void showing(); | |
46 | virtual void resize(); | |
47 | ||
[7779] | 48 | private: |
[9015] | 49 | void init(); |
50 | void changedText(); | |
[3245] | 51 | |
[9015] | 52 | |
53 | private: | |
54 | MultiLineText _text; | |
55 | ||
56 | Color _changedTextColor; | |
[7779] | 57 | }; |
58 | } | |
[9015] | 59 | |
60 | #endif /* _GLGUI_TEXTFIELD_H */ |
Note: See TracBrowser
for help on using the repository browser.