OpenMW
|
A factory class for creating a typeset book instance. More...
#include <bookpage.hpp>
Classes | |
struct | Style |
Public Types | |
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 | |
virtual Style * | createStyle (char const *Font, Colour Colour)=0 |
Create a simple text style consisting of a font and a text color. More... | |
virtual Style * | createHotStyle (Style *BaseStyle, Colour NormalColour, Colour HoverColour, Colour ActiveColour, InteractiveId Id, bool Unique=true)=0 |
virtual void | lineBreak (float margin=0)=0 |
virtual void | sectionBreak (int margin=0)=0 |
virtual void | setSectionAlignment (Alignment sectionAlignment)=0 |
Changes the alignment for the current section of text. More... | |
virtual void | write (Style *Style, Utf8Span Text)=0 |
virtual intptr_t | addContent (Utf8Span Text, bool Select=true)=0 |
virtual void | selectContent (intptr_t contentHandle)=0 |
Select a previously created content block for future writes. More... | |
virtual void | write (Style *Style, size_t Begin, size_t End)=0 |
virtual TypesetBook::Ptr | complete ()=0 |
Finalize the document layout, and return a pointer to it. More... | |
Static Public Member Functions | |
static Ptr | create (int pageWidth, int pageHeight) |
A factory function for creating the default implementation of a book typesetter. More... | |
A factory class for creating a typeset book instance.
typedef MyGUI::Colour MWGui::BookTypesetter::Colour |
typedef boost::shared_ptr<BookTypesetter> MWGui::BookTypesetter::Ptr |
typedef uint8_t const* MWGui::BookTypesetter::Utf8Point |
typedef std::pair<Utf8Point, Utf8Point> MWGui::BookTypesetter::Utf8Span |
|
pure 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.
Implemented in MWGui::TypesetBookImpl::Typesetter.
|
pure virtual |
Finalize the document layout, and return a pointer to it.
Implemented in MWGui::TypesetBookImpl::Typesetter.
|
static |
A factory function for creating the default implementation of a book typesetter.
|
pure 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.
Implemented in MWGui::TypesetBookImpl::Typesetter.
Create a simple text style consisting of a font and a text color.
Implemented in MWGui::TypesetBookImpl::Typesetter.
|
pure 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.
Implemented in MWGui::TypesetBookImpl::Typesetter.
|
pure 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.
Implemented in MWGui::TypesetBookImpl::Typesetter.
|
pure virtual |
Select a previously created content block for future writes.
Implemented in MWGui::TypesetBookImpl::Typesetter.
|
pure virtual |
Changes the alignment for the current section of text.
Implemented in MWGui::TypesetBookImpl::Typesetter.
Implemented in MWGui::TypesetBookImpl::Typesetter.
|
pure virtual |
Layout a span of the selected content block into the document using the specified style.
Implemented in MWGui::TypesetBookImpl::Typesetter.