#include <pgrichedit.h>
Inheritance diagram for PG_RichEdit:

Public Types | |
| enum | { PG_TEXT_LEFT = MARK_TEXT_LEFT, PG_TEXT_CENTER = MARK_TEXT_CENTER, PG_TEXT_RIGHT = MARK_TEXT_RIGHT, PG_TEXT_BLOCK = MARK_TEXT_BLOCK, PG_ALL_LEFT = MARK_ALL_LEFT, PG_ALL_CENTER = MARK_ALL_CENTER, PG_ALL_RIGHT = MARK_ALL_RIGHT } |
Public Member Functions | |
| PG_RichEdit (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, bool autoVerticalResize=false, Uint32 linewidth=0, Uint32 tabSize=30, Uint32 childsborderwidth=8, const std::string &style="WidgetList") | |
| Constructor of the PG_WidgetListEx class. | |
| void | SetText (const std::string &text) |
| Sets rich text. | |
| void | AddChild (PG_Widget *child) |
| Add a widget to the list. | |
| bool | RemoveChild (PG_Widget *child) |
| Remove a widget from the list. | |
| bool | LoadText (const std::string &textfile) |
| Load the content of the widget from a text file. | |
| void | SetAutoResize (bool bHorizontal=true, bool bVertical=true) |
| Resize the widget automatically if there is not enough space. | |
| void | SetAlignment (Uint8 align) |
| Set default alignment. | |
| void | SetTabSize (Uint16 tabSize) |
| Set tab size. | |
| void | SetLineWidth (Uint16 lineWidth) |
| Set line width. | |
Protected Types | |
| typedef std::vector< RichWordDescription > | RichWordDescriptionArray |
| typedef std::vector< size_t > | Size_tArray |
| typedef std::vector< RichLinePart > | RichLinePartArray |
| typedef std::vector< RichLine > | RichLineArray |
Protected Member Functions | |
| void | eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst) |
| overridable eventhandler to blit the widget contents to the screen | |
| void | eventSizeWidget (Uint16 w, Uint16 h) |
| Callback for the SizeWidget event. | |
Protected Attributes | |
| bool | my_AutoVerticalResize |
| bool | my_AutoHorizontalResize |
| RichWordDescriptionArray | my_ParsedWords |
| RichLineArray | my_RichText |
| Uint32 | my_ChildsBorderWidth |
| Uint16 | my_TabSize |
| Uint16 | my_LineWidth |
Classes | |
| struct | RichLine |
| struct | RichLinePart |
| struct | RichWordDescription |
Definition at line 47 of file pgrichedit.h.
|
|
Definition at line 165 of file pgrichedit.h. |
|
|
Definition at line 153 of file pgrichedit.h. |
|
|
Definition at line 125 of file pgrichedit.h. |
|
|
Definition at line 129 of file pgrichedit.h. |
|
|
Definition at line 213 of file pgrichedit.h. |
|
||||||||||||||||||||||||||||||||
|
Constructor of the PG_WidgetListEx class.
Definition at line 40 of file pgrichedit.cpp. References PG_ScrollWidget::EnableScrollBar(), PG_ScrollBar::HORIZONTAL, my_AutoHorizontalResize, my_AutoVerticalResize, my_ChildsBorderWidth, my_LineWidth, PG_ScrollWidget::my_objHorizontalScrollbar, PG_ScrollWidget::my_objVerticalScrollbar, PG_ScrollWidget::my_scrollarea, my_TabSize, PG_Rect::my_width, PG_TEXT_LEFT, PG_ScrollArea::SetAreaWidth(), PG_ScrollBar::SetLineSize(), PG_ScrollBar::sigScrollPos, and PG_ScrollBar::sigScrollTrack. |
|
|
Add a widget to the list.
Reimplemented from PG_ScrollWidget. Definition at line 110 of file pgrichedit.cpp. References PG_ScrollWidget::AddChild(). |
|
||||||||||||||||
|
overridable eventhandler to blit the widget contents to the screen
Reimplemented from PG_ThemeWidget. Definition at line 79 of file pgrichedit.cpp. References PG_ThemeWidget::eventBlit(), PG_Widget::GetFont(), PG_Application::GetScreen(), PG_ScrollArea::GetScrollPosX(), PG_ScrollArea::GetScrollPosY(), PG_Rect::Height(), PG_Widget::IsVisible(), line(), PG_ScrollWidget::my_objHorizontalScrollbar, PG_ScrollWidget::my_objVerticalScrollbar, my_ParsedWords, my_RichText, PG_ScrollWidget::my_scrollarea, PG_Rect::my_xpos, PG_Rect::my_ypos, and PG_FontEngine::RenderText(). |
|
||||||||||||
|
Callback for the SizeWidget event.
Reimplemented from PG_ScrollWidget. Definition at line 685 of file pgrichedit.cpp. References PG_ScrollWidget::eventSizeWidget(), and SetLineWidth(). |
|
|
Load the content of the widget from a text file. This function loads the text of the widget from a file. As ever this file operation is done transparently through PhysFS so you can place any text files into your theme and or file archives.
Definition at line 654 of file pgrichedit.cpp. References PG_DataContainer::data(), PG_FileArchive::ReadFile(), SetText(), and PG_DataContainer::size(). |
|
|
Remove a widget from the list.
Reimplemented from PG_Widget. Definition at line 115 of file pgrichedit.cpp. References PG_Widget::RemoveChild(). |
|
|
Set default alignment.
Definition at line 62 of file pgrichedit.cpp. |
|
||||||||||||
|
Resize the widget automatically if there is not enough space.
Reimplemented from PG_ScrollWidget. Definition at line 66 of file pgrichedit.cpp. References my_AutoHorizontalResize, and my_AutoVerticalResize. |
|
|
Set line width.
Definition at line 680 of file pgrichedit.cpp. References PG_Widget::GetText(), my_LineWidth, and SetText(). Referenced by eventSizeWidget(). |
|
|
Set tab size.
Definition at line 671 of file pgrichedit.cpp. References my_TabSize. |
|
|
Sets rich text.
Reimplemented from PG_Widget. Definition at line 121 of file pgrichedit.cpp. References my_LineWidth, PG_ScrollWidget::my_scrollarea, PG_Widget::my_text, PG_ScrollArea::SetAreaHeight(), and PG_ScrollArea::SetAreaWidth(). Referenced by IngameMessageViewer::IngameMessageViewer(), LoadText(), and SetLineWidth(). |
|
|
Definition at line 112 of file pgrichedit.h. Referenced by PG_RichEdit(), and SetAutoResize(). |
|
|
Definition at line 111 of file pgrichedit.h. Referenced by PG_RichEdit(), and SetAutoResize(). |
|
|
Definition at line 169 of file pgrichedit.h. Referenced by PG_RichEdit(). |
|
|
Definition at line 172 of file pgrichedit.h. Referenced by PG_RichEdit(), SetLineWidth(), and SetText(). |
|
|
Definition at line 127 of file pgrichedit.h. Referenced by eventBlit(). |
|
|
Definition at line 167 of file pgrichedit.h. Referenced by eventBlit(). |
|
|
Definition at line 171 of file pgrichedit.h. Referenced by PG_RichEdit(), and SetTabSize(). |
1.4.2