#include </home/zeitlin/src/wx/github/interface/wx/richtext/richtextprint.h>
This class provides a simple interface for performing wxRichTextBuffer printing and previewing.
It uses wxRichTextPrintout for layout and rendering.
Public Member Functions | |
wxRichTextPrinting (const wxString &name="Printing", wxWindow *parentWindow=NULL) | |
Constructor. | |
wxString | GetFooterText (wxRichTextOddEvenPage page=wxRICHTEXT_PAGE_EVEN, wxRichTextPageLocation location=wxRICHTEXT_PAGE_CENTRE) const |
A convenience function to get the footer text. | |
const wxRichTextHeaderFooterData & | GetHeaderFooterData () const |
Returns the internal wxRichTextHeaderFooterData object. | |
wxString | GetHeaderText (wxRichTextOddEvenPage page=wxRICHTEXT_PAGE_EVEN, wxRichTextPageLocation location=wxRICHTEXT_PAGE_CENTRE) const |
A convenience function to get the header text. | |
wxPageSetupDialogData * | GetPageSetupData () |
Returns a pointer to the internal page setup data. | |
wxWindow * | GetParentWindow () const |
Returns the parent window to be used for the preview window and printing wait dialog. | |
const wxRect & | GetPreviewRect () const |
Returns the dimensions to be used for the preview window. | |
wxPrintData * | GetPrintData () |
Returns a pointer to the internal print data. | |
const wxString & | GetTitle () const |
Returns the title of the preview window or printing wait caption. | |
void | PageSetup () |
Shows the page setup dialog. | |
bool | PreviewBuffer (const wxRichTextBuffer &buffer) |
Shows a preview window for the given buffer. | |
bool | PreviewFile (const wxString &richTextFile) |
Shows a preview window for the given file. | |
bool | PrintBuffer (const wxRichTextBuffer &buffer, bool showPrintDialog=true) |
Prints the given buffer. | |
bool | PrintFile (const wxString &richTextFile, bool showPrintDialog=true) |
Prints the given file. | |
void | SetFooterText (const wxString &text, wxRichTextOddEvenPage page=wxRICHTEXT_PAGE_ALL, wxRichTextPageLocation location=wxRICHTEXT_PAGE_CENTRE) |
A convenience function to set the footer text. | |
void | SetHeaderFooterData (const wxRichTextHeaderFooterData &data) |
Sets the internal wxRichTextHeaderFooterData object. | |
void | SetHeaderFooterFont (const wxFont &font) |
Sets the wxRichTextHeaderFooterData font. | |
void | SetHeaderFooterTextColour (const wxColour &colour) |
Sets the wxRichTextHeaderFooterData text colour. | |
void | SetHeaderText (const wxString &text, wxRichTextOddEvenPage page=wxRICHTEXT_PAGE_ALL, wxRichTextPageLocation location=wxRICHTEXT_PAGE_CENTRE) |
A convenience function to set the header text. | |
void | SetPageSetupData (const wxPageSetupDialogData &pageSetupData) |
Sets the page setup data. | |
void | SetParentWindow (wxWindow *parent) |
Sets the parent window to be used for the preview window and printing wait dialog. | |
void | SetPreviewRect (const wxRect &rect) |
Sets the dimensions to be used for the preview window. | |
void | SetPrintData (const wxPrintData &printData) |
Sets the print data. | |
void | SetShowOnFirstPage (bool show) |
Pass true to show the header and footer on the first page. | |
void | SetTitle (const wxString &title) |
Pass the title of the preview window or printing wait caption. |
wxRichTextPrinting::wxRichTextPrinting | ( | const wxString & | name = "Printing" , |
wxWindow * | parentWindow = NULL |
||
) |
Constructor.
Optionally pass a title to be used in the preview frame and printing wait dialog, and also a parent window for these windows.
wxString wxRichTextPrinting::GetFooterText | ( | wxRichTextOddEvenPage | page = wxRICHTEXT_PAGE_EVEN , |
wxRichTextPageLocation | location = wxRICHTEXT_PAGE_CENTRE |
||
) | const |
A convenience function to get the footer text.
See wxRichTextHeaderFooterData for details.
const wxRichTextHeaderFooterData& wxRichTextPrinting::GetHeaderFooterData | ( | ) | const |
Returns the internal wxRichTextHeaderFooterData object.
wxString wxRichTextPrinting::GetHeaderText | ( | wxRichTextOddEvenPage | page = wxRICHTEXT_PAGE_EVEN , |
wxRichTextPageLocation | location = wxRICHTEXT_PAGE_CENTRE |
||
) | const |
A convenience function to get the header text.
See wxRichTextHeaderFooterData for details.
wxPageSetupDialogData* wxRichTextPrinting::GetPageSetupData | ( | ) |
Returns a pointer to the internal page setup data.
wxWindow* wxRichTextPrinting::GetParentWindow | ( | ) | const |
Returns the parent window to be used for the preview window and printing wait dialog.
const wxRect& wxRichTextPrinting::GetPreviewRect | ( | ) | const |
Returns the dimensions to be used for the preview window.
wxPrintData* wxRichTextPrinting::GetPrintData | ( | ) |
Returns a pointer to the internal print data.
const wxString& wxRichTextPrinting::GetTitle | ( | ) | const |
Returns the title of the preview window or printing wait caption.
void wxRichTextPrinting::PageSetup | ( | ) |
Shows the page setup dialog.
bool wxRichTextPrinting::PreviewBuffer | ( | const wxRichTextBuffer & | buffer | ) |
Shows a preview window for the given buffer.
The function takes its own copy of buffer.
bool wxRichTextPrinting::PreviewFile | ( | const wxString & | richTextFile | ) |
Shows a preview window for the given file.
richTextFile can be a text file or XML file, or other file depending on the available file handlers.
bool wxRichTextPrinting::PrintBuffer | ( | const wxRichTextBuffer & | buffer, |
bool | showPrintDialog = true |
||
) |
Prints the given buffer.
The function takes its own copy of buffer. can be true to show the print dialog, or false to print quietly.
bool wxRichTextPrinting::PrintFile | ( | const wxString & | richTextFile, |
bool | showPrintDialog = true |
||
) |
Prints the given file.
richTextFile can be a text file or XML file, or other file depending on the available file handlers. can be true to show the print dialog, or false to print quietly.
void wxRichTextPrinting::SetFooterText | ( | const wxString & | text, |
wxRichTextOddEvenPage | page = wxRICHTEXT_PAGE_ALL , |
||
wxRichTextPageLocation | location = wxRICHTEXT_PAGE_CENTRE |
||
) |
A convenience function to set the footer text.
See wxRichTextHeaderFooterData for details.
void wxRichTextPrinting::SetHeaderFooterData | ( | const wxRichTextHeaderFooterData & | data | ) |
Sets the internal wxRichTextHeaderFooterData object.
void wxRichTextPrinting::SetHeaderFooterFont | ( | const wxFont & | font | ) |
Sets the wxRichTextHeaderFooterData font.
void wxRichTextPrinting::SetHeaderFooterTextColour | ( | const wxColour & | colour | ) |
Sets the wxRichTextHeaderFooterData text colour.
void wxRichTextPrinting::SetHeaderText | ( | const wxString & | text, |
wxRichTextOddEvenPage | page = wxRICHTEXT_PAGE_ALL , |
||
wxRichTextPageLocation | location = wxRICHTEXT_PAGE_CENTRE |
||
) |
A convenience function to set the header text.
See wxRichTextHeaderFooterData for details.
void wxRichTextPrinting::SetPageSetupData | ( | const wxPageSetupDialogData & | pageSetupData | ) |
Sets the page setup data.
void wxRichTextPrinting::SetParentWindow | ( | wxWindow * | parent | ) |
Sets the parent window to be used for the preview window and printing wait dialog.
void wxRichTextPrinting::SetPreviewRect | ( | const wxRect & | rect | ) |
Sets the dimensions to be used for the preview window.
void wxRichTextPrinting::SetPrintData | ( | const wxPrintData & | printData | ) |
Sets the print data.
void wxRichTextPrinting::SetShowOnFirstPage | ( | bool | show | ) |
Pass true to show the header and footer on the first page.
void wxRichTextPrinting::SetTitle | ( | const wxString & | title | ) |
Pass the title of the preview window or printing wait caption.