X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e306597309a120f2ae91385c731a5cb2722c52aa..33d28952b29818b6931d91984a7b612a072d843d:/include/wx/prntbase.h diff --git a/include/wx/prntbase.h b/include/wx/prntbase.h index 73a1b410a7..4d8699eca1 100644 --- a/include/wx/prntbase.h +++ b/include/wx/prntbase.h @@ -44,23 +44,23 @@ class WXDLLEXPORT wxPrinterBase: public wxObject DECLARE_CLASS(wxPrinterBase) public: - wxPrinterBase(wxPrintData *data = (wxPrintData *) NULL); + wxPrinterBase(wxPrintDialogData *data = (wxPrintDialogData *) NULL); ~wxPrinterBase(); virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); virtual void ReportError(wxWindow *parent, wxPrintout *printout, char *message); - inline wxPrintData& GetPrintData() { return m_printData; }; - inline bool GetAbort() { return sm_abortIt; } + inline wxPrintDialogData& GetPrintDialogData() const { return (wxPrintDialogData&) m_printDialogData; }; + inline bool GetAbort() const { return sm_abortIt; } /////////////////////////////////////////////////////////////////////////// // OVERRIDES virtual bool Setup(wxWindow *parent) = 0; virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE) = 0; - virtual bool PrintDialog(wxWindow *parent) = 0; + virtual wxDC* PrintDialog(wxWindow *parent) = 0; protected: - wxPrintData m_printData; + wxPrintDialogData m_printDialogData; wxPrintout* m_currentPrintout; public: static wxWindow* sm_abortWindow; @@ -96,21 +96,21 @@ public: virtual bool OnPrintPage(int page) = 0; virtual void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo); - inline virtual wxString GetTitle() { return m_printoutTitle; } + inline virtual wxString GetTitle() const { return m_printoutTitle; } - inline wxDC *GetDC() { return m_printoutDC; } + inline wxDC *GetDC() const { return m_printoutDC; } inline void SetDC(wxDC *dc) { m_printoutDC = dc; } inline void SetPageSizePixels(int w, int h) { m_pageWidthPixels = w; m_pageHeightPixels = h; } - inline void GetPageSizePixels(int *w, int *h) { *w = m_pageWidthPixels; *h = m_pageHeightPixels; } + inline void GetPageSizePixels(int *w, int *h) const { *w = m_pageWidthPixels; *h = m_pageHeightPixels; } inline void SetPageSizeMM(int w, int h) { m_pageWidthMM = w; m_pageHeightMM = h; } - inline void GetPageSizeMM(int *w, int *h) { *w = m_pageWidthMM; *h = m_pageHeightMM; } + inline void GetPageSizeMM(int *w, int *h) const { *w = m_pageWidthMM; *h = m_pageHeightMM; } inline void SetPPIScreen(int x, int y) { m_PPIScreenX = x; m_PPIScreenY = y; } - inline void GetPPIScreen(int *x, int *y) { *x = m_PPIScreenX; *y = m_PPIScreenY; } + inline void GetPPIScreen(int *x, int *y) const { *x = m_PPIScreenX; *y = m_PPIScreenY; } inline void SetPPIPrinter(int x, int y) { m_PPIPrinterX = x; m_PPIPrinterY = y; } - inline void GetPPIPrinter(int *x, int *y) { *x = m_PPIPrinterX; *y = m_PPIPrinterY; } + inline void GetPPIPrinter(int *x, int *y) const { *x = m_PPIPrinterX; *y = m_PPIPrinterY; } - inline virtual bool IsPreview() { return m_isPreview; } + inline virtual bool IsPreview() const { return m_isPreview; } inline virtual void SetIsPreview(bool p) { m_isPreview = p; } @@ -251,7 +251,7 @@ class WXDLLEXPORT wxPrintPreviewBase: public wxObject DECLARE_CLASS(wxPrintPreviewBase) public: - wxPrintPreviewBase(wxPrintout *printout, wxPrintout *printoutForPrinting = (wxPrintout *) NULL, wxPrintData *data = (wxPrintData *) NULL); + wxPrintPreviewBase(wxPrintout *printout, wxPrintout *printoutForPrinting = (wxPrintout *) NULL, wxPrintDialogData *data = (wxPrintDialogData *) NULL); ~wxPrintPreviewBase(); virtual bool SetCurrentPage(int pageNum); @@ -277,7 +277,7 @@ public: // a wxMemoryDC. virtual bool RenderPage(int pageNum); - inline wxPrintData& GetPrintData() { return m_printData; } + inline wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; } virtual void SetZoom(int percent); inline int GetZoom() const { return m_currentZoom; }; @@ -302,7 +302,7 @@ public: virtual void DetermineScaling() = 0; protected: - wxPrintData m_printData; + wxPrintDialogData m_printDialogData; wxWindow* m_previewCanvas; wxFrame* m_previewFrame; wxBitmap* m_previewBitmap;