X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23324ae1c7938ba904770fc456d3c07764b9c5e9..9effb77dbc83d7def19da6b61fe46f75b08420ef:/interface/html/htmprint.h diff --git a/interface/html/htmprint.h b/interface/html/htmprint.h index 1f0bb515a9..7e5cb99a06 100644 --- a/interface/html/htmprint.h +++ b/interface/html/htmprint.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: html/htmprint.h -// Purpose: documentation for wxHtmlDCRenderer class +// Purpose: interface of wxHtmlDCRenderer // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -9,12 +9,12 @@ /** @class wxHtmlDCRenderer @headerfile htmprint.h wx/html/htmprint.h - + This class can render HTML document into a specified area of a DC. You can use it - in your own printing code, although use of wxHtmlEasyPrinting + in your own printing code, although use of wxHtmlEasyPrinting or wxHtmlPrintout is strongly recommended. - + @library{wxhtml} @category{FIXME} */ @@ -38,57 +38,51 @@ public: /** Renders HTML text to the DC. - @param x,y - position of upper-left corner of printing rectangle (see SetSize) - - @param from - y-coordinate of the very first visible cell - - @param dont_render - if @true then this method only returns y coordinate of the next page - and does not output anything + @param x,y + position of upper-left corner of printing rectangle (see SetSize) + @param from + y-coordinate of the very first visible cell + @param dont_render + if @true then this method only returns y coordinate of the next page + and does not output anything */ - int Render(int x, int y, int from = 0, int dont_render = @false); + int Render(int x, int y, int from = 0, int dont_render = false); /** Assign DC instance to the renderer. - - @e pixel_scale can be used when rendering to high-resolution DCs (e.g. printer) + @a pixel_scale can be used when rendering to high-resolution DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in HTML are given in pixels -- e.g. image sizes. 300x300 image would be only one inch wide on typical printer. With pixel_scale = 3.0 it would be 3 inches.) */ -#define void SetDC(wxDC* dc, double pixel_scale = 1.0) /* implementation is private */ + void SetDC(wxDC* dc, double pixel_scale = 1.0); /** Sets fonts. See wxHtmlWindow::SetFonts for detailed description. - See also SetSize(). */ void SetFonts(const wxString& normal_face, const wxString& fixed_face, - const int sizes = @NULL); + const int sizes = NULL); /** - Assign text to the renderer. Render() then draws + Assign text to the renderer. Render() then draws the text onto DC. - @param html - HTML text. This is not a filename. - - @param basepath - base directory (html string would be stored there if it was in - file). It is used to determine path for loading images, for example. - - @param isdir - @false if basepath is filename, @true if it is directory name - (see wxFileSystem for detailed explanation) + @param html + HTML text. This is not a filename. + @param basepath + base directory (html string would be stored there if it was in + file). It is used to determine path for loading images, for example. + @param isdir + @false if basepath is filename, @true if it is directory name + (see wxFileSystem for detailed explanation) */ void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, - bool isdir = @true); + bool isdir = true); /** Set size of output rectangle, in pixels. Note that you @b can't change @@ -99,14 +93,15 @@ public: }; + /** @class wxHtmlEasyPrinting @headerfile htmprint.h wx/html/htmprint.h - - This class provides very simple interface to printing + + This class provides very simple interface to printing architecture. It allows you to print HTML documents using - only a few commands. - + only a few commands. + @library{wxhtml} @category{html} */ @@ -116,18 +111,17 @@ public: /** Constructor. - @param name - Name of the printing object. Used by preview frames and setup dialogs. - - @param parentWindow - pointer to the window that will own the preview frame and setup dialogs. May be - @NULL. + @param name + Name of the printing object. Used by preview frames and setup dialogs. + @param parentWindow + pointer to the window that will own the preview frame and setup dialogs. + May be @NULL. */ wxHtmlEasyPrinting(const wxString& name = "Printing", - wxWindow* parentWindow = @NULL); + wxWindow* parentWindow = NULL); /** - Returns a pointer to wxPageSetupDialogData instance used by + Returns a pointer to wxPageSetupDialogData instance used by this class. You can set its parameters (via SetXXXX methods). */ wxPageSetupDialogData* GetPageSetupData(); @@ -135,7 +129,7 @@ public: /** Gets the parent window for dialogs. */ - wxWindow* GetParentWindow(); + wxWindow* GetParentWindow() const; /** Returns pointer to wxPrintData instance used by this class. You can @@ -149,8 +143,7 @@ public: void PageSetup(); /** - Preview HTML file. - + Preview HTML file. Returns @false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error. @@ -158,25 +151,22 @@ public: bool PreviewFile(const wxString& htmlfile); /** - Preview HTML text (not file!). - + Preview HTML text (not file!). Returns @false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error. - @param htmltext - HTML text. - - @param basepath - base directory (html string would be stored there if it was in - file). It is used to determine path for loading images, for example. + @param htmltext + HTML text. + @param basepath + base directory (html string would be stored there if it was in + file). It is used to determine path for loading images, for example. */ bool PreviewText(const wxString& htmltext, const wxString& basepath = wxEmptyString); /** Print HTML file. - Returns @false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error. @@ -184,18 +174,16 @@ public: bool PrintFile(const wxString& htmlfile); /** - Print HTML text (not file!). - + Print HTML text (not file!). Returns @false in case of error -- call wxPrinter::GetLastError to get detailed information about the kind of the error. - @param htmltext - HTML text. - - @param basepath - base directory (html string would be stored there if it was in - file). It is used to determine path for loading images, for example. + @param htmltext + HTML text. + @param basepath + base directory (html string would be stored there if it was in + file). It is used to determine path for loading images, for example. */ bool PrintText(const wxString& htmltext, const wxString& basepath = wxEmptyString); @@ -206,39 +194,35 @@ public: */ void SetFonts(const wxString& normal_face, const wxString& fixed_face, - const int sizes = @NULL); + const int sizes = NULL); /** Set page footer. The following macros can be used inside it: - @DATE@ is replaced by the current date in default format @PAGENUM@ is replaced by page number @PAGESCNT@ is replaced by total number of pages @TIME@ is replaced by the current time in default format @TITLE@ is replaced with the title of the document - @param footer - HTML text to be used as footer. - - @param pg - one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants. + @param footer + HTML text to be used as footer. + @param pg + one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants. */ void SetFooter(const wxString& footer, int pg = wxPAGE_ALL); /** Set page header. The following macros can be used inside it: - @DATE@ is replaced by the current date in default format @PAGENUM@ is replaced by page number @PAGESCNT@ is replaced by total number of pages @TIME@ is replaced by the current time in default format @TITLE@ is replaced with the title of the document - @param header - HTML text to be used as header. - - @param pg - one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants. + @param header + HTML text to be used as header. + @param pg + one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants. */ void SetHeader(const wxString& header, int pg = wxPAGE_ALL); @@ -249,12 +233,13 @@ public: }; + /** @class wxHtmlPrintout @headerfile htmprint.h wx/html/htmprint.h - + This class serves as printout class for HTML documents. - + @library{wxhtml} @category{html} */ @@ -279,44 +264,40 @@ public: */ void SetFonts(const wxString& normal_face, const wxString& fixed_face, - const int sizes = @NULL); + const int sizes = NULL); /** Set page footer. The following macros can be used inside it: - @DATE@ is replaced by the current date in default format @PAGENUM@ is replaced by page number @PAGESCNT@ is replaced by total number of pages @TIME@ is replaced by the current time in default format @TITLE@ is replaced with the title of the document - @param footer - HTML text to be used as footer. - - @param pg - one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants. + @param footer + HTML text to be used as footer. + @param pg + one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants. */ void SetFooter(const wxString& footer, int pg = wxPAGE_ALL); /** Set page header. The following macros can be used inside it: - @DATE@ is replaced by the current date in default format @PAGENUM@ is replaced by page number @PAGESCNT@ is replaced by total number of pages @TIME@ is replaced by the current time in default format @TITLE@ is replaced with the title of the document - @param header - HTML text to be used as header. - - @param pg - one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants. + @param header + HTML text to be used as header. + @param pg + one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants. */ void SetHeader(const wxString& header, int pg = wxPAGE_ALL); /** - Prepare the class for printing this HTML @b file. The file may be located on + Prepare the class for printing this HTML @b file. The file may be located on any virtual file system or it may be normal file. */ void SetHtmlFile(const wxString& htmlfile); @@ -324,20 +305,18 @@ public: /** Prepare the class for printing this HTML text. - @param html - HTML text. (NOT file!) - - @param basepath - base directory (html string would be stored there if it was in - file). It is used to determine path for loading images, for example. - - @param isdir - @false if basepath is filename, @true if it is directory name - (see wxFileSystem for detailed explanation) + @param html + HTML text. (NOT file!) + @param basepath + base directory (html string would be stored there if it was in + file). It is used to determine path for loading images, for example. + @param isdir + @false if basepath is filename, @true if it is directory name + (see wxFileSystem for detailed explanation) */ void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, - bool isdir = @true); + bool isdir = true); /** Sets margins in millimeters. Defaults to 1 inch for margins and 0.5cm for space @@ -348,3 +327,4 @@ public: float right = 25.2, float spaces = 5); }; +