.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.richtext.RichTextPrintout: ========================================================================================================================================== |phoenix_title| **wx.richtext.RichTextPrintout** ========================================================================================================================================== This class implements print layout for :ref:`wx.richtext.RichTextBuffer`. Instead of using it directly, you should normally use the :ref:`wx.richtext.RichTextPrinting` class. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class RichTextPrintout:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.richtext.RichTextPrintout.__init__` Constructor. :meth:`~wx.richtext.RichTextPrintout.CalculateScaling` Calculates scaling and text, header and footer rectangles. :meth:`~wx.richtext.RichTextPrintout.GetHeaderFooterData` Returns the header and footer data associated with the printout. :meth:`~wx.richtext.RichTextPrintout.GetPageInfo` Gets the page information. :meth:`~wx.richtext.RichTextPrintout.GetRichTextBuffer` Returns a pointer to the buffer being rendered. :meth:`~wx.richtext.RichTextPrintout.HasPage` Returns ``True`` if the given page exists in the printout. :meth:`~wx.richtext.RichTextPrintout.OnPreparePrinting` Prepares for printing, laying out the buffer and calculating pagination. :meth:`~wx.richtext.RichTextPrintout.OnPrintPage` Does the actual printing for this page. :meth:`~wx.richtext.RichTextPrintout.SetHeaderFooterData` Sets the header and footer data associated with the printout. :meth:`~wx.richtext.RichTextPrintout.SetMargins` Sets margins in 10ths of millimetre. :meth:`~wx.richtext.RichTextPrintout.SetRichTextBuffer` Sets the buffer to print. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.richtext.RichTextPrintout.HeaderFooterData` See :meth:`~wx.richtext.RichTextPrintout.GetHeaderFooterData` and :meth:`~wx.richtext.RichTextPrintout.SetHeaderFooterData` :attr:`~wx.richtext.RichTextPrintout.RichTextBuffer` See :meth:`~wx.richtext.RichTextPrintout.GetRichTextBuffer` and :meth:`~wx.richtext.RichTextPrintout.SetRichTextBuffer` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.richtext.RichTextPrintout(Printout) **Possible constructors**:: RichTextPrintout(title="Printout") This class implements print layout for RichTextBuffer. .. method:: __init__(self, title="Printout") Constructor. :param `title`: :type `title`: string .. method:: CalculateScaling(self, dc, textRect, headerRect, footerRect) Calculates scaling and text, header and footer rectangles. :param `dc`: :type `dc`: wx.DC :param `textRect`: :type `textRect`: wx.Rect :param `headerRect`: :type `headerRect`: wx.Rect :param `footerRect`: :type `footerRect`: wx.Rect .. method:: GetHeaderFooterData(self) Returns the header and footer data associated with the printout. :rtype: :ref:`wx.richtext.RichTextHeaderFooterData` .. method:: GetPageInfo(self) Gets the page information. :rtype: `tuple` :returns: ( `minPage`, `maxPage`, `selPageFrom`, `selPageTo` ) .. method:: GetRichTextBuffer(self) Returns a pointer to the buffer being rendered. :rtype: :ref:`wx.richtext.RichTextBuffer` .. method:: HasPage(self, page) Returns ``True`` if the given page exists in the printout. :param `page`: :type `page`: int :rtype: `bool` .. method:: OnPreparePrinting(self) Prepares for printing, laying out the buffer and calculating pagination. .. method:: OnPrintPage(self, page) Does the actual printing for this page. :param `page`: :type `page`: int :rtype: `bool` .. method:: SetHeaderFooterData(self, data) Sets the header and footer data associated with the printout. :param `data`: :type `data`: wx.richtext.RichTextHeaderFooterData .. method:: SetMargins(self, top=254, bottom=254, left=254, right=254) Sets margins in 10ths of millimetre. Defaults to 1 inch for margins. :param `top`: :type `top`: int :param `bottom`: :type `bottom`: int :param `left`: :type `left`: int :param `right`: :type `right`: int .. method:: SetRichTextBuffer(self, buffer) Sets the buffer to print. :ref:`wx.richtext.RichTextPrintout` does not manage this pointer; it should be managed by the calling code, such as :ref:`wx.richtext.RichTextPrinting`. :param `buffer`: :type `buffer`: wx.richtext.RichTextBuffer .. attribute:: HeaderFooterData See :meth:`~wx.richtext.RichTextPrintout.GetHeaderFooterData` and :meth:`~wx.richtext.RichTextPrintout.SetHeaderFooterData` .. attribute:: RichTextBuffer See :meth:`~wx.richtext.RichTextPrintout.GetRichTextBuffer` and :meth:`~wx.richtext.RichTextPrintout.SetRichTextBuffer`