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