OpenCPN Partial API docs
Loading...
Searching...
No Matches
peer_client.h
1/***************************************************************************
2 *
3 * Project: OpenCPN
4 * Purpose:
5 * Author: David Register
6 *
7 ***************************************************************************
8 * Copyright (C) 2022 by David Register *
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
19 * *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the *
22 * Free Software Foundation, Inc., *
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
24 **************************************************************************/
25
26#ifndef _PEERCLIENT_H
27#define _PEERCLIENT_H
28
29#include <string>
30#include "route.h"
31
32int SendRoute(std::string dest_ip_address, std::string server_name, std::vector<Route*> route, std::vector<RoutePoint*> routepoint, std::vector<Track*> track, bool overwrite = false);
33
34
35 #define ID_PCDDIALOG 10005
36 #define SYMBOL_PCD_STYLE \
37 wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX
38
39 #define SYMBOL_PCD_TITLE _("Send to GPS")
40 #define SYMBOL_PCD_IDNAME ID_PCDDIALOG
41 #define SYMBOL_PCD_SIZE wxSize(500, 500)
42 #define SYMBOL_PCD_POSITION wxDefaultPosition
43
44enum { ID_PCD_CANCEL = 10000, ID_PCD_OK, ID_PCD_CHECK1 };
45
46
47class PINConfirmDialog : public wxDialog {
48 DECLARE_DYNAMIC_CLASS(PINConfirmDialog)
49 DECLARE_EVENT_TABLE()
50
51public:
53 PINConfirmDialog(wxWindow* parent, wxWindowID id, const wxString& caption,
54 const wxString& hint, const wxPoint& pos, const wxSize& size,
55 long style);
57
58 bool Create(wxWindow* parent, wxWindowID id = SYMBOL_PCD_IDNAME,
59 const wxString& caption = SYMBOL_PCD_TITLE,
60 const wxString& hint = SYMBOL_PCD_TITLE,
61 const wxPoint& pos = SYMBOL_PCD_POSITION,
62 const wxSize& size = SYMBOL_PCD_SIZE,
63 long style = SYMBOL_PCD_STYLE);
64 void SetMessage(const wxString &message);
65 void SetText1Message(const wxString &message);
66
67 wxString GetText1Value(){ return m_pText1->GetValue(); }
68
69 void OnCancelClick(wxCommandEvent& event);
70 void OnOKClick(wxCommandEvent& event);
71
72private:
73 void CreateControls(const wxString& hint);
74
75
76 wxButton* m_CancelButton;
77 wxButton* m_OKButton;
78 wxStaticText* premtext;
79 wxTextCtrl *m_pText1;
80 wxString m_checkbox1_msg;
81};
82
83#endif // guard