OpenCPN Partial API docs
Loading...
Searching...
No Matches
route_gui.h
1
2/***************************************************************************
3 *
4 * Project: OpenCPN
5 * Purpose: Route drawing stuff
6 * Author: David Register, Alec Leamas
7 *
8 ***************************************************************************
9 * Copyright (C) 2022 by David Register, Alec Leamas *
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 * This program is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * GNU General Public License for more details. *
20 * *
21 * You should have received a copy of the GNU General Public License *
22 * along with this program; if not, write to the *
23 * Free Software Foundation, Inc., *
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
25 **************************************************************************/
26
27#ifndef _ROUTE_GUI_H
28#define _ROUTE_GUI_H
29
30#include <wx/gdicmn.h>
31#include <wx/dc.h>
32
33#include "bbox.h"
34#include "chcanv.h"
35#include "ocpndc.h"
36#include "route.h"
37#include "viewport.h"
38
39class SendToGpsDlg;
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
61private:
62 Route& m_route;
63};
64
65#endif // _ROUTE_GUI_H
Definition: route.h:70
Route "Send to GPS..." Dialog Definition.
Definition: SendToGpsDlg.h:56
Definition: ocpndc.h:55