wx.richtext.RichTextPrinting¶
This class provides a simple interface for performing wx.richtext.RichTextBuffer printing and previewing.
It uses wx.richtext.RichTextPrintout for layout and rendering.
Class Hierarchy¶
Methods Summary¶
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. |
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
Class API¶
- class wx.richtext.RichTextPrinting(Object)¶
Possible constructors:
RichTextPrinting(name="Printing", parentWindow=None) -> None
This class provides a simple interface for performing RichTextBuffer printing and previewing.
Methods¶
- __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.
- Parameters:
name (string)
parentWindow (wx.Window)
- Return type:
None
A convenience function to get the footer text.
See wx.richtext.RichTextHeaderFooterData for details.
- Parameters:
page (RichTextOddEvenPage)
location (RichTextPageLocation)
- Return type:
str
Returns the internal wx.richtext.RichTextHeaderFooterData object.
- Return type:
- GetHeaderText(self, page=RICHTEXT_PAGE_EVEN, location=RICHTEXT_PAGE_CENTRE)¶
A convenience function to get the header text.
See wx.richtext.RichTextHeaderFooterData for details.
- Parameters:
page (RichTextOddEvenPage)
location (RichTextPageLocation)
- Return type:
str
- GetPageSetupData(self)¶
Returns a pointer to the internal page setup data.
- Return type:
PageSetupDialogData
- GetParentWindow(self)¶
Returns the parent window to be used for the preview window and printing wait dialog.
- Return type:
Window
- GetPreviewRect(self)¶
Returns the dimensions to be used for the preview window.
- Return type:
Rect
- GetTitle(self)¶
Returns the title of the preview window or printing wait caption.
- Return type:
str
- PageSetup(self)¶
Shows the page setup dialog.
- Return type:
None
- PreviewBuffer(self, buffer)¶
Shows a preview window for the given buffer.
The function takes its own copy of buffer.
- Parameters:
buffer (wx.richtext.RichTextBuffer)
- Return type:
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.- Parameters:
richTextFile (string)
- Return type:
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, orFalse
to print quietly.- Parameters:
buffer (wx.richtext.RichTextBuffer)
showPrintDialog (bool)
- Return type:
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 beTrue
to show the print dialog, orFalse
to print quietly.- Parameters:
richTextFile (string)
showPrintDialog (bool)
- Return type:
bool
A convenience function to set the footer text.
See wx.richtext.RichTextHeaderFooterData for details.
- Parameters:
text (string)
page (RichTextOddEvenPage)
location (RichTextPageLocation)
- Return type:
None
Sets the internal wx.richtext.RichTextHeaderFooterData object.
- Parameters:
- Return type:
None
Sets the wx.richtext.RichTextHeaderFooterData font.
- Parameters:
font (wx.Font)
- Return type:
None
Sets the wx.richtext.RichTextHeaderFooterData text colour.
- Parameters:
colour (wx.Colour)
- Return type:
None
- 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.
- Parameters:
text (string)
page (RichTextOddEvenPage)
location (RichTextPageLocation)
- Return type:
None
- SetPageSetupData(self, pageSetupData)¶
Sets the page setup data.
- Parameters:
pageSetupData (wx.PageSetupDialogData)
- Return type:
None
- SetParentWindow(self, parent)¶
Sets the parent window to be used for the preview window and printing wait dialog.
- Parameters:
parent (wx.Window)
- Return type:
None
- SetPreviewRect(self, rect)¶
Sets the dimensions to be used for the preview window.
- Parameters:
rect (wx.Rect)
- Return type:
None
- SetPrintData(self, printData)¶
Sets the print data.
- Parameters:
printData (wx.PrintData)
- Return type:
None
- SetShowOnFirstPage(self, show)¶
Pass
True
to show the header and footer on the first page.- Parameters:
show (bool)
- Return type:
None
- SetTitle(self, title)¶
Pass the title of the preview window or printing wait caption.
- Parameters:
title (string)
- Return type:
None
Properties¶
See
GetFooterText
andSetFooterText
- HeaderText¶
See
GetHeaderText
andSetHeaderText
- PageSetupData¶
See
GetPageSetupData
andSetPageSetupData
- ParentWindow¶
See
GetParentWindow
andSetParentWindow
- PreviewRect¶
See
GetPreviewRect
andSetPreviewRect
- PrintData¶
See
GetPrintData
andSetPrintData