OpenCPN Partial API docs
Loading...
Searching...
No Matches
route_printout.h
Go to the documentation of this file.
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, see <https://www.gnu.org/licenses/>. *
17 **************************************************************************/
18
25#ifndef ROUTEPRINTOUT_H_
26#define ROUTEPRINTOUT_H_
27
28#include <set>
29
30#include <wx/print.h>
31#include <wx/window.h>
32
33#include <wx/dc.h>
34
35#ifdef __WXMSW__
36#include <wx/msw/private.h>
37#endif
38
39#include "libgui/ui_utils.h"
40
41#include "printout_base.h"
42#include "printtable.h"
43
44enum class RoutePrintOptions {
45 kWaypointName,
46 kWaypointPosition,
47 kWaypointCourse,
48 kWaypointDistance,
49 kWaypointDescription,
50 kWaypointSpeed,
51 kWaypointETA,
52 kWaypointETD,
53 kWaypointTideEvent
54};
55
59class RoutePrintDlg : public wxDialog {
60public:
61 RoutePrintDlg(wxWindow* parent);
62 bool IsEnabled(RoutePrintOptions option) const;
63
64private:
65 std::unordered_map<RoutePrintOptions, int> IdByOption;
66};
67
73public:
80 RoutePrintout(Route* route, const RoutePrintDlg& dlg, const int tz_selection);
81
82 void OnPreparePrinting() override;
83
84protected:
85 PrintTable m_table;
86 Route* m_route;
87
88 int m_text_offset_x;
89 int m_text_offset_y;
90
91 void DrawPage(wxDC* dc, int page) override;
92};
93
94#endif
Application print support.
Extension of a class Table with printing into dc.
Definition printtable.h:178
Input dialog with route print selection.
Printout route information and a table with selected route point information.
void DrawPage(wxDC *dc, int page) override
Called by the print framework to draw the page.
Represents a navigational route in the navigation system.
Definition route.h:99
Print support abstract base class.
OpenCPN Route table printout.
GUI library utils and events.