OpenCPN Partial API docs
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 "model/route.h"
37 #include "viewport.h"
38 #include "SendToGpsDlg.h"
39 
40 class RouteGui {
41 public:
42  RouteGui(Route& route) : m_route(route) {}
43  virtual void Draw(ocpnDC &dc, ChartCanvas *canvas, const LLBBox &box);
44  void DrawPointWhich(ocpnDC &dc, ChartCanvas *canvas, int iPoint,
45  wxPoint *rpn);
46  void DrawSegment(ocpnDC &dc, ChartCanvas *canvas, wxPoint *rp1, wxPoint *rp2,
47  ViewPort &vp, bool bdraw_arrow);
48 
49  void DrawGLLines(ViewPort &vp, ocpnDC *dc, ChartCanvas *canvas);
50  void DrawGL(ViewPort &vp, ChartCanvas *canvas, ocpnDC &dc);
51  void DrawGLRouteLines(ViewPort &vp, ChartCanvas *canvas, ocpnDC &dc);
52  void CalculateDCRect(wxDC &dc_route, ChartCanvas *canvas, wxRect *prect);
53  void RenderSegment(ocpnDC &dc, int xa, int ya, int xb, int yb, ViewPort &vp,
54  bool bdraw_arrow, int hilite_width = 0);
55  void RenderSegmentArrowsGL(ocpnDC &dc, int xa, int ya, int xb, int yb,
56  ViewPort &vp);
57  int SendToGPS(const wxString &com_name, bool bsend_waypoints,
58  SendToGpsDlg *dialog);
59 
60 private:
61  Route& m_route;
62 };
63 
64 #endif // _ROUTE_GUI_H
Definition: route.h:75
Route "Send to GPS..." Dialog Definition.
Definition: SendToGpsDlg.h:51
Definition: ocpndc.h:58