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 wxPrintData& GetPrintData() const { return (wxPrintData&) m_printData; };
+ inline bool GetAbort() const { return sm_abortIt; }
///////////////////////////////////////////////////////////////////////////
// OVERRIDES
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; }
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame");
~wxPreviewFrame();
- bool OnClose();
+ void OnCloseWindow(wxCloseEvent& event);
virtual void Initialize();
virtual void CreateCanvas();
virtual void CreateControlBar();
wxWindow* m_previewCanvas;
wxPreviewControlBar* m_controlBar;
wxPrintPreviewBase* m_printPreview;
+
+DECLARE_EVENT_TABLE()
};
/*
inline virtual wxPrintPreviewBase *GetPrintPreview() const { return m_printPreview; }
void OnPrint(wxCommandEvent& event);
- void OnClose(wxCommandEvent& event);
+ void OnWindowClose(wxCommandEvent& event);
void OnNext(wxCommandEvent& event);
void OnPrevious(wxCommandEvent& event);
void OnZoom(wxCommandEvent& event);
DECLARE_EVENT_TABLE()
};
+/*
+ * Again, this only really needed for non-Windows platforms
+ * or if you want to test the PostScript printing under Windows,
+ * or if you're using the generic page setup dialog under e.g. Win16.
+ */
+
+class WXDLLEXPORT wxPrintPaperType: public wxObject
+{
+public:
+ wxPrintPaperType(const char *name = (const char *) NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0);
+ ~wxPrintPaperType();
+
+public:
+ int widthMM;
+ int heightMM;
+ int widthPixels;
+ int heightPixels;
+ char *pageName;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPrintPaperType)
+};
+
+class WXDLLEXPORT wxPrintPaperDatabase: public wxList
+{
+public:
+ wxPrintPaperDatabase();
+ ~wxPrintPaperDatabase();
+
+ void CreateDatabase();
+ void ClearDatabase();
+
+ void AddPaperType(const char *name, int wmm, int hmm, int wp, int hp);
+ wxPrintPaperType *FindPaperType(const char *name);
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPrintPaperDatabase)
+};
+
+WXDLLEXPORT_DATA(extern wxPrintPaperDatabase*) wxThePrintPaperDatabase;
+
+
#endif
// _WX_PRNTBASEH__