X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48ed4a8971d9ba09cc3d5eba09d22c7cf4095644..ac687ddffb6f199603abc2415f7bcf0d051f1eca:/samples/printing/printing.h diff --git a/samples/printing/printing.h b/samples/printing/printing.h index e167f6970d..00e6f64dcf 100644 --- a/samples/printing/printing.h +++ b/samples/printing/printing.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 1995 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -49,7 +48,7 @@ public: void OnPrint(wxCommandEvent& event); void OnPrintPreview(wxCommandEvent& event); void OnPageSetup(wxCommandEvent& event); -#if defined(__WXMSW__) && wxTEST_POSTSCRIPT_IN_MSW +#if wxUSE_POSTSCRIPT void OnPrintPS(wxCommandEvent& event); void OnPrintPreviewPS(wxCommandEvent& event); void OnPageSetupPS(wxCommandEvent& event); @@ -58,11 +57,14 @@ public: void OnPageMargins(wxCommandEvent& event); #endif + void OnPreviewFrameModalityKind(wxCommandEvent& event); + void OnExit(wxCommandEvent& event); void OnPrintAbout(wxCommandEvent& event); private: MyCanvas* m_canvas; + wxPreviewFrameModalityKind m_previewModality; DECLARE_EVENT_TABLE() }; @@ -84,13 +86,13 @@ private: class MyPrintout: public wxPrintout { public: - MyPrintout(MyFrame* frame, const wxString &title = _T("My printout")) + MyPrintout(MyFrame* frame, const wxString &title = wxT("My printout")) : wxPrintout(title) { m_frame=frame; } - bool OnPrintPage(int page); - bool HasPage(int page); - bool OnBeginDocument(int startPage, int endPage); - void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); + virtual bool OnPrintPage(int page); + virtual bool HasPage(int page); + virtual bool OnBeginDocument(int startPage, int endPage); + virtual void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); void DrawPageOne(); void DrawPageTwo(); @@ -104,16 +106,22 @@ private: // constants: +enum +{ + WXPRINT_PAGE_SETUP = 103, -#define WXPRINT_PAGE_SETUP 103 - -#define WXPRINT_PRINT_PS 105 -#define WXPRINT_PAGE_SETUP_PS 107 -#define WXPRINT_PREVIEW_PS 108 + WXPRINT_PRINT_PS, + WXPRINT_PAGE_SETUP_PS, + WXPRINT_PREVIEW_PS, -#define WXPRINT_ANGLEUP 110 -#define WXPRINT_ANGLEDOWN 111 + WXPRINT_ANGLEUP, + WXPRINT_ANGLEDOWN, #ifdef __WXMAC__ - #define WXPRINT_PAGE_MARGINS 112 + WXPRINT_PAGE_MARGINS, #endif + + WXPRINT_FRAME_MODAL_APP, + WXPRINT_FRAME_MODAL_WIN, + WXPRINT_FRAME_MODAL_NON +};