Drag[en]gine Script Module DragonScript
1.21
|
Styled text document. More...
Public Member Functions | |
void | addPage (StyledTextRendering page) |
Add page. More... | |
void | addToCanvas (CanvasView canvas, int page, Point position, StyledTextDocumentUpdater updater) |
void | forEachPage (Block ablock) |
Visit pages with block with StyledTextRendering as parameter. More... | |
StyledTextDefinition | getDefinition () |
Styled text definition. More... | |
StyledTextRendering | getPageAt (int number) |
Page at number. More... | |
int | getPageCount () |
Number of pages. More... | |
Point | getPageSize () |
Page size in pixels. More... | |
StyledTextDocument | new () |
Create styled text document. More... | |
void | rebuildPages () |
Rebuild pages. More... | |
void | removeAllPages () |
Remove all pages. More... | |
void | setDefinition (StyledTextDefinition definition) |
Set styled text definition. More... | |
void | setPageSize (Point size) |
Set page size in pixels. More... | |
Styled text document.
Convenciene class to manage a styled text document. Contains a styled text definition object defining the content of the document, a styled text converter to convert the definition into pages and a list of styled text rendering objects containing the individual pages in render ready form. This class allows to handle such documents in a simple way without having to worry about the individual parts of the whole. You can change the definition at any time. After doing changes you have to rebuild the pages using the rebuildPages method. Afterwards you can render individual pages using the renderPage method.
void Dragengine.Utils.StyledText.StyledTextDocument.addPage | ( | StyledTextRendering | page | ) |
Add page.
void Dragengine.Utils.StyledText.StyledTextDocument.addToCanvas | ( | CanvasView | canvas, |
int | page, | ||
Point | position, | ||
StyledTextDocumentUpdater | updater | ||
) |
void Dragengine.Utils.StyledText.StyledTextDocument.forEachPage | ( | Block | ablock | ) |
Visit pages with block with StyledTextRendering as parameter.
StyledTextDefinition Dragengine.Utils.StyledText.StyledTextDocument.getDefinition | ( | ) |
Styled text definition.
StyledTextRendering Dragengine.Utils.StyledText.StyledTextDocument.getPageAt | ( | int | number | ) |
Page at number.
int Dragengine.Utils.StyledText.StyledTextDocument.getPageCount | ( | ) |
Number of pages.
Point Dragengine.Utils.StyledText.StyledTextDocument.getPageSize | ( | ) |
Page size in pixels.
StyledTextDocument Dragengine.Utils.StyledText.StyledTextDocument.new | ( | ) |
Create styled text document.
void Dragengine.Utils.StyledText.StyledTextDocument.rebuildPages | ( | ) |
Rebuild pages.
void Dragengine.Utils.StyledText.StyledTextDocument.removeAllPages | ( | ) |
Remove all pages.
void Dragengine.Utils.StyledText.StyledTextDocument.setDefinition | ( | StyledTextDefinition | definition | ) |
Set styled text definition.
void Dragengine.Utils.StyledText.StyledTextDocument.setPageSize | ( | Point | size | ) |
Set page size in pixels.