Drag[en]gine Script Module DragonScript  1.23
Dragengine.Utils.StyledText.StyledTextDocument Class Reference

Styled text document. More...

Inheritance diagram for Dragengine.Utils.StyledText.StyledTextDocument:

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...
 

Detailed Description

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.

Member Function Documentation

◆ addPage()

void Dragengine.Utils.StyledText.StyledTextDocument.addPage ( StyledTextRendering  page)

Add page.

◆ addToCanvas()

void Dragengine.Utils.StyledText.StyledTextDocument.addToCanvas ( CanvasView  canvas,
int  page,
Point  position,
StyledTextDocumentUpdater  updater 
)

◆ forEachPage()

void Dragengine.Utils.StyledText.StyledTextDocument.forEachPage ( Block  ablock)

Visit pages with block with StyledTextRendering as parameter.

◆ getDefinition()

StyledTextDefinition Dragengine.Utils.StyledText.StyledTextDocument.getDefinition ( )

Styled text definition.

◆ getPageAt()

StyledTextRendering Dragengine.Utils.StyledText.StyledTextDocument.getPageAt ( int  number)

Page at number.

◆ getPageCount()

int Dragengine.Utils.StyledText.StyledTextDocument.getPageCount ( )

Number of pages.

◆ getPageSize()

Point Dragengine.Utils.StyledText.StyledTextDocument.getPageSize ( )

Page size in pixels.

◆ new()

StyledTextDocument Dragengine.Utils.StyledText.StyledTextDocument.new ( )

Create styled text document.

◆ rebuildPages()

void Dragengine.Utils.StyledText.StyledTextDocument.rebuildPages ( )

Rebuild pages.

◆ removeAllPages()

void Dragengine.Utils.StyledText.StyledTextDocument.removeAllPages ( )

Remove all pages.

◆ setDefinition()

void Dragengine.Utils.StyledText.StyledTextDocument.setDefinition ( StyledTextDefinition  definition)

Set styled text definition.

◆ setPageSize()

void Dragengine.Utils.StyledText.StyledTextDocument.setPageSize ( Point  size)

Set page size in pixels.


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