wx.richtext.RichTextHeaderFooterData¶
This class represents header and footer data to be passed to the wx.richtext.RichTextPrinting and 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 wx.richtext.RichTextPrinting or RichTextLayout constructor.
Class Hierarchy¶
Methods Summary¶
Constructors. |
|
Clears all text. |
|
Copies the data. |
|
Returns the font specified for printing the header and footer. |
|
Returns the margin between the text and the footer. |
|
Returns the footer text on odd or even pages, and at a given position on the page (left, centre or right). |
|
Returns the margin between the text and the header. |
|
Returns the header text on odd or even pages, and at a given position on the page (left, centre or right). |
|
Returns |
|
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). |
|
Returns the text colour for drawing the header and footer. |
|
Initialises the object. |
|
Sets the font for drawing the header and footer. |
|
Sets the footer text on odd or even pages, and at a given position on the page (left, centre or right). |
|
Sets the header text on odd or even pages, and at a given position on the page (left, centre or right). |
|
Sets the margins between text and header or footer, in tenths of a millimeter. |
|
Pass |
|
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). |
|
Sets the text colour for drawing the header and footer. |
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
|
See |
Class API¶
- class wx.richtext.RichTextHeaderFooterData(Object)¶
Possible constructors:
RichTextHeaderFooterData() -> None RichTextHeaderFooterData(data) -> None
This class represents header and footer data to be passed to the RichTextPrinting and RichTextPrintout classes.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self)
Constructors.
- Return type:
None
__init__ (self, data)
- Parameters:
- Return type:
None
- Clear(self)¶
Clears all text.
- Return type:
None
- Copy(self, data)¶
Copies the data.
- Parameters:
- Return type:
None
- GetFooterMargin(self)¶
Returns the margin between the text and the footer.
- Return type:
int
- 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).
- Parameters:
page (RichTextOddEvenPage)
location (RichTextPageLocation)
- Return type:
str
- GetHeaderMargin(self)¶
Returns the margin between the text and the header.
- Return type:
int
- 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).
- Parameters:
page (RichTextOddEvenPage)
location (RichTextPageLocation)
- Return type:
str
- GetShowOnFirstPage(self)¶
Returns
True
if the header and footer will be shown on the first page.- Return type:
bool
- 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).
- Parameters:
headerFooter (int)
page (RichTextOddEvenPage)
location (RichTextPageLocation)
- Return type:
str
- GetTextColour(self)¶
Returns the text colour for drawing the header and footer.
- Return type:
Colour
- Init(self)¶
Initialises the object.
- Return type:
None
- SetFont(self, font)¶
Sets the font for drawing the header and footer.
- Parameters:
font (wx.Font)
- Return type:
None
- 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).
- Parameters:
text (string)
page (RichTextOddEvenPage)
location (RichTextPageLocation)
- Return type:
None
- 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).
- Parameters:
text (string)
page (RichTextOddEvenPage)
location (RichTextPageLocation)
- Return type:
None
- SetMargins(self, headerMargin, footerMargin)¶
Sets the margins between text and header or footer, in tenths of a millimeter.
- Parameters:
headerMargin (int)
footerMargin (int)
- Return type:
None
- SetShowOnFirstPage(self, showOnFirstPage)¶
Pass
True
to show the header or footer on first page (the default).- Parameters:
showOnFirstPage (bool)
- Return type:
None
- 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).
- Parameters:
text (string)
headerFooter (int)
page (RichTextOddEvenPage)
location (RichTextPageLocation)
- Return type:
None
- SetTextColour(self, col)¶
Sets the text colour for drawing the header and footer.
- Parameters:
col (wx.Colour)
- Return type:
None
Properties¶
- FooterMargin¶
See
GetFooterMargin
- FooterText¶
See
GetFooterText
andSetFooterText
- HeaderMargin¶
See
GetHeaderMargin
- HeaderText¶
See
GetHeaderText
andSetHeaderText
- ShowOnFirstPage¶
See
GetShowOnFirstPage
andSetShowOnFirstPage
- TextColour¶
See
GetTextColour
andSetTextColour