Drag[en]gine Script Module DragonScript Script API  1.0
StyledTextDocument Class Reference

Styled text document. More...

Inheritance diagram for StyledTextDocument:

Public Member Functions

void addPage (StyledTextRendering page)
 Add page. More...
 
void addToCanvas (CanvasView canvas, int page, Point position)
 Add canvas for a page. More...
 
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 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 addPage ( StyledTextRendering  page)

Add page.

§ addToCanvas()

void addToCanvas ( CanvasView  canvas,
int  page,
Point  position 
)

Add canvas for a page.

Canvas has to be of type Canvas.VIEW. Caller is responsible to remove all canvas if required.

§ forEachPage()

void forEachPage ( Block  ablock)

Visit pages with block with StyledTextRendering as parameter.

§ getDefinition()

StyledTextDefinition getDefinition ( )

Styled text definition.

§ getPageAt()

StyledTextRendering getPageAt ( int  number)

Page at number.

§ getPageCount()

int getPageCount ( )

Number of pages.

§ getPageSize()

Point getPageSize ( )

Page size in pixels.

§ new()

Create styled text document.

§ removeAllPages()

void removeAllPages ( )

Remove all pages.

§ setDefinition()

void setDefinition ( StyledTextDefinition  definition)

Set styled text definition.

§ setPageSize()

void setPageSize ( Point  size)

Set page size in pixels.


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