OpenMW
Public Types | Public Member Functions | Public Attributes
MWGui::TypesetBookImpl::Typesetter Struct Reference

List of all members.

Public Types

typedef TypesetBookImpl Book
typedef boost::shared_ptr< BookBookPtr

Public Member Functions

 Typesetter (size_t width, size_t height)
virtual ~Typesetter ()
StylecreateStyle (char const *fontName, Colour fontColour)
 Create a simple text style consisting of a font and a text color.
StylecreateHotStyle (Style *baseStyle, Colour normalColour, Colour hoverColour, Colour activeColour, InteractiveId id, bool unique)
void write (Style *style, Utf8Span text)
intptr_t addContent (Utf8Span text, bool select)
void selectContent (intptr_t contentHandle)
 Select a previously created content block for future writes.
void write (Style *style, size_t begin, size_t end)
void lineBreak (float margin)
void sectionBreak (float margin)
void setSectionAlignment (Alignment sectionAlignment)
TypesetBook::Ptr complete ()
 Finalize the document layout, and return a pointer to it.
void writeImpl (StyleImpl *style, Utf8Stream::Point _begin, Utf8Stream::Point _end)
void append_run (StyleImpl *style, Utf8Stream::Point begin, Utf8Stream::Point end, int pc, int right, int bottom)

Public Attributes

int mPageWidth
int mPageHeight
BookPtr mBook
SectionmSection
LinemLine
RunmRun
std::vector< AlignmentmSectionAlignment
Book::Content const * mCurrentContent
Alignment mCurrentAlignment

Member Typedef Documentation


Constructor & Destructor Documentation

MWGui::TypesetBookImpl::Typesetter::Typesetter ( size_t  width,
size_t  height 
) [inline]
virtual MWGui::TypesetBookImpl::Typesetter::~Typesetter ( ) [inline, virtual]

Member Function Documentation

intptr_t MWGui::TypesetBookImpl::Typesetter::addContent ( Utf8Span  Text,
bool  Select 
) [inline, virtual]

Adds a content block to the document without laying it out. An identifier is returned that can be used to refer to it. If select is true, the block is activated to be references by future writes.

Implements MWGui::BookTypesetter.

void MWGui::TypesetBookImpl::Typesetter::append_run ( StyleImpl style,
Utf8Stream::Point  begin,
Utf8Stream::Point  end,
int  pc,
int  right,
int  bottom 
) [inline]

Finalize the document layout, and return a pointer to it.

Implements MWGui::BookTypesetter.

Style* MWGui::TypesetBookImpl::Typesetter::createHotStyle ( Style BaseStyle,
Colour  NormalColour,
Colour  HoverColour,
Colour  ActiveColour,
InteractiveId  Id,
bool  Unique 
) [inline, virtual]

Create a hyper-link style with a user-defined identifier based on an existing style. The unique flag forces a new instance of this style to be created even if an existing instance is present.

Implements MWGui::BookTypesetter.

Style* MWGui::TypesetBookImpl::Typesetter::createStyle ( char const *  Font,
Colour  Colour 
) [inline, virtual]

Create a simple text style consisting of a font and a text color.

Implements MWGui::BookTypesetter.

void MWGui::TypesetBookImpl::Typesetter::lineBreak ( float  margin) [inline, virtual]

Insert a line break into the document. Newline characters in the input text have the same affect. The margin parameter adds additional space before the next line of text.

Implements MWGui::BookTypesetter.

void MWGui::TypesetBookImpl::Typesetter::sectionBreak ( float  margin) [inline, virtual]

Insert a section break into the document. This causes a new section to begin when additional text is inserted. Pagination attempts to keep sections together on a single page. The margin parameter adds additional space before the next line of text.

Implements MWGui::BookTypesetter.

void MWGui::TypesetBookImpl::Typesetter::selectContent ( intptr_t  contentHandle) [inline, virtual]

Select a previously created content block for future writes.

Implements MWGui::BookTypesetter.

void MWGui::TypesetBookImpl::Typesetter::write ( Style style,
Utf8Span  text 
) [inline, virtual]

Implements MWGui::BookTypesetter.

void MWGui::TypesetBookImpl::Typesetter::write ( Style Style,
size_t  Begin,
size_t  End 
) [inline, virtual]

Layout a span of the selected content block into the document using the specified style.

Implements MWGui::BookTypesetter.


Member Data Documentation


The documentation for this struct was generated from the following file: