This class provides a simple interface for performing wx.richtext.RichTextBuffer printing and previewing.
It uses wx.richtext.RichTextPrintout for layout and rendering.
Constructor. |
|
A convenience function to get the footer text. |
|
Returns the internal wx.richtext.RichTextHeaderFooterData object. |
|
A convenience function to get the header text. |
|
Returns a pointer to the internal page setup data. |
|
Returns the parent window to be used for the preview window and printing wait dialog. |
|
Returns the dimensions to be used for the preview window. |
|
Returns a pointer to the internal print data. |
|
Returns the title of the preview window or printing wait caption. |
|
Shows the page setup dialog. |
|
Shows a preview window for the given buffer. |
|
Shows a preview window for the given file. |
|
Prints the given buffer. |
|
Prints the given file. |
|
A convenience function to set the footer text. |
|
Sets the internal wx.richtext.RichTextHeaderFooterData object. |
|
Sets the wx.richtext.RichTextHeaderFooterData font. |
|
Sets the wx.richtext.RichTextHeaderFooterData text colour. |
|
A convenience function to set the header text. |
|
Sets the page setup data. |
|
Sets the parent window to be used for the preview window and printing wait dialog. |
|
Sets the dimensions to be used for the preview window. |
|
Sets the print data. |
|
Pass |
|
Pass the title of the preview window or printing wait caption. |
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
wx.richtext.
RichTextPrinting
(Object)¶Possible constructors:
RichTextPrinting(name="Printing", parentWindow=None)
This class provides a simple interface for performing RichTextBuffer printing and previewing.
__init__
(self, name="Printing", parentWindow=None)¶Constructor.
Optionally pass a title to be used in the preview frame and printing wait dialog, and also a parent window for these windows.
name (string) –
parentWindow (wx.Window) –
A convenience function to get the footer text.
See wx.richtext.RichTextHeaderFooterData for details.
page (RichTextOddEvenPage) –
location (RichTextPageLocation) –
string
Returns the internal wx.richtext.RichTextHeaderFooterData object.
GetHeaderText
(self, page=RICHTEXT_PAGE_EVEN, location=RICHTEXT_PAGE_CENTRE)¶A convenience function to get the header text.
See wx.richtext.RichTextHeaderFooterData for details.
page (RichTextOddEvenPage) –
location (RichTextPageLocation) –
string
GetPageSetupData
(self)¶Returns a pointer to the internal page setup data.
PageSetupDialogData
GetParentWindow
(self)¶Returns the parent window to be used for the preview window and printing wait dialog.
Window
GetPreviewRect
(self)¶Returns the dimensions to be used for the preview window.
Rect
GetTitle
(self)¶Returns the title of the preview window or printing wait caption.
string
PageSetup
(self)¶Shows the page setup dialog.
PreviewBuffer
(self, buffer)¶Shows a preview window for the given buffer.
The function takes its own copy of buffer.
buffer (wx.richtext.RichTextBuffer) –
bool
PreviewFile
(self, richTextFile)¶Shows a preview window for the given file.
richTextFile can be a text file or XML
file, or other file depending on the available file handlers.
richTextFile (string) –
bool
PrintBuffer
(self, buffer, showPrintDialog=True)¶Prints the given buffer.
The function takes its own copy of buffer. showPrintDialog can be True
to show the print dialog, or False
to print quietly.
buffer (wx.richtext.RichTextBuffer) –
showPrintDialog (bool) –
bool
PrintFile
(self, richTextFile, showPrintDialog=True)¶Prints the given file.
richTextFile can be a text file or XML
file, or other file depending on the available file handlers. showPrintDialog can be True
to show the print dialog, or False
to print quietly.
richTextFile (string) –
showPrintDialog (bool) –
bool
A convenience function to set the footer text.
See wx.richtext.RichTextHeaderFooterData for details.
text (string) –
page (RichTextOddEvenPage) –
location (RichTextPageLocation) –
Sets the internal wx.richtext.RichTextHeaderFooterData object.
data (wx.richtext.RichTextHeaderFooterData) –
Sets the wx.richtext.RichTextHeaderFooterData font.
font (wx.Font) –
Sets the wx.richtext.RichTextHeaderFooterData text colour.
colour (wx.Colour) –
SetHeaderText
(self, text, page=RICHTEXT_PAGE_ALL, location=RICHTEXT_PAGE_CENTRE)¶A convenience function to set the header text.
See wx.richtext.RichTextHeaderFooterData for details.
text (string) –
page (RichTextOddEvenPage) –
location (RichTextPageLocation) –
SetPageSetupData
(self, pageSetupData)¶Sets the page setup data.
pageSetupData (wx.PageSetupDialogData) –
SetParentWindow
(self, parent)¶Sets the parent window to be used for the preview window and printing wait dialog.
parent (wx.Window) –
SetPreviewRect
(self, rect)¶Sets the dimensions to be used for the preview window.
rect (wx.Rect) –
SetPrintData
(self, printData)¶Sets the print data.
printData (wx.PrintData) –
SetShowOnFirstPage
(self, show)¶Pass True
to show the header and footer on the first page.
show (bool) –
SetTitle
(self, title)¶Pass the title of the preview window or printing wait caption.
title (string) –
See GetFooterText
and SetFooterText
HeaderText
¶See GetHeaderText
and SetHeaderText
PageSetupData
¶See GetPageSetupData
and SetPageSetupData
ParentWindow
¶See GetParentWindow
and SetParentWindow
PreviewRect
¶See GetPreviewRect
and SetPreviewRect
PrintData
¶See GetPrintData
and SetPrintData