OpenMW
|
utilities for parsing book/scroll text as mygui widgets More...
#include <formatting.hpp>
Public Member Functions | |
MyGUI::IntSize | parsePage (std::string text, MyGUI::Widget *parent, const int width) |
MyGUI::IntSize | parseScroll (std::string text, MyGUI::Widget *parent, const int width) |
std::vector< std::string > | split (std::string text, const int width, const int height) |
Protected Member Functions | |
float | widthForCharGlyph (unsigned unicodeChar) const |
float | currentFontHeight () const |
void | parseSubText (std::string text) |
void | parseImage (std::string tag, bool createWidget=true) |
void | parseDiv (std::string tag) |
void | parseFont (std::string tag) |
Private Attributes | |
MyGUI::Widget * | mParent |
int | mWidth |
int | mHeight |
TextStyle | mTextStyle |
utilities for parsing book/scroll text as mygui widgets
float MWGui::BookTextParser::currentFontHeight | ( | ) | const [protected] |
void MWGui::BookTextParser::parseDiv | ( | std::string | tag | ) | [protected] |
void MWGui::BookTextParser::parseFont | ( | std::string | tag | ) | [protected] |
void MWGui::BookTextParser::parseImage | ( | std::string | tag, |
bool | createWidget = true |
||
) | [protected] |
MyGUI::IntSize MWGui::BookTextParser::parsePage | ( | std::string | text, |
MyGUI::Widget * | parent, | ||
const int | width | ||
) |
Parse markup as MyGUI widgets
markup | to parse |
parent | for the created widgets |
maximum | width |
MyGUI::IntSize MWGui::BookTextParser::parseScroll | ( | std::string | text, |
MyGUI::Widget * | parent, | ||
const int | width | ||
) |
Parse markup as MyGUI widgets
markup | to parse |
parent | for the created widgets |
maximum | width |
void MWGui::BookTextParser::parseSubText | ( | std::string | text | ) | [protected] |
std::vector< std::string > MWGui::BookTextParser::split | ( | std::string | text, |
const int | width, | ||
const int | height | ||
) |
Split the specified text into pieces that fit in the area specified by width and height parameters
float MWGui::BookTextParser::widthForCharGlyph | ( | unsigned | unicodeChar | ) | const [protected] |
int MWGui::BookTextParser::mHeight [private] |
MyGUI::Widget* MWGui::BookTextParser::mParent [private] |
TextStyle MWGui::BookTextParser::mTextStyle [private] |
int MWGui::BookTextParser::mWidth [private] |