OpenCPN Partial API docs
Loading...
Searching...
No Matches
REST_server_gui.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 __RESTSERVERGUI_H__
26#define __RESTSERVERGUI_H__
27
28#include <wx/dialog.h>
29#include <wx/stattext.h>
30#include <wx/checkbox.h>
31
32// Constants for Dialog
33#define ID_STGDIALOG 10005
34#define SYMBOL_STG_STYLE \
35 wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX
36
37#define SYMBOL_STG_TITLE _("Send to GPS")
38#define SYMBOL_STG_IDNAME ID_STGDIALOG
39#define SYMBOL_STG_SIZE wxSize(500, 500)
40#define SYMBOL_STG_POSITION wxDefaultPosition
41
42enum { ID_STG_CANCEL = 10000, ID_STG_OK, ID_STG_CHECK1 };
43
44// class wxButton;
45// class wxGauge;
46// class wxComboBox;
47
51class AcceptObjectDialog : public wxDialog {
52 DECLARE_DYNAMIC_CLASS(AcceptObjectDialog)
53 DECLARE_EVENT_TABLE()
54
55public:
57 AcceptObjectDialog(wxWindow* parent, wxWindowID id, const wxString& caption,
58 const wxString& hint, const wxPoint& pos, const wxSize& size,
59 long style);
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 SetMessage(const wxString &message);
69 void SetCheck1Message(const wxString &message);
70
71 bool GetCheck1Value(){ return m_pCheck1->GetValue(); }
72
73private:
74 void CreateControls(const wxString& hint);
75
76 void OnCancelClick(wxCommandEvent& event);
77 void OnOKClick(wxCommandEvent& event);
78
79 wxButton* m_CancelButton;
80 wxButton* m_OKButton;
81 wxStaticText* premtext;
82 wxCheckBox *m_pCheck1;
83 wxString m_checkbox1_msg;
84};
85
86class PINCreateDialog : public wxDialog {
87 DECLARE_DYNAMIC_CLASS(PINCreateDialog)
88 DECLARE_EVENT_TABLE()
89
90public:
92 PINCreateDialog(wxWindow* parent, wxWindowID id, const wxString& caption,
93 const wxString& hint, const wxPoint& pos, const wxSize& size,
94 long style);
96
97 bool Create(wxWindow* parent, wxWindowID id = SYMBOL_STG_IDNAME,
98 const wxString& caption = SYMBOL_STG_TITLE,
99 const wxString& hint = SYMBOL_STG_TITLE,
100 const wxPoint& pos = SYMBOL_STG_POSITION,
101 const wxSize& size = SYMBOL_STG_SIZE,
102 long style = SYMBOL_STG_STYLE);
103 void SetMessage(const wxString &message);
104 void SetText1Message(const wxString &message);
105
106 wxString GetText1Value(){ return m_pText1->GetValue(); }
107
108private:
109 void CreateControls(const wxString& hint);
110
111 void OnCancelClick(wxCommandEvent& event);
112 void OnOKClick(wxCommandEvent& event);
113
114 wxButton* m_CancelButton;
115 wxButton* m_OKButton;
116 wxStaticText* premtext;
117 wxTextCtrl *m_pText1;
118 wxString m_checkbox1_msg;
119};
120
121#endif
122
"Accept Object" Dialog Definition