Version: 0.6.0
netfactoryui.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Remote)
3  * Purpose: TCP network UI classes.
4  * Author: Baryshnikov Dmitriy (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2010,2012 Bishop
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, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 
22 #pragma once
23 
24 #include "wxgis/remoteserverui/remoteserverui.h"
25 #include "wxgis/net/tcp.h"
26 
27 #include <wx/string.h>
28 #include <wx/stattext.h>
29 #include <wx/gdicmn.h>
30 #include <wx/font.h>
31 #include <wx/colour.h>
32 #include <wx/settings.h>
33 #include <wx/textctrl.h>
34 #include <wx/sizer.h>
35 #include <wx/button.h>
36 #include <wx/statbox.h>
37 #include <wx/panel.h>
38 
43 {
44 public:
45  virtual ~INetConnFactoryUI(void){};
46  virtual wxWindow* GetPropertyPage(wxWindow* pParent) = 0;
47 };
48 
53  public wxPanel
54 {
55  DECLARE_ABSTRACT_CLASS(wxNetPropertyPage)
56 public:
57  wxNetPropertyPage(INetConnFactoryUI* pFactory, wxWindow* pParent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxNO_BORDER | wxTAB_TRAVERSAL) : wxPanel(pParent, id, pos, size, style)
58  {
59  m_pFactory = pFactory;
60  }
61  virtual ~wxNetPropertyPage(void){};
62  virtual wxXmlNode* OnSave(void) = 0;
63  virtual wxString GetLastError(void){return m_sErrorMsg;};
64 protected:
65  INetConnFactoryUI* m_pFactory;
66  wxString m_sErrorMsg;
67 };
68 
69 
76 {
77  DECLARE_CLASS(wxGISTCPClientPanel)
78 public:
79  enum
80  {
81  ID_SEARCHBT = wxID_HIGHEST + 4501,
82  };
83 public:
84  wxGISTCPClientPanel(wxClientTCPNetFactoryUI* pFactory, wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 280, 160 ) );
85 // wxGISTCPClientPanel(INetConnection* pConn, wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 280, 160 ) );
87  //virtual void ShowSearch(bool bShow = false);
88  //events
89  void OnSearchBtnClick( wxCommandEvent& event );
90  //wxNetPropertyPage
91  virtual wxXmlNode* OnSave(void);
92 
93 private:
94  wxString m_sPort;
95  wxString m_UserName;
96  wxString m_Password;
97  wxString m_IPAddress;
98  wxString m_sName;
99  wxClientTCPNetFactory* m_pFactory;
100 
101 protected:
102  wxStaticText* m_staticText01;
103  wxTextCtrl* m_textCtr_name;
104  wxStaticText* m_staticText11;
105  wxTextCtrl* m_textCtr_addr;
106  wxStaticText* m_staticText12;
107  wxTextCtrl* m_textCtr_port;
108  wxButton* m_button_search;
109  wxStaticText* m_staticText13;
110  wxTextCtrl* m_textCtrl_user;
111  wxStaticText* m_staticText14;
112  wxTextCtrl* m_textCtrl_pass;
113 private:
114  DECLARE_EVENT_TABLE()
115 };
116 
121  public wxClientTCPNetFactory,
122  public INetConnFactoryUI
123 {
124  DECLARE_DYNAMIC_CLASS(wxClientTCPNetFactoryUI)
125 public:
128  //INetConnFactoryUI
129  virtual wxWindow* GetPropertyPage(wxWindow* pParent);
130 };
131 
132 
The tcp network connection property page.
Definition: netfactoryui.h:75
Definition: tcp.h:118
Definition: netfactoryui.h:52
The UI factory to create net connections.
Definition: netfactoryui.h:120
The network connection factory UI interface class.
Definition: netfactoryui.h:42