- public:
- MyPrintout(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);
+public:
+ 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);
+
+ void DrawPageOne();
+ void DrawPageTwo();
+
+ // Writes a header on a page. Margin units are in millimetres.
+ bool WritePageHeader(wxPrintout *printout, wxDC *dc, const wxString& text, float mmToLogical);
+
+private:
+ MyFrame *m_frame;