X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2a0eb92258a60c9e96978db7351c4ef86c8f0136..7826e2dd838d59c6a8061b4fdd9f7326a6e06de3:/include/wx/html/htmprint.h diff --git a/include/wx/html/htmprint.h b/include/wx/html/htmprint.h index e7d6dc59e8..d185767c94 100644 --- a/include/wx/html/htmprint.h +++ b/include/wx/html/htmprint.h @@ -38,17 +38,11 @@ class WXDLLEXPORT wxHtmlDCRenderer : public wxObject ~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 // @@ -79,7 +73,6 @@ class WXDLLEXPORT wxHtmlDCRenderer : public wxObject wxFileSystem *m_FS; wxHtmlContainerCell *m_Cells; int m_MaxWidth, m_Width, m_Height; - double m_Scale; }; @@ -186,14 +179,14 @@ class WXDLLEXPORT wxHtmlEasyPrinting : public wxObject wxHtmlEasyPrinting(const wxString& name = "Printing", wxFrame *parent_frame = NULL); ~wxHtmlEasyPrinting(); - void PreviewFile(const wxString &htmlfile); - void PreviewText(const wxString &htmltext, const wxString& basepath = wxEmptyString); + bool PreviewFile(const wxString &htmlfile); + bool PreviewText(const wxString &htmltext, const wxString& basepath = wxEmptyString); // Preview file / html-text for printing // (and offers printing) // basepath is base directory for opening subsequent files (e.g. from tag) - void PrintFile(const wxString &htmlfile); - void PrintText(const wxString &htmltext, const wxString& basepath = wxEmptyString); + bool PrintFile(const wxString &htmlfile); + bool PrintText(const wxString &htmltext, const wxString& basepath = wxEmptyString); // Print file / html-text w/o preview void PrinterSetup(); @@ -218,8 +211,8 @@ class WXDLLEXPORT wxHtmlEasyPrinting : public wxObject private: wxHtmlPrintout *CreatePrintout(); - void DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2); - void DoPrint(wxHtmlPrintout *printout); + bool DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2); + bool DoPrint(wxHtmlPrintout *printout); wxPrintData *m_PrintData; wxPageSetupDialogData *m_PageSetupData;