OpenCPN Partial API docs
Loading...
Searching...
No Matches
send_to_gps_dlg.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2010 by David S. Register *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
16 **************************************************************************/
17
24#ifndef SENDTOGPSDLG_H_
25#define SENDTOGPSDLG_H_
26
27#include <wx/wxprec.h>
28#ifndef WX_PRECOMP
29#include <wx/wx.h>
30#endif
31
32#include <wx/button.h>
33#include <wx/combobox.h>
34#include <wx/dialog.h>
35#include <wx/event.h>
36#include <wx/gauge.h>
37#include <wx/gdicmn.h>
38#include <wx/stattext.h>
39#include <wx/string.h>
40
41#include "model/route.h"
42#include "model/route_point.h"
43
44// Constants for SendToGps.. Dialog
45#define ID_STGDIALOG 10005
46#define SYMBOL_STG_STYLE \
47 wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX | \
48 wxFRAME_FLOAT_ON_PARENT
49#define SYMBOL_STG_TITLE _("Send to GPS")
50#define SYMBOL_STG_IDNAME ID_STGDIALOG
51#define SYMBOL_STG_SIZE wxSize(500, 500)
52#define SYMBOL_STG_POSITION wxDefaultPosition
53
59class SendToGpsDlg : public wxDialog {
60 DECLARE_EVENT_TABLE()
61
62public:
64 SendToGpsDlg(wxWindow* parent, wxWindowID id, const wxString& caption,
65 const wxString& hint, const wxPoint& pos, const wxSize& size,
66 long style);
68
69 bool Create(wxWindow* parent, wxWindowID id = SYMBOL_STG_IDNAME,
70 const wxString& caption = SYMBOL_STG_TITLE,
71 const wxString& hint = SYMBOL_STG_TITLE,
72 const wxPoint& pos = SYMBOL_STG_POSITION,
73 const wxSize& size = SYMBOL_STG_SIZE,
74 long style = SYMBOL_STG_STYLE);
75 void SetRoute(Route* pRoute) { m_pRoute = pRoute; }
76 void SetWaypoint(RoutePoint* pRoutePoint) { m_pRoutePoint = pRoutePoint; }
77 wxGauge* GetProgressGauge() { return m_pgauge; }
78 void SetMessage(wxString message);
79
80private:
81 void CreateControls(const wxString& hint);
82
83 void OnCancelClick(wxCommandEvent& event);
84 void OnSendClick(wxCommandEvent& event);
85
86 Route* m_pRoute;
87 RoutePoint* m_pRoutePoint;
88 wxComboBox* m_itemCommListBox;
89 wxGauge* m_pgauge;
90 wxButton* m_CancelButton;
91 wxButton* m_SendButton;
92 wxStaticText* premtext;
93};
94
95#endif // SENDTOGPSDLG_H_
Represents a waypoint or mark within the navigation system.
Definition route_point.h:71
Represents a navigational route in the navigation system.
Definition route.h:99
Dialog for sending routes/waypoints to a GPS device.
Route abstraction.
Waypoint or mark abstraction.