OpenCPN Partial API docs
Loading...
Searching...
No Matches
route_gui.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2022 by David Register *
3 * Copyright (C) 2022 Alec Leamas *
4 * Copyright (C) 2025 by NoCodeHummel *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
18 **************************************************************************/
19
26#ifndef _ROUTE_GUI_H
27#define _ROUTE_GUI_H
28
29#include <wx/gdicmn.h>
30#include <wx/dc.h>
31#include <wx/string.h>
32
33#include "model/route.h"
34
35#include "bbox.h"
36#include "chcanv.h"
37#include "ocpndc.h"
38#include "send_to_gps_dlg.h"
39#include "viewport.h"
40
41class RouteGui {
42public:
43 RouteGui(Route &route) : m_route(route) {}
44 virtual void Draw(ocpnDC &dc, ChartCanvas *canvas, const LLBBox &box);
45 void DrawPointWhich(ocpnDC &dc, ChartCanvas *canvas, int iPoint,
46 wxPoint *rpn);
47 void DrawSegment(ocpnDC &dc, ChartCanvas *canvas, wxPoint *rp1, wxPoint *rp2,
48 ViewPort &vp, bool bdraw_arrow);
49
50 void DrawGLLines(ViewPort &vp, ocpnDC *dc, ChartCanvas *canvas);
51 void DrawGL(ViewPort &vp, ChartCanvas *canvas, ocpnDC &dc);
52 void DrawGLRouteLines(ViewPort &vp, ChartCanvas *canvas, ocpnDC &dc);
53 void CalculateDCRect(wxDC &dc_route, ChartCanvas *canvas, wxRect *prect);
54 void RenderSegment(ocpnDC &dc, int xa, int ya, int xb, int yb, ViewPort &vp,
55 bool bdraw_arrow, int hilite_width = 0);
56 void RenderSegmentArrowsGL(ocpnDC &dc, int xa, int ya, int xb, int yb,
57 ViewPort &vp);
58 int SendToGPS(const wxString &com_name, bool bsend_waypoints,
59 SendToGpsDlg *dialog);
60 static bool OnDelete(wxWindow *parent, const int count = 0);
61
62private:
63 Route &m_route;
64};
65
66#endif // _ROUTE_GUI_H
Generic Chart canvas base.
ChartCanvas - Main chart display and interaction component.
Definition chcanv.h:157
Represents a navigational route in the navigation system.
Definition route.h:99
Dialog for sending routes/waypoints to a GPS device.
ViewPort - Core geographic projection and coordinate transformation engine.
Definition viewport.h:56
Device context class that can use either wxDC or OpenGL for drawing.
Definition ocpndc.h:60
Layer to use wxDC or opengl.
Route abstraction.
Send route/waypoint to GPS dialog.
Geographic projection and coordinate transformations.