OpenCPN Partial API docs
Loading...
Searching...
No Matches
printout_base.h
1
/***************************************************************************
2
* Copyright (C) 2010 by David S. Register *
3
* Copyright (C) 2025 by NoCodeHummel *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
* *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
14
* *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19
**************************************************************************/
20
#ifndef PRINTOUT_BASE_H
21
#define PRINTOUT_BASE_H
22
23
#include <string>
24
#include <wx/dc.h>
25
#include <wx/print.h>
26
30
class
BasePrintout
:
public
wxPrintout {
31
public
:
32
BasePrintout
(
const
std::string &title = _(
"OpenCPN print"
).ToStdString());
33
34
// Methods required by wxPrintout.
35
bool
HasPage(
int
page)
override
;
36
bool
OnBeginDocument(
int
startPage,
int
endPage)
override
;
37
void
GetPageInfo(
int
*minPage,
int
*maxPage,
int
*selPageFrom,
38
int
*selPageTo)
override
;
39
bool
OnPrintPage(
int
page)
override
;
40
41
protected
:
42
int
m_pages;
43
int
m_margin_x;
44
int
m_margin_y;
45
51
virtual
void
DrawPage
(wxDC *dc,
int
page) = 0;
52
};
53
54
#endif
// PRINTOUT_BASE_H
BasePrintout
Application print support.
Definition
printout_base.h:30
BasePrintout::DrawPage
virtual void DrawPage(wxDC *dc, int page)=0
Called by the print framework to draw the page.
gui
include
gui
printout_base.h
Generated on Sat Apr 26 2025 02:28:44 for OpenCPN Partial API docs by
1.9.8