.. 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.png" 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="wx.richtext.RichTextHeaderFooterData" alt="" coords="5,83,279,112"/> <area shape="rect" id="node2" href="wx.Object.html" title="wx.Object" alt="" coords="99,5,185,35"/> </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()
       
       RichTextHeaderFooterData(data)
       
   
   This class represents header and footer data to be passed to the
   RichTextPrinting and RichTextPrintout classes.



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

      Constructors.                   


      |overload| Overloaded Implementations:

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

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

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






   .. method:: Clear(self)

      Clears all text.                   





   .. method:: Copy(self, data)

      Copies the data.                  


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







   .. method:: GetFont(self)

      Returns the font specified for printing the header and footer.                  

      :rtype: :ref:`Font`








   .. method:: GetFooterMargin(self)

      Returns the margin between the text and the footer.                  

      :rtype: `int`








   .. method:: GetFooterText(self, page=RICHTEXT_PAGE_EVEN, location=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: `string`








   .. method:: GetHeaderMargin(self)

      Returns the margin between the text and the header.                  

      :rtype: `int`








   .. method:: GetHeaderText(self, page=RICHTEXT_PAGE_EVEN, location=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: `string`








   .. method:: GetShowOnFirstPage(self)

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

      :rtype: `bool`








   .. method:: GetText(self, headerFooter, page, location)

      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: `string`








   .. method:: GetTextColour(self)

      Returns the text colour for drawing the header and footer.                  

      :rtype: :ref:`Colour`








   .. method:: Init(self)

      Initialises the object.                   





   .. method:: SetFont(self, font)

      Sets the font for drawing the header and footer.                  


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







   .. method:: SetFooterText(self, text, page=RICHTEXT_PAGE_ALL, location=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







   .. method:: SetHeaderText(self, text, page=RICHTEXT_PAGE_ALL, location=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







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

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


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







   .. method:: SetShowOnFirstPage(self, showOnFirstPage)

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


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







   .. method:: SetText(self, text, headerFooter, page, location)

      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







   .. method:: SetTextColour(self, col)

      Sets the text colour for drawing the header and footer.                  


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







   .. 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`

