.. 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.RichTextHeaderFooterData:

==========================================================================================================================================
|phoenix_title|  **wx.richtext.RichTextHeaderFooterData**
==========================================================================================================================================

This class represents header and footer data to be passed to the :ref:`wx.richtext.RichTextPrinting`  and :ref:`wx.richtext.RichTextPrintout`  classes. 
         

Headers and footers can be specified independently for odd, even or both page sides. Different text can be specified for left, centre and right locations on the page, and the font and text colour can also be specified. 

You can specify the following keywords in header and footer text, which will be substituted for the actual values during printing and preview. 



- @``DATE``@: the current date. 
- @``PAGESCNT``@: the total number of pages. 
- @``PAGENUM``@: the current page number. 
- @``TIME``@: the current time. 
- @``TITLE``@: the title of the document, as passed to the :ref:`wx.richtext.RichTextPrinting`  or RichTextLayout constructor. 












|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>RichTextHeaderFooterData</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.richtext.RichTextHeaderFooterData_inheritance.svg" alt="Inheritance diagram of RichTextHeaderFooterData" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.richtext.RichTextHeaderFooterData.html" title="This class represents header and footer data to be passed to the wx.richtext.RichTextPrinting  and wx.richtext.RichTextPrintout  classes." alt="" coords="5,82,308,111"/> <area shape="rect" id="node2" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="107,5,206,34"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextHeaderFooterData.__init__`                           Constructors.
:meth:`~wx.richtext.RichTextHeaderFooterData.Clear`                              Clears all text.
:meth:`~wx.richtext.RichTextHeaderFooterData.Copy`                               Copies the data.
:meth:`~wx.richtext.RichTextHeaderFooterData.GetFont`                            Returns the font specified for printing the header and footer.
:meth:`~wx.richtext.RichTextHeaderFooterData.GetFooterMargin`                    Returns the margin between the text and the footer.
:meth:`~wx.richtext.RichTextHeaderFooterData.GetFooterText`                      Returns the footer text on odd or even pages, and at a given position on the page (left, centre or right).
:meth:`~wx.richtext.RichTextHeaderFooterData.GetHeaderMargin`                    Returns the margin between the text and the header.
:meth:`~wx.richtext.RichTextHeaderFooterData.GetHeaderText`                      Returns the header text on odd or even pages, and at a given position on the page (left, centre or right).
:meth:`~wx.richtext.RichTextHeaderFooterData.GetShowOnFirstPage`                 Returns ``True`` if the header and footer will be shown on the first page.
:meth:`~wx.richtext.RichTextHeaderFooterData.GetText`                            Helper function for getting the header or footer text, odd or even pages, and at a given position on the page (left, centre or right).
:meth:`~wx.richtext.RichTextHeaderFooterData.GetTextColour`                      Returns the text colour for drawing the header and footer.
:meth:`~wx.richtext.RichTextHeaderFooterData.Init`                               Initialises the object.
:meth:`~wx.richtext.RichTextHeaderFooterData.SetFont`                            Sets the font for drawing the header and footer.
:meth:`~wx.richtext.RichTextHeaderFooterData.SetFooterText`                      Sets the footer text on odd or even pages, and at a given position on the page (left, centre or right).
:meth:`~wx.richtext.RichTextHeaderFooterData.SetHeaderText`                      Sets the header text on odd or even pages, and at a given position on the page (left, centre or right).
:meth:`~wx.richtext.RichTextHeaderFooterData.SetMargins`                         Sets the margins between text and header or footer, in tenths of a millimeter.
:meth:`~wx.richtext.RichTextHeaderFooterData.SetShowOnFirstPage`                 Pass ``True`` to show the header or footer on first page (the default).
:meth:`~wx.richtext.RichTextHeaderFooterData.SetText`                            Helper function for setting the header or footer text, odd or even pages, and at a given position on the page (left, centre or right).
:meth:`~wx.richtext.RichTextHeaderFooterData.SetTextColour`                      Sets the text colour for drawing the header and footer.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.richtext.RichTextHeaderFooterData.Font`                               See :meth:`~wx.richtext.RichTextHeaderFooterData.GetFont` and :meth:`~wx.richtext.RichTextHeaderFooterData.SetFont`
:attr:`~wx.richtext.RichTextHeaderFooterData.FooterMargin`                       See :meth:`~wx.richtext.RichTextHeaderFooterData.GetFooterMargin`
:attr:`~wx.richtext.RichTextHeaderFooterData.FooterText`                         See :meth:`~wx.richtext.RichTextHeaderFooterData.GetFooterText` and :meth:`~wx.richtext.RichTextHeaderFooterData.SetFooterText`
:attr:`~wx.richtext.RichTextHeaderFooterData.HeaderMargin`                       See :meth:`~wx.richtext.RichTextHeaderFooterData.GetHeaderMargin`
:attr:`~wx.richtext.RichTextHeaderFooterData.HeaderText`                         See :meth:`~wx.richtext.RichTextHeaderFooterData.GetHeaderText` and :meth:`~wx.richtext.RichTextHeaderFooterData.SetHeaderText`
:attr:`~wx.richtext.RichTextHeaderFooterData.ShowOnFirstPage`                    See :meth:`~wx.richtext.RichTextHeaderFooterData.GetShowOnFirstPage` and :meth:`~wx.richtext.RichTextHeaderFooterData.SetShowOnFirstPage`
:attr:`~wx.richtext.RichTextHeaderFooterData.TextColour`                         See :meth:`~wx.richtext.RichTextHeaderFooterData.GetTextColour` and :meth:`~wx.richtext.RichTextHeaderFooterData.SetTextColour`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.richtext.RichTextHeaderFooterData(Object)

   **Possible constructors**::

       RichTextHeaderFooterData() -> None
       
       RichTextHeaderFooterData(data : RichTextHeaderFooterData) -> None
       
   
   This class represents header and footer data to be passed to the
   RichTextPrinting and RichTextPrintout classes.



   .. method:: __init__(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self)`
      
      Constructors. 
                       
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, data : RichTextHeaderFooterData)`
      
      
      
      
      :param `data`: 
      :type `data`: wx.richtext.RichTextHeaderFooterData
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: Clear(self)

      Clears all text. 
                 

      :rtype: `None`     








   .. method:: Copy(self, data : RichTextHeaderFooterData)

      Copies the data. 
                 


      :param `data`: 
      :type `data`: wx.richtext.RichTextHeaderFooterData




      :rtype: `None`     








   .. method:: GetFont(self)

      Returns the font specified for printing the header and footer. 
                 

      :rtype: `Font`     








   .. method:: GetFooterMargin(self)

      Returns the margin between the text and the footer. 
                 

      :rtype: `int`








   .. method:: GetFooterText(self, page: RichTextOddEvenPage=RICHTEXT_PAGE_EVEN, location: RichTextPageLocation=RICHTEXT_PAGE_CENTRE)

      Returns the footer text on odd or even pages, and at a given position on the page (left, centre or right). 
                 


      :param `page`: 
      :type `page`: wx.richtext.RichTextOddEvenPage
      :param `location`: 
      :type `location`: wx.richtext.RichTextPageLocation




      :rtype: `str`








   .. method:: GetHeaderMargin(self)

      Returns the margin between the text and the header. 
                 

      :rtype: `int`








   .. method:: GetHeaderText(self, page: RichTextOddEvenPage=RICHTEXT_PAGE_EVEN, location: RichTextPageLocation=RICHTEXT_PAGE_CENTRE)

      Returns the header text on odd or even pages, and at a given position on the page (left, centre or right). 
                 


      :param `page`: 
      :type `page`: wx.richtext.RichTextOddEvenPage
      :param `location`: 
      :type `location`: wx.richtext.RichTextPageLocation




      :rtype: `str`








   .. method:: GetShowOnFirstPage(self)

      Returns ``True`` if the header and footer will be shown on the first page. 
                 

      :rtype: `bool`








   .. method:: GetText(self, headerFooter : int, page : RichTextOddEvenPage, location : RichTextPageLocation)

      Helper function for getting the header or footer text, odd or even pages, and at a given position on the page (left, centre or right). 
                 


      :param `headerFooter`: 
      :type `headerFooter`: int
      :param `page`: 
      :type `page`: wx.richtext.RichTextOddEvenPage
      :param `location`: 
      :type `location`: wx.richtext.RichTextPageLocation




      :rtype: `str`








   .. method:: GetTextColour(self)

      Returns the text colour for drawing the header and footer. 
                 

      :rtype: `Colour`     








   .. method:: Init(self)

      Initialises the object. 
                 

      :rtype: `None`     








   .. method:: SetFont(self, font : Font)

      Sets the font for drawing the header and footer. 
                 


      :param `font`: 
      :type `font`: wx.Font




      :rtype: `None`     








   .. method:: SetFooterText(self, text : str, page: RichTextOddEvenPage=RICHTEXT_PAGE_ALL, location: RichTextPageLocation=RICHTEXT_PAGE_CENTRE)

      Sets the footer text on odd or even pages, and at a given position on the page (left, centre or right). 
                 


      :param `text`: 
      :type `text`: string
      :param `page`: 
      :type `page`: wx.richtext.RichTextOddEvenPage
      :param `location`: 
      :type `location`: wx.richtext.RichTextPageLocation




      :rtype: `None`     








   .. method:: SetHeaderText(self, text : str, page: RichTextOddEvenPage=RICHTEXT_PAGE_ALL, location: RichTextPageLocation=RICHTEXT_PAGE_CENTRE)

      Sets the header text on odd or even pages, and at a given position on the page (left, centre or right). 
                 


      :param `text`: 
      :type `text`: string
      :param `page`: 
      :type `page`: wx.richtext.RichTextOddEvenPage
      :param `location`: 
      :type `location`: wx.richtext.RichTextPageLocation




      :rtype: `None`     








   .. method:: SetMargins(self, headerMargin : int, footerMargin : int)

      Sets the margins between text and header or footer, in tenths of a millimeter. 
                 


      :param `headerMargin`: 
      :type `headerMargin`: int
      :param `footerMargin`: 
      :type `footerMargin`: int




      :rtype: `None`     








   .. method:: SetShowOnFirstPage(self, showOnFirstPage : bool)

      Pass ``True`` to show the header or footer on first page (the default). 
                 


      :param `showOnFirstPage`: 
      :type `showOnFirstPage`: bool




      :rtype: `None`     








   .. method:: SetText(self, text : str, headerFooter : int, page : RichTextOddEvenPage, location : RichTextPageLocation)

      Helper function for setting the header or footer text, odd or even pages, and at a given position on the page (left, centre or right). 
                 


      :param `text`: 
      :type `text`: string
      :param `headerFooter`: 
      :type `headerFooter`: int
      :param `page`: 
      :type `page`: wx.richtext.RichTextOddEvenPage
      :param `location`: 
      :type `location`: wx.richtext.RichTextPageLocation




      :rtype: `None`     








   .. method:: SetTextColour(self, col : Colour)

      Sets the text colour for drawing the header and footer. 
                 


      :param `col`: 
      :type `col`: wx.Colour




      :rtype: `None`     








   .. attribute:: Font

      See :meth:`~wx.richtext.RichTextHeaderFooterData.GetFont` and :meth:`~wx.richtext.RichTextHeaderFooterData.SetFont`


   .. attribute:: FooterMargin

      See :meth:`~wx.richtext.RichTextHeaderFooterData.GetFooterMargin`


   .. attribute:: FooterText

      See :meth:`~wx.richtext.RichTextHeaderFooterData.GetFooterText` and :meth:`~wx.richtext.RichTextHeaderFooterData.SetFooterText`


   .. attribute:: HeaderMargin

      See :meth:`~wx.richtext.RichTextHeaderFooterData.GetHeaderMargin`


   .. attribute:: HeaderText

      See :meth:`~wx.richtext.RichTextHeaderFooterData.GetHeaderText` and :meth:`~wx.richtext.RichTextHeaderFooterData.SetHeaderText`


   .. attribute:: ShowOnFirstPage

      See :meth:`~wx.richtext.RichTextHeaderFooterData.GetShowOnFirstPage` and :meth:`~wx.richtext.RichTextHeaderFooterData.SetShowOnFirstPage`


   .. attribute:: TextColour

      See :meth:`~wx.richtext.RichTextHeaderFooterData.GetTextColour` and :meth:`~wx.richtext.RichTextHeaderFooterData.SetTextColour`