#include <textrenderer.h>
Inheritance diagram for TextRenderer:

Public Types | |
| typedef list< PG_Widget * > | Widgets |
Public Member Functions | |
| TextRenderer (PG_Widget *parent, const PG_Rect &r, const std::string &text, const std::string &style="ScrollWidget") | |
| TextRenderer (PG_Widget *parent, const PG_Rect &r=PG_Rect::null) | |
| void | SetText (const std::string &text) |
| Sets text. | |
| void | saveText (bool stripFormatting) |
| PG_Widget * | parsingError (const ASCString &errorMessage) |
Static Public Member Functions | |
| static bool | registerTagRenderer (TagRenderer *renderer) |
Protected Member Functions | |
| bool | isSpace (ASCString::charT character) |
| bool | isBreaker (ASCString::charT character) |
| int | arrangeLine (int y, const Widgets &line, int lineHeight, int indent) |
| int | AreaWidth () |
| void | layout () |
| void | addWidget (PG_Widget *w) |
| void | addWidget (Widgets w) |
| void | addSpace (int space) |
| void | addLinebreak (int pixel, int lines) |
| void | addIndentation (int firstLine, int furtherLines) |
| void | addAbsPosition (int pos) |
| ASCString | substr (const ASCString &text, ASCString::const_iterator begin, ASCString::const_iterator end) |
| ASCString::const_iterator | token (const ASCString &text, ASCString::const_iterator start) |
| ASCString::const_iterator | token_command (const ASCString &text, ASCString::const_iterator start) |
| void | parse (const ASCString &text) |
| virtual PG_Widget * | render (const ASCString &token) |
| virtual Widgets | eval_command (const ASCString &token) |
| bool | eventKeyDown (const SDL_KeyboardEvent *key) |
| Overridable Eventhandler for a SDL_KeyboardEvent message. | |
| void | clear () |
Classes | |
| struct | RenderingAttribute |
| class | TagRenderer |
| struct | TextAttributes |
|
|
Definition at line 47 of file textrenderer.h. |
|
||||||||||||||||||||
|
Definition at line 51 of file textrenderer.cpp. References SetText(), and PG_ThemeWidget::SetTransparency(). |
|
||||||||||||
|
Definition at line 45 of file textrenderer.cpp. References PG_ScrollWidget::SetLineSize(), and PG_ThemeWidget::SetTransparency(). |
|
|
Definition at line 190 of file textrenderer.cpp. References addWidget(), PG_Rect::PG_Rect(), and PG_Widget::PG_Widget(). Referenced by eval_command(). |
|
||||||||||||
|
Definition at line 177 of file textrenderer.cpp. References addWidget(), PG_Rect::PG_Rect(), and PG_Widget::PG_Widget(). Referenced by eval_command(). |
|
||||||||||||
|
Definition at line 165 of file textrenderer.cpp. Referenced by eval_command(), and token(). |
|
|
Definition at line 159 of file textrenderer.cpp. Referenced by token(). |
|
|
Definition at line 145 of file textrenderer.cpp. References addWidget(). |
|
|
Definition at line 151 of file textrenderer.cpp. Referenced by addAbsPosition(), addIndentation(), addWidget(), token(), and token_command(). |
|
|
Definition at line 73 of file textrenderer.cpp. References PG_ScrollWidget::GetListWidth(), max(), and PG_Rect::Width(). Referenced by layout(). |
|
||||||||||||||||||||
|
Definition at line 58 of file textrenderer.cpp. Referenced by layout(). |
|
|
Definition at line 437 of file textrenderer.cpp. |
|
|
Definition at line 302 of file textrenderer.cpp. References addAbsPosition(), addIndentation(), addLinebreak(), assert, Surface::getBaseSurface(), PG_Widget::GetFontColor(), IconRepository::getIcon(), PG_Rect::index, pal, parsingError(), s1, and s2. Referenced by token_command(). |
|
|
Overridable Eventhandler for a SDL_KeyboardEvent message. This handler is called when a key changed it's state from unpressed to pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. Definition at line 470 of file textrenderer.cpp. References PG_ScrollWidget::GetScrollPosX(), PG_ScrollWidget::GetScrollPosY(), PG_Rect::Height(), saveText(), and PG_ScrollWidget::ScrollTo(). |
|
|
Definition at line 64 of file textrenderer.h. Referenced by token(). |
|
|
Definition at line 59 of file textrenderer.h. Referenced by parse(), token(), and token_command(). |
|
|
this is a hack to get the scrollbars updated Definition at line 78 of file textrenderer.cpp. References AreaWidth(), arrangeLine(), PG_Rect::Height(), max(), PG_Rect::PG_Rect(), and PG_Widget::PG_Widget(). |
|
|
Definition at line 259 of file textrenderer.cpp. References PG_Widget::GetFontColor(), PG_Widget::GetFontSize(), isSpace(), token(), and token_command(). |
|
|
Definition at line 281 of file textrenderer.cpp. References PG_Widget::SetFontColor(), PG_Widget::SetSizeByText(), and PG_Widget::SetText(). Referenced by eval_command(), and VehicleTypeRenderer::renderWidget(). |
|
|
Definition at line 293 of file textrenderer.cpp. |
|
|
Definition at line 427 of file textrenderer.cpp. References PG_Widget::SetSizeByText(), PG_Widget::SetText(), PG_Widget::SizeWidget(), and PG_Rect::Width(). Referenced by token(). |
|
|
Definition at line 456 of file textrenderer.cpp. References selectFile(), tnstream::writeString(), and tnstream::writing. Referenced by eventKeyDown(), and IngameMessageViewer::eventKeyDown(). |
|
|
Sets text.
Reimplemented from PG_Widget. Referenced by IngameMessageViewer::IngameMessageViewer(), IngameMessageViewer::SetMessage(), TextRenderer(), and ViewFormattedText::ViewFormattedText(). |
|
||||||||||||||||
|
Definition at line 200 of file textrenderer.cpp. Referenced by token(), and token_command(). |
|
||||||||||||
|
Definition at line 217 of file textrenderer.cpp. References addLinebreak(), addSpace(), addWidget(), isBreaker(), isSpace(), render(), and substr(). Referenced by parse(). |
|
||||||||||||
|
Definition at line 205 of file textrenderer.cpp. References addWidget(), eval_command(), isSpace(), and substr(). Referenced by parse(). |
1.4.2