OpenCPN Partial API docs
Loading...
Searching...
No Matches
peer_client_dlg.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 _PEER__CLIENT_DLG_H
27#define _PEER__CLIENT_DLG_H
28
29#include <wx/button.h>
30#include <wx/dialog.h>
31#include <wx/gdicmn.h>
32#include <wx/stattext.h>
33#include <wx/string.h>
34#include <wx/textctrl.h>
35#include <wx/window.h>
36
37#define ID_PCDDIALOG 10005
38#define SYMBOL_PCD_STYLE \
39 wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX
40
41#define SYMBOL_PCD_TITLE _("Send to GPS")
42#define SYMBOL_PCD_IDNAME ID_PCDDIALOG
43#define SYMBOL_PCD_SIZE wxSize(500, 500)
44#define SYMBOL_PCD_POSITION wxDefaultPosition
45
46class PinConfirmDlg : public wxDialog {
47public:
49 PinConfirmDlg(wxWindow* parent, wxWindowID id, const wxString& caption,
50 const wxString& hint, const wxPoint& pos, const wxSize& size,
51 long style);
53
54 bool Create(wxWindow* parent, wxWindowID id = SYMBOL_PCD_IDNAME,
55 const wxString& caption = SYMBOL_PCD_TITLE,
56 const wxString& hint = SYMBOL_PCD_TITLE,
57 const wxPoint& pos = SYMBOL_PCD_POSITION,
58 const wxSize& size = SYMBOL_PCD_SIZE,
59 long style = SYMBOL_PCD_STYLE);
60 void SetMessage(const wxString& message);
61 void SetPincodeText(const wxString& message);
62 wxString GetPincodeText() { return m_pin_textctrl->GetValue(); }
63
64private:
65 void OnCancelClick(wxCommandEvent& event);
66 void OnOKClick(wxCommandEvent& event);
67
68 void CreateControls(const wxString& hint);
69 void OnTextChange(wxCommandEvent& ev);
70
71 wxButton* m_cancel_btn;
72 wxButton* m_ok_btn;
73 wxStaticText* premtext;
74 wxTextCtrl* m_pin_textctrl;
75 wxString m_checkbox1_msg;
76};
77
78#endif // guard