OpenCPN Partial API docs
ocpn_print.h
1 /***************************************************************************
2  *
3  * Project: OpenCPN
4  * Purpose: Application print support
5  * Author: David Register
6  *
7  ***************************************************************************
8  * Copyright (C) 2010 by David S. Register *
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  * This program is distributed in the hope that it will be useful, *
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18  * GNU General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU General Public License *
21  * along with this program; if not, write to the *
22  * Free Software Foundation, Inc., *
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
24  **************************************************************************/
25 
26 #ifndef _OCPN_PRINT_H__
27 #define _OCPN_PRINT_H__
28 
29 #include <wx/dc.h>
30 #include <wx/bitmap.h>
31 #include <wx/print.h>
32 #include <wx/string.h>
33 
34 class MyPrintout : public wxPrintout {
35 public:
36  MyPrintout(const wxChar *title = _T("My printout")) : wxPrintout(title) {}
37  virtual bool OnPrintPage(int page);
38  virtual bool HasPage(int page);
39  virtual bool OnBeginDocument(int startPage, int endPage);
40  virtual void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom,
41  int *selPageTo);
42 
43  void DrawPageOne(wxDC *dc);
44 
45  void GenerateGLbmp(void);
46 
47 private:
48  wxBitmap m_GLbmp;
49 };
50 
51 #endif // _OCPN_PRINT_H__