OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
MWGui::TypesetBookImpl::Typesetter Struct Reference
Inheritance diagram for MWGui::TypesetBookImpl::Typesetter:
Collaboration diagram for MWGui::TypesetBookImpl::Typesetter:

Classes

struct  PartialText
 

Public Types

typedef TypesetBookImpl Book
 
typedef boost::shared_ptr< BookBookPtr
 
typedef std::vector
< PartialText >
::const_iterator 
PartialTextConstIterator
 
- Public Types inherited from MWGui::BookTypesetter
enum  Alignment { AlignLeft = -1, AlignCenter = 0, AlignRight = +1 }
 
typedef boost::shared_ptr
< BookTypesetter
Ptr
 
typedef TypesetBook::InteractiveId InteractiveId
 
typedef MyGUI::Colour Colour
 
typedef uint8_t const * Utf8Point
 
typedef std::pair< Utf8Point,
Utf8Point
Utf8Span
 

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. More...
 
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. More...
 
void write (Style *style, size_t begin, size_t end)
 
void lineBreak (float margin)
 
void sectionBreak (int margin)
 
void setSectionAlignment (Alignment sectionAlignment)
 Changes the alignment for the current section of text. More...
 
TypesetBook::Ptr complete ()
 Finalize the document layout, and return a pointer to it. More...
 
void writeImpl (StyleImpl *style, Utf8Stream::Point _begin, Utf8Stream::Point _end)
 
void add_partial_text ()
 
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
 
std::vector< PartialTextmPartialWhitespace
 
std::vector< PartialTextmPartialWord
 
Book::Content const * mCurrentContent
 
Alignment mCurrentAlignment
 

Additional Inherited Members

- Static Public Member Functions inherited from MWGui::BookTypesetter
static Ptr create (int pageWidth, int pageHeight)
 A factory function for creating the default implementation of a book typesetter. More...
 

Member Typedef Documentation

Constructor & Destructor Documentation

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

Member Function Documentation

void MWGui::TypesetBookImpl::Typesetter::add_partial_text ( )
inline

Here is the call graph for this function:

Here is the caller graph for this function:

intptr_t MWGui::TypesetBookImpl::Typesetter::addContent ( Utf8Span  Text,
bool  Select 
)
inlinevirtual

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.

Here is the call graph for this function:

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

Here is the caller graph for this function:

TypesetBook::Ptr MWGui::TypesetBookImpl::Typesetter::complete ( )
inlinevirtual

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

Implements MWGui::BookTypesetter.

Here is the call graph for this function:

Style* MWGui::TypesetBookImpl::Typesetter::createHotStyle ( Style BaseStyle,
Colour  NormalColour,
Colour  HoverColour,
Colour  ActiveColour,
InteractiveId  Id,
bool  Unique 
)
inlinevirtual

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 
)
inlinevirtual

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

Implements MWGui::BookTypesetter.

void MWGui::TypesetBookImpl::Typesetter::lineBreak ( float  margin)
inlinevirtual

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.

Here is the call graph for this function:

void MWGui::TypesetBookImpl::Typesetter::sectionBreak ( int  margin)
inlinevirtual

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.

Here is the call graph for this function:

void MWGui::TypesetBookImpl::Typesetter::selectContent ( intptr_t  contentHandle)
inlinevirtual

Select a previously created content block for future writes.

Implements MWGui::BookTypesetter.

Here is the call graph for this function:

void MWGui::TypesetBookImpl::Typesetter::setSectionAlignment ( Alignment  sectionAlignment)
inlinevirtual

Changes the alignment for the current section of text.

Implements MWGui::BookTypesetter.

Here is the call graph for this function:

void MWGui::TypesetBookImpl::Typesetter::write ( Style style,
Utf8Span  text 
)
inlinevirtual

Implements MWGui::BookTypesetter.

Here is the call graph for this function:

void MWGui::TypesetBookImpl::Typesetter::write ( Style Style,
size_t  Begin,
size_t  End 
)
inlinevirtual

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

Implements MWGui::BookTypesetter.

Here is the call graph for this function:

void MWGui::TypesetBookImpl::Typesetter::writeImpl ( StyleImpl style,
Utf8Stream::Point  _begin,
Utf8Stream::Point  _end 
)
inline

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

BookPtr MWGui::TypesetBookImpl::Typesetter::mBook
Alignment MWGui::TypesetBookImpl::Typesetter::mCurrentAlignment
Book::Content const* MWGui::TypesetBookImpl::Typesetter::mCurrentContent
Line* MWGui::TypesetBookImpl::Typesetter::mLine
int MWGui::TypesetBookImpl::Typesetter::mPageHeight
int MWGui::TypesetBookImpl::Typesetter::mPageWidth
std::vector<PartialText> MWGui::TypesetBookImpl::Typesetter::mPartialWhitespace
std::vector<PartialText> MWGui::TypesetBookImpl::Typesetter::mPartialWord
Run* MWGui::TypesetBookImpl::Typesetter::mRun
Section* MWGui::TypesetBookImpl::Typesetter::mSection
std::vector<Alignment> MWGui::TypesetBookImpl::Typesetter::mSectionAlignment

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