OpenCPN Partial API docs
Loading...
Searching...
No Matches
conn_params_panel.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2013 by David S. 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 __CONN_PARAMS_PANEL_H__
25#define __CONN_PARAMS_PANEL_H__
26
27#ifndef WX_PRECOMP
28#include <wx/wx.h>
29#endif
30
31#include <wx/event.h>
32#include <wx/wxprec.h>
33#include <wx/stattext.h>
34#include <wx/string.h>
35
36#include "model/conn_params.h"
37
38#ifndef __DSPORTTYPE_H__
39#include "model/ds_porttype.h"
40#endif
41
47class ConnectionParamsPanel : public wxPanel {
48public:
49 ConnectionParamsPanel(wxWindow *parent, wxWindowID id, const wxPoint &pos,
50 const wxSize &size,
51 ConnectionParams *p_itemConnectionParams,
52 ConnectionsDialog *pContainer);
54
55 void OnSelected(wxMouseEvent &event);
56 void SetSelected(bool selected);
57 void OnPaint(wxPaintEvent &event);
58 void OnEraseBackground(wxEraseEvent &event);
59 void CreateControls(void);
60 void OnEnableCBClick(wxCommandEvent &event);
62 void SetEnableCheckbox(bool value) { m_cbEnable->SetValue(value); }
63
64 bool GetSelected() { return m_bSelected; }
65 int GetUnselectedHeight() { return m_unselectedHeight; }
66 ConnectionParams *m_pConnectionParams;
67
68private:
69 ConnectionsDialog *m_pContainer;
70 bool m_bSelected;
71 wxStaticText *m_pName;
72 wxColour m_boxColour;
73 int m_unselectedHeight;
74 wxCheckBox *m_cbEnable;
75 wxStaticText *t2;
76 wxStaticText *t4;
77 wxStaticText *t6;
78 wxStaticText *t12;
79 wxStaticText *t14;
80 wxStaticText *t16;
81
82 wxStaticText *t21;
83
84 DECLARE_EVENT_TABLE()
85};
86
87#endif // __CONN_PARAMS_PANEL_H__
Panel for displaying and editing connection parameters.