Line | |
---|
1 | /*! |
---|
2 | * @file glgui_multiline_text.h |
---|
3 | * The gl_TEXT widget of th openglGUI |
---|
4 | * |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _GLGUI_MULTILINE_TEXT_H |
---|
8 | #define _GLGUI_MULTILINE_TEXT_H |
---|
9 | |
---|
10 | #include "glgui_widget.h" |
---|
11 | #include "multi_line_text.h" |
---|
12 | // FORWARD DECLARATION |
---|
13 | namespace OrxGui |
---|
14 | { |
---|
15 | |
---|
16 | //! This is part of the openglGUI class |
---|
17 | /** |
---|
18 | * |
---|
19 | */ |
---|
20 | class GLGuiMultiLineText : public GLGuiWidget |
---|
21 | { |
---|
22 | ObjectListDeclaration(GLGuiMultiLineText); |
---|
23 | public: |
---|
24 | GLGuiMultiLineText(); |
---|
25 | virtual ~GLGuiMultiLineText(); |
---|
26 | |
---|
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(); |
---|
32 | |
---|
33 | void setTextSize(float size); |
---|
34 | virtual void setFont(const Font& font); |
---|
35 | void setChangedTextColor(const Color& color); |
---|
36 | |
---|
37 | void setLineWidth(float lineWidth) { this->_text.setLineWidth(lineWidth); }; |
---|
38 | // void setDotsPosition(LimitedWidthText::DotsPosition dotsPosition) { this->_text.setDotsPosition(dotsPosition); }; |
---|
39 | |
---|
40 | const std::string& text() const { return _text.text(); }; |
---|
41 | |
---|
42 | |
---|
43 | virtual void draw() const; |
---|
44 | |
---|
45 | sigslot::signal1<const std::string&> textChanged; |
---|
46 | |
---|
47 | protected: |
---|
48 | virtual void updateFrontColor(); |
---|
49 | virtual void hiding(); |
---|
50 | virtual void showing(); |
---|
51 | virtual void resize(); |
---|
52 | |
---|
53 | private: |
---|
54 | void init(); |
---|
55 | void changedText(); |
---|
56 | |
---|
57 | |
---|
58 | private: |
---|
59 | MultiLineText _text; |
---|
60 | |
---|
61 | Color _changedTextColor; |
---|
62 | }; |
---|
63 | } |
---|
64 | |
---|
65 | #endif /* _GLGUI_MULTILINE_TEXT_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.