X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b45dfd0a8bfb8ad1199f8a6c28f473aaa86004b5..fce127d758a53bec28bce0c66f52a2e03ae9bf4b:/samples/printing/printing.h?ds=sidebyside diff --git a/samples/printing/printing.h b/samples/printing/printing.h index 6d02f5b1e3..9ccd72a277 100644 --- a/samples/printing/printing.h +++ b/samples/printing/printing.h @@ -1,5 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: printing.h +// Name: samples/printing.h + // Purpose: Printing demo for wxWidgets // Author: Julian Smart // Modified by: @@ -9,10 +10,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface -#endif - // Define a new application class MyApp: public wxApp { @@ -33,9 +30,13 @@ class MyFrame: public wxFrame { public: MyCanvas *canvas; + wxBitmap m_bitmap; + int m_angle; MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size); void Draw(wxDC& dc); + void OnAngleUp(wxCommandEvent& event); + void OnAngleDown(wxCommandEvent& event); void OnSize(wxSizeEvent& event); void OnPrint(wxCommandEvent& event); @@ -46,6 +47,9 @@ class MyFrame: public wxFrame void OnPrintPreviewPS(wxCommandEvent& event); void OnPageSetupPS(wxCommandEvent& event); #endif +#ifdef __WXMAC__ + void OnPageMargins(wxCommandEvent& event); +#endif void OnExit(wxCommandEvent& event); void OnPrintAbout(wxCommandEvent& event); @@ -68,14 +72,16 @@ DECLARE_EVENT_TABLE() class MyPrintout: public wxPrintout { public: - MyPrintout(wxChar *title = _T("My printout")):wxPrintout(title) {} + MyPrintout(const wxChar *title = _T("My printout")):wxPrintout(title) {} bool OnPrintPage(int page); bool HasPage(int page); bool OnBeginDocument(int startPage, int endPage); void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); - void DrawPageOne(wxDC *dc); - void DrawPageTwo(wxDC *dc); + void DrawPageOne(); + + void DrawPageTwo(); + }; #define WXPRINT_QUIT 100 @@ -89,3 +95,9 @@ class MyPrintout: public wxPrintout #define WXPRINT_ABOUT 109 +#define WXPRINT_ANGLEUP 110 +#define WXPRINT_ANGLEDOWN 111 + +#ifdef __WXMAC__ + #define WXPRINT_PAGE_MARGINS 112 +#endif