OpenCPN Partial API docs
SendToGpsDlg.h
1 /***************************************************************************
2  *
3  * Project: OpenCPN
4  *
5  ***************************************************************************
6  * Copyright (C) 2010 by David S. Register *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
22  ***************************************************************************
23  */
24 
25 #ifndef __SENDTOGPSDLG_H__
26 #define __SENDTOGPSDLG_H__
27 
28 #include <wx/wxprec.h>
29 #ifndef WX_PRECOMP
30 #include <wx/wx.h>
31 #endif // precompiled headers
32 
33 #include <wx/dialog.h>
34 
35 // Constants for SendToGps... Dialog
36 #define ID_STGDIALOG 10005
37 #define SYMBOL_STG_STYLE \
38  wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX | \
39  wxFRAME_FLOAT_ON_PARENT
40 #define SYMBOL_STG_TITLE _("Send to GPS")
41 #define SYMBOL_STG_IDNAME ID_STGDIALOG
42 #define SYMBOL_STG_SIZE wxSize(500, 500)
43 #define SYMBOL_STG_POSITION wxDefaultPosition
44 
45 class Route;
46 class RoutePoint;
47 
51 class SendToGpsDlg : public wxDialog {
52  DECLARE_DYNAMIC_CLASS(SendToGpsDlg)
53  DECLARE_EVENT_TABLE()
54 
55 public:
56  SendToGpsDlg();
57  SendToGpsDlg(wxWindow* parent, wxWindowID id, const wxString& caption,
58  const wxString& hint, const wxPoint& pos, const wxSize& size,
59  long style);
60  ~SendToGpsDlg();
61 
62  bool Create(wxWindow* parent, wxWindowID id = SYMBOL_STG_IDNAME,
63  const wxString& caption = SYMBOL_STG_TITLE,
64  const wxString& hint = SYMBOL_STG_TITLE,
65  const wxPoint& pos = SYMBOL_STG_POSITION,
66  const wxSize& size = SYMBOL_STG_SIZE,
67  long style = SYMBOL_STG_STYLE);
68  void SetRoute(Route* pRoute) { m_pRoute = pRoute; }
69  void SetWaypoint(RoutePoint* pRoutePoint) { m_pRoutePoint = pRoutePoint; }
70  wxGauge* GetProgressGauge() { return m_pgauge; }
71  void SetMessage(wxString message);
72 
73 private:
74  void CreateControls(const wxString& hint);
75 
76  void OnCancelClick(wxCommandEvent& event);
77  void OnSendClick(wxCommandEvent& event);
78 
79  Route* m_pRoute;
80  RoutePoint* m_pRoutePoint;
81  wxComboBox* m_itemCommListBox;
82  wxGauge* m_pgauge;
83  wxButton* m_CancelButton;
84  wxButton* m_SendButton;
85  wxStaticText* premtext;
86 };
87 
88 #endif
Definition: route.h:75
Route "Send to GPS..." Dialog Definition.
Definition: SendToGpsDlg.h:51