X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ce369e6876c49ad7a101ad222048bd5446b7125..2a36259f27f58de31cdd66d6c5176e776fc25df3:/include/wx/html/htmprint.h?ds=inline diff --git a/include/wx/html/htmprint.h b/include/wx/html/htmprint.h index c35df126ec..f84dea24af 100644 --- a/include/wx/html/htmprint.h +++ b/include/wx/html/htmprint.h @@ -17,7 +17,7 @@ #include -#if wxUSE_PRINTING_ARCHITECTURE +#if wxUSE_HTML & wxUSE_PRINTING_ARCHITECTURE #include "wx/html/htmlcell.h" #include "wx/html/winpars.h" @@ -25,32 +25,24 @@ #include "wx/print.h" #include "wx/printdlg.h" - //-------------------------------------------------------------------------------- // wxHtmlDCRenderer // This class is capable of rendering HTML into specified // portion of DC //-------------------------------------------------------------------------------- - -class wxHtmlDCRenderer : public wxObject +class WXDLLEXPORT wxHtmlDCRenderer : public wxObject { public: wxHtmlDCRenderer(); ~wxHtmlDCRenderer(); // Following 3 methods *must* be called before any call to Render: - void SetDC(wxDC *dc, int maxwidth); + void SetDC(wxDC *dc, double pixel_scale = 1.0); // asign DC to this render - // maxwidth is width of area (on this DC) that is equivalent to screen's width, in pixels - // (you should set it to page width minus margins) - // Also see SetSize void SetSize(int width, int height); // sets size of output rectangle, in pixels. Note that you *can't* change // width of the rectangle between calls to Render! (You can freely change height.) - // If you set width = maxwidth then HTML is rendered as if it were displayed in fullscreen. - // If you set width = 1/2 maxwidth the it is rendered as if it covered half the screen - // and so on.. void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = TRUE); // sets the text to be displayed // @@ -81,7 +73,6 @@ class wxHtmlDCRenderer : public wxObject wxFileSystem *m_FS; wxHtmlContainerCell *m_Cells; int m_MaxWidth, m_Width, m_Height; - double m_Scale; }; @@ -103,7 +94,7 @@ enum { //-------------------------------------------------------------------------------- -class wxHtmlPrintout : public wxPrintout +class WXDLLEXPORT wxHtmlPrintout : public wxPrintout { public: wxHtmlPrintout(const wxString& title = "Printout"); @@ -140,7 +131,7 @@ class wxHtmlPrintout : public wxPrintout bool OnPrintPage(int page); bool HasPage(int page); void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); - bool OnBeginDocument(int start, int end); + bool OnBeginDocument(int startPage, int endPage); private: @@ -154,7 +145,7 @@ class wxHtmlPrintout : public wxPrintout private: int m_NumPages; - int m_PageBreaks[HTML_PRINT_MAX_PAGES]; + int m_PageBreaks[wxHTML_PRINT_MAX_PAGES]; wxString m_Document, m_BasePath; bool m_BasePathIsDir; @@ -181,7 +172,7 @@ class wxHtmlPrintout : public wxPrintout // stores page&printer settings in it. //-------------------------------------------------------------------------------- -class wxHtmlEasyPrinting : public wxObject +class WXDLLEXPORT wxHtmlEasyPrinting : public wxObject { public: @@ -233,7 +224,7 @@ class wxHtmlEasyPrinting : public wxObject -#endif // wxUSE_PRINTING_ARCHITECTURE +#endif // wxUSE_HTML & wxUSE_PRINTING_ARCHITECTURE #endif // _WX_HTMPRINT_H_