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.
__init__ |
Constructors. |
Clear |
Clears all text. |
Copy |
Copies the data. |
GetFont |
Returns the font specified for printing the header and footer. |
GetFooterMargin |
Returns the margin between the text and the footer. |
GetFooterText |
Returns the footer text on odd or even pages, and at a given position on the page (left, centre or right). |
GetHeaderMargin |
Returns the margin between the text and the header. |
GetHeaderText |
Returns the header text on odd or even pages, and at a given position on the page (left, centre or right). |
GetShowOnFirstPage |
Returns True if the header and footer will be shown on the first page. |
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). |
GetTextColour |
Returns the text colour for drawing the header and footer. |
Init |
Initialises the object. |
SetFont |
Sets the font for drawing the header and footer. |
SetFooterText |
Sets the footer text on odd or even pages, and at a given position on the page (left, centre or right). |
SetHeaderText |
Sets the header text on odd or even pages, and at a given position on the page (left, centre or right). |
SetMargins |
Sets the margins between text and header or footer, in tenths of a millimeter. |
SetShowOnFirstPage |
Pass True to show the header or footer on first page (the default). |
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). |
SetTextColour |
Sets the text colour for drawing the header and footer. |
Font |
See GetFont and SetFont |
FooterMargin |
See GetFooterMargin |
FooterText |
See GetFooterText and SetFooterText |
HeaderMargin |
See GetHeaderMargin |
HeaderText |
See GetHeaderText and SetHeaderText |
ShowOnFirstPage |
See GetShowOnFirstPage and SetShowOnFirstPage |
TextColour |
See GetTextColour and SetTextColour |
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.
__init__
(self, *args, **kw)¶Constructors.
__init__ (self)
__init__ (self, data)
Parameters: | data (wx.richtext.RichTextHeaderFooterData) – |
---|
Clear
(self)¶Clears all text.
Copy
(self, data)¶Copies the data.
Parameters: | data (wx.richtext.RichTextHeaderFooterData) – |
---|
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: |
|
---|---|
Return type: |
|
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: |
|
---|---|
Return type: |
|
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: |
|
---|---|
Return type: |
|
GetTextColour
(self)¶Returns the text colour for drawing the header and footer.
Return type: | Colour |
---|
Init
(self)¶Initialises the object.
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: |
|
---|
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: |
|
---|
SetMargins
(self, headerMargin, footerMargin)¶Sets the margins between text and header or footer, in tenths of a millimeter.
Parameters: |
|
---|
SetShowOnFirstPage
(self, showOnFirstPage)¶Pass True
to show the header or footer on first page (the default).
Parameters: | showOnFirstPage (bool) – |
---|
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: |
|
---|
SetTextColour
(self, col)¶Sets the text colour for drawing the header and footer.
Parameters: | col (wx.Colour) – |
---|
FooterMargin
¶See GetFooterMargin
FooterText
¶See GetFooterText
and SetFooterText
HeaderMargin
¶See GetHeaderMargin
HeaderText
¶See GetHeaderText
and SetHeaderText
ShowOnFirstPage
¶See GetShowOnFirstPage
and SetShowOnFirstPage
TextColour
¶See GetTextColour
and SetTextColour