OpenCPN Partial API docs
Loading...
Searching...
No Matches
track_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 TRACKPRINTOUT_H_
26#define TRACKPRINTOUT_H_
27
28#ifdef __WXMSW__
29#include <wx/msw/private.h>
30#endif
31
32#include "libgui/ui_utils.h"
33
34#include "navutil.h"
35#include "printout_base.h"
36#include "printtable.h"
37#include "track_prop_dlg.h"
38
39enum class TrackPrintOptions {
40 kTrackPosition,
41 kTrackCourse,
42 kTrackDistance,
43 kTrackTime,
44 kTrackSpeed
45};
46
50class TrackPrintDlg : public wxDialog {
51public:
52 explicit TrackPrintDlg(wxWindow* parent);
53
54 bool IsEnabled(TrackPrintOptions option) const;
55
56private:
57 std::unordered_map<TrackPrintOptions, int> IdByOption;
58};
59
64public:
70 TrackPrintout(Track* track, OCPNTrackListCtrl* lcPoints,
71 const TrackPrintDlg& dlg);
72
73 void OnPreparePrinting() override;
74
75protected:
76 PrintTable m_table;
77 Track* m_track;
78 int m_text_offset_x;
79 int m_text_offset_y;
80
81 void DrawPage(wxDC* dc, int page) override;
82};
83
84#endif
Application print support.
Extension of a class Table with printing into dc.
Definition printtable.h:178
Input dialog with track print selection.
Printout a table with track selected information.
void DrawPage(wxDC *dc, int page) override
Called by the print framework to draw the page.
Represents a track, which is a series of connected track points.
Definition track.h:117
Utility functions.
Print support abstract base class.
OpenCPN Route table printout.
Track Properties Dialog.
GUI library utils and events.