wxHtmlEasyPrintingThis class provides very simple interface to printing architecture. It allows you to print HTML documents using only a few commands. Note Do not create this class on the stack only. You should create an instance on app startup and use this instance for all printing operations. The reason is that this class stores various settings in it. Derived from Include files <wx/html/htmprint.h> Members
wxHtmlEasyPrinting::wxHtmlEasyPrinting
wxHtmlEasyPrinting::wxHtmlEasyPrintingwxHtmlEasyPrinting(const wxString& name = "Printing", wxWindow* parentWindow = NULL) Constructor. Parameters name
parentWindow
wxHtmlEasyPrinting::GetParentWindowwxWindow* GetParentWindow() const Gets the parent window for dialogs.
wxHtmlEasyPrinting::GetPrintDatawxPrintData* GetPrintData() Returns pointer to wxPrintData instance used by this class. You can set its parameters (via SetXXXX methods).
wxHtmlEasyPrinting::GetPageSetupDatawxPageSetupDialogData* GetPageSetupData() Returns a pointer to wxPageSetupDialogData instance used by this class. You can set its parameters (via SetXXXX methods).
wxHtmlEasyPrinting::PreviewFilebool PreviewFile(const wxString& htmlfile) Preview HTML file. Returns false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error.
wxHtmlEasyPrinting::PreviewTextbool PreviewText(const wxString& htmltext, const wxString& basepath = wxEmptyString) Preview HTML text (not file!). Returns false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error. Parameters htmltext
basepath
wxHtmlEasyPrinting::PrintFilebool PrintFile(const wxString& htmlfile) Print HTML file. Returns false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error.
wxHtmlEasyPrinting::PrintTextbool PrintText(const wxString& htmltext, const wxString& basepath = wxEmptyString) Print HTML text (not file!). Returns false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error. Parameters htmltext
basepath
wxHtmlEasyPrinting::PageSetupvoid PageSetup() Display page setup dialog and allows the user to modify settings.
wxHtmlEasyPrinting::SetFontsvoid SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL) Sets fonts. See wxHtmlWindow::SetFonts for detailed description.
wxHtmlEasyPrinting::SetHeadervoid SetHeader(const wxString& header, int pg = wxPAGE_ALL) Set page header. The following macros can be used inside it:
Parameters header
pg
wxHtmlEasyPrinting::SetFootervoid SetFooter(const wxString& footer, int pg = wxPAGE_ALL) Set page footer. The following macros can be used inside it:
Parameters footer
pg
wxHtmlEasyPrinting::SetParentWindowvoid SetParentWindow(wxWindow* window) Sets the parent window for dialogs.
|