**************************** wx.richtext.RichTextPrinting **************************** Inheritance diagram for `wx.richtext.RichTextPrinting`: | .. inheritance-diagram:: wx.richtext.RichTextPrinting | Description =========== This class provides a simple interface for performing `wx.richtext.RichTextBuffer `_ printing and previewing. It uses `wx.richtext.RichTextPrintout `_ for layout and rendering. Derived From ^^^^^^^^^^^^^ * `wx.Object <../Widgets/wx.Object.html>`_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetFooterText <#GetFooterText>`_ * `GetHeaderFooterData <#GetHeaderFooterData>`_ * `GetHeaderText <#GetHeaderText>`_ * `GetPageSetupData <#GetPageSetupData>`_ * `GetParentWindow <#GetParentWindow>`_ * `GetPreviewRect <#GetPreviewRect>`_ * `GetPrintData <#GetPrintData>`_ * `GetRichTextBufferPreview <#GetRichTextBufferPreview>`_ * `GetRichTextBufferPrinting <#GetRichTextBufferPrinting>`_ * `GetTitle <#GetTitle>`_ * `PageSetup <#PageSetup>`_ * `PreviewBuffer <#PreviewBuffer>`_ * `PreviewFile <#PreviewFile>`_ * `PrintBuffer <#PrintBuffer>`_ * `PrintFile <#PrintFile>`_ * `SetFooterText <#SetFooterText>`_ * `SetHeaderFooterData <#SetHeaderFooterData>`_ * `SetHeaderFooterFont <#SetHeaderFooterFont>`_ * `SetHeaderFooterTextColour <#SetHeaderFooterTextColour>`_ * `SetHeaderText <#SetHeaderText>`_ * `SetPageSetupData <#SetPageSetupData>`_ * `SetParentWindow <#SetParentWindow>`_ * `SetPreviewRect <#SetPreviewRect>`_ * `SetPrintData <#SetPrintData>`_ * `SetRichTextBufferPreview <#SetRichTextBufferPreview>`_ * `SetRichTextBufferPrinting <#SetRichTextBufferPrinting>`_ * `SetShowOnFirstPage <#SetShowOnFirstPage>`_ * `SetTitle <#SetTitle>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(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 <../Widgets/wx.Window.html>`_) | **Returns:** `wx.richtext.RichTextPrinting `_ -------- .. method:: GetFooterText(page=wx.richtext.RICHTEXT_PAGE_EVEN, location=wx.richtext.RICHTEXT_PAGE_CENTRE) A convenience function to get the footer text. **Parameters:** * `page` (int) * `location` (int) | **Returns:** `string` -------- .. method:: GetHeaderFooterData() Returns the internal `wx.richtext.RichTextHeaderFooterData` object. | **Returns:** `wx.richtext.RichTextHeaderFooterData` -------- .. method:: GetHeaderText(page=wx.richtext.RICHTEXT_PAGE_EVEN, location=wx.richtext.RICHTEXT_PAGE_CENTRE) A convenience function to get the header text. **Parameters:** * `page` (int) * `location` (int) | **Returns:** `string` -------- .. method:: GetPageSetupData() Returns a pointer to the internal page setup data. | **Returns:** `wx.PageSetupDialogData <../Widgets/wx.PageSetupDialogData.html>`_ -------- .. method:: GetParentWindow() Returns the parent window to be used for the preview window and printing wait dialog. | **Returns:** `wx.Window <../Widgets/wx.Window.html>`_ -------- .. method:: GetPreviewRect() Returns the dimensions to be used for the preview window. | **Returns:** `wx.Rect <../Widgets/wx.Rect.html>`_ -------- .. method:: GetPrintData() Returns a pointer to the internal print data. | **Returns:** `wx.PrintData <../Widgets/wx.PrintData.html>`_ -------- .. method:: GetRichTextBufferPreview() `No docstrings available for this method.` -------- .. method:: GetRichTextBufferPrinting() `No docstrings available for this method.` -------- .. method:: GetTitle() Returns the title of the preview window or printing wait caption. | **Returns:** `string` -------- .. method:: PageSetup() Shows the page setup dialog. -------- .. method:: PreviewBuffer(buffer) Shows a preview window for the given buffer. The function takes its own copy of `buffer`. **Parameters:** * `buffer` (`wx.richtext.RichTextBuffer `_) | **Returns:** `bool` -------- .. method:: PreviewFile(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) | **Returns:** `bool` -------- .. method:: PrintBuffer(buffer) Prints the given buffer. The function takes its own copy of `buffer`. **Parameters:** * `buffer` (`wx.richtext.RichTextBuffer `_) | **Returns:** `bool` -------- .. method:: PrintFile(richTextFile) Prints the given file. `richTextFile` can be a text file or XML file, or other file depending on the available file handlers. **Parameters:** * `richTextFile` (string) | **Returns:** `bool` -------- .. method:: SetFooterText(text, page=wx.richtext.RICHTEXT_PAGE_ALL, location=wx.richtext.RICHTEXT_PAGE_CENTRE) A convenience function to set the footer text. **Parameters:** * `text` (string) * `page` (int) * `location` (int) -------- .. method:: SetHeaderFooterData(data) Sets the internal `wx.richtext.RichTextHeaderFooterData` object. **Parameters:** * `data` (`wx.richtext.RichTextHeaderFooterData`) -------- .. method:: SetHeaderFooterFont(font) Sets the `wx.richtext.RichTextHeaderFooterData` font. **Parameters:** * `font` (`wx.Font <../Widgets/wx.Font.html>`_) -------- .. method:: SetHeaderFooterTextColour(colour) Sets the `wx.richtext.RichTextHeaderFooterData` text colour. **Parameters:** * `colour` (`wx.Colour <../Widgets/wx.Colour.html>`_) -------- .. method:: SetHeaderText(text, page=wx.richtext.RICHTEXT_PAGE_ALL, location=wx.richtext.RICHTEXT_PAGE_CENTRE) A convenience function to set the header text. **Parameters:** * `text` (string) * `page` (int) * `location` (int) -------- .. method:: SetPageSetupData(pageSetupData) Sets the page setup data. **Parameters:** * `pageSetupData` (`wx.PageSetupDialogData <../Widgets/wx.PageSetupDialogData.html>`_) -------- .. method:: SetParentWindow(parent) Sets the parent window to be used for the preview window and printing wait dialog. **Parameters:** * `parent` (`wx.Window <../Widgets/wx.Window.html>`_) -------- .. method:: SetPreviewRect(rect) Sets the dimensions to be used for the preview window. **Parameters:** * `rect` (`wx.Rect <../Widgets/wx.Rect.html>`_) -------- .. method:: SetPrintData(printData) Sets the print data. **Parameters:** * `printData` (`wx.PrintData <../Widgets/wx.PrintData.html>`_) -------- .. method:: SetRichTextBufferPreview(buf) | **Parameters:** * `buf` (`wx.richtext.RichTextBuffer `_) -------- .. method:: SetRichTextBufferPrinting(buf) | **Parameters:** * `buf` (`wx.richtext.RichTextBuffer `_) -------- .. method:: SetShowOnFirstPage(show) Pass ``True`` to show the header and footer on the first page. **Parameters:** * `show` (bool) -------- .. method:: SetTitle(title) Pass the title of the preview window or printing wait caption. **Parameters:** * `title` (string)