OpenMW
Public Member Functions | Protected Member Functions | Private Attributes
MWGui::BookTextParser Class Reference

utilities for parsing book/scroll text as mygui widgets More...

#include <formatting.hpp>

List of all members.

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

Detailed Description

utilities for parsing book/scroll text as mygui widgets


Member Function Documentation

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

Parameters:
markupto parse
parentfor the created widgets
maximumwidth
Returns:
size of the created widgets
MyGUI::IntSize MWGui::BookTextParser::parseScroll ( std::string  text,
MyGUI::Widget *  parent,
const int  width 
)

Parse markup as MyGUI widgets

Parameters:
markupto parse
parentfor the created widgets
maximumwidth
Returns:
size of the created widgets
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]

Member Data Documentation

MyGUI::Widget* MWGui::BookTextParser::mParent [private]

The documentation for this class was generated from the following files: