OpenCPN Partial API docs
Loading...
Searching...
No Matches
peer_client_dlg.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2022 by David 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 _PEER__CLIENT_DLG_H
25#define _PEER__CLIENT_DLG_H
26
27#include <wx/button.h>
28#include <wx/dialog.h>
29#include <wx/gdicmn.h>
30#include <wx/stattext.h>
31#include <wx/string.h>
32#include <wx/textctrl.h>
33#include <wx/window.h>
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
44class PinConfirmDlg : public wxDialog {
45public:
47 PinConfirmDlg(wxWindow* parent, wxWindowID id, const wxString& caption,
48 const wxString& hint, const wxPoint& pos, const wxSize& size,
49 long style);
51
52 bool Create(wxWindow* parent, wxWindowID id = SYMBOL_PCD_IDNAME,
53 const wxString& caption = SYMBOL_PCD_TITLE,
54 const wxString& hint = SYMBOL_PCD_TITLE,
55 const wxPoint& pos = SYMBOL_PCD_POSITION,
56 const wxSize& size = SYMBOL_PCD_SIZE,
57 long style = SYMBOL_PCD_STYLE);
58 void SetMessage(const wxString& message);
59 void SetPincodeText(const wxString& message);
60 wxString GetPincodeText() { return m_pin_textctrl->GetValue(); }
61
62private:
63 void OnCancelClick(wxCommandEvent& event);
64 void OnOKClick(wxCommandEvent& event);
65
66 void CreateControls(const wxString& hint);
67 void OnTextChange(wxCommandEvent& ev);
68
69 wxButton* m_cancel_btn;
70 wxButton* m_ok_btn;
71 wxStaticText* premtext;
72 wxTextCtrl* m_pin_textctrl;
73 wxString m_checkbox1_msg;
74};
75
76#endif // _PEER__CLIENT_DLG_H