StyledText.Printing

The Printing class : printing of a range of text. An instance of <code>Printing</code> is returned in the StyledText#print(Printer) API. The run() method may be invoked from any thread.

class StyledText
package static
class Printing : Runnable {
int LEFT;
int CENTER;
int RIGHT;
Printer printer;
StyledTextRenderer printerRenderer;
StyledTextPrintOptions printOptions;
Rectangle clientArea;
FontData fontData;
Font printerFont;
Resource[Resource] resources;
int tabLength;
GC gc;
int pageWidth;
int startPage;
int endPage;
int startLine;
int endLine;
bool singleLine;
Point selection;
bool mirrored;
int lineSpacing;
int printMargin;
}

Constructors

this
this(StyledText styledText, Printer printer, StyledTextPrintOptions printOptions)

Creates an instance of <code>Printing</code>. Copies the widget content and rendering data that needs to be requested from listeners. </p> @param parent StyledText widget to print. @param printer printer device to print on. @param printOptions print options

Members

Functions

cacheLineData
void cacheLineData(StyledText styledText)

Caches all line data that needs to be requested from a listener. </p> @param printerContent <code>StyledTextContent</code> to request line data for.

copyContent
StyledTextContent copyContent(StyledTextContent original)

Copies the text of the specified <code>StyledTextContent</code>. </p> @param original the <code>StyledTextContent</code> to copy.

dispose
void dispose()

Disposes of the resources and the <code>PrintRenderer</code>.

print
void print()

Prints the lines in the specified page range.

printDecoration
void printDecoration(int page, bool header, TextLayout layout)

Print header or footer decorations.

printDecorationSegment
void printDecorationSegment(String segment, int alignment, int page, bool header, TextLayout layout)

Print one segment of a header or footer decoration. Headers and footers have three different segments. One each for left aligned, centered, and right aligned text.

run
void run()

Starts a print job and prints the pages specified in the constructor.

Meta