This class implements print layout for wx.richtext.RichTextBuffer.
Instead of using it directly, you should normally use the wx.richtext.RichTextPrinting class.
Constructor. |
|
Calculates scaling and text, header and footer rectangles. |
|
Returns the header and footer data associated with the printout. |
|
Gets the page information. |
|
Returns a pointer to the buffer being rendered. |
|
Returns |
|
Prepares for printing, laying out the buffer and calculating pagination. |
|
Does the actual printing for this page. |
|
Sets the header and footer data associated with the printout. |
|
Sets margins in 10ths of millimetre. |
|
Sets the buffer to print. |
See |
wx.richtext.
RichTextPrintout
(Printout)¶Possible constructors:
RichTextPrintout(title: str="Printout") -> None
This class implements print layout for RichTextBuffer.
__init__
(self, title: str="Printout")¶Constructor.
title (string) –
None
CalculateScaling
(self, dc : DC, textRect : Rect, headerRect : Rect, footerRect : Rect)¶Calculates scaling and text, header and footer rectangles.
Returns the header and footer data associated with the printout.
GetPageInfo
(self)¶Gets the page information.
Tuple[int, int, int, int]
GetRichTextBuffer
(self)¶Returns a pointer to the buffer being rendered.
HasPage
(self, page : int)¶Returns True
if the given page exists in the printout.
page (int) –
bool
OnPreparePrinting
(self)¶Prepares for printing, laying out the buffer and calculating pagination.
None
OnPrintPage
(self, page : int)¶Does the actual printing for this page.
page (int) –
bool
Sets the header and footer data associated with the printout.
data (wx.richtext.RichTextHeaderFooterData) –
None
SetMargins
(self, top: int=254, bottom: int=254, left: int=254, right: int=254)¶Sets margins in 10ths of millimetre.
Defaults to 1 inch for margins.
top (int) –
bottom (int) –
left (int) –
right (int) –
None
SetRichTextBuffer
(self, buffer : RichTextBuffer)¶Sets the buffer to print.
wx.richtext.RichTextPrintout does not manage this pointer; it should be managed by the calling code, such as wx.richtext.RichTextPrinting.
buffer (wx.richtext.RichTextBuffer) –
None
RichTextBuffer
¶See GetRichTextBuffer
and SetRichTextBuffer