TQScintilla: TQextScintillaPrinter Class Reference

- Main Page
- Classes
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# TQextScintillaPrinter Class Reference

The TQextScintillaPrinter class is a sub-class of the TQt TQPrinter class that is able to print the text of a Scintilla document. More...

`#include <tqextscintillaprinter.h>`

List of all members.

## Public Member Functions

- TQextScintillaPrinter (PrinterMode mode=ScreenResolution)
- ~TQextScintillaPrinter ()
- virtual void formatPage (TQPainter &painter, bool drawing, TQRect &area, int pagenr)
- int magnification () const
- virtual void setMagnification (int magnification)
- virtual int printRange (TQextScintillaBase *tqsb, int from=-1, int to=-1)
- TQextScintilla::WrapMode wrapMode () const
- virtual void setWrapMode (TQextScintilla::WrapMode wmode)

## Detailed Description

The TQextScintillaPrinter class is a sub-class of the TQt TQPrinter class that is able to print the text of a Scintilla document.

The class can be further sub-classed to alter to layout of the text, adding headers and footers for example.

## Constructor & Destructor Documentation

TQextScintillaPrinter::TQextScintillaPrinter | ( | PrinterMode | mode = `ScreenResolution` | ) |

Constructs a printer paint device with mode mode.

TQextScintillaPrinter::~TQextScintillaPrinter | ( |  | ) |

Destroys the TQextScintillaPrinter instance.

## Member Function Documentation

virtual void TQextScintillaPrinter::formatPage | ( | TQPainter & | painter,
|  | bool | drawing,
|  | TQRect & | area,
|  | int | pagenr |
| ) |  |  | `[virtual]`

Format a page, by adding headers and footers for example, before the document text is drawn on it. painter is the painter to be used to add customised text and graphics. drawing is true if the page is actually being drawn rather than being sized. painter drawing methods must only be called when drawing is true. area is the area of the page that will be used to draw the text. This should be modified if it is necessary to reserve space for any customised text or graphics. By default the area is relative to the printable area of the page. Use TQPrinter::setFullPage() because calling printRange() if you want to try and print over the whole page. pagenr is the number of the page. The first page is numbered 1.

int TQextScintillaPrinter::magnification | ( |  | ) | const`[inline]`

Return the number of points to add to each font when printing.

See also:
  setMagnification()

virtual void TQextScintillaPrinter::setMagnification | ( | int | magnification | ) | `[virtual]`

Sets the number of points to add to each font when printing to magnification.

See also:
  magnification()

virtual int TQextScintillaPrinter::printRange | ( | TQextScintillaBase * | tqsb,
|  | int | from = `-1`,
|  | int | to = `-1` |
| ) |  |  | `[virtual]`

Print a range of lines from the Scintilla instance tqsb. from is the first line to print and a negative value signifies the first line of text. to is the last line to print and a negative value signifies the last line of text. true is returned if there was no error.

TQextScintilla::WrapMode TQextScintillaPrinter::wrapMode | ( |  | ) | const`[inline]`

Return the line wrap mode used when printing. The default is TQextScintilla::WrapWord.

See also:
  setWrapMode()

virtual void TQextScintillaPrinter::setWrapMode | ( | TQextScintilla::WrapMode | wmode | ) | `[virtual]`

Sets the line wrap mode used when printing to wmode.

See also:
  wrapMode()