Version: 0.6.0
serversearchdlg.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Remote)
3  * Purpose: wxGISSearchServerDlg class.
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/net/netfactory.h"
25 #include "wxgis/net/netevent.h"
26 
27 #include <wx/listctrl.h>
28 #include <wx/gdicmn.h>
29 #include <wx/font.h>
30 #include <wx/colour.h>
31 #include <wx/settings.h>
32 #include <wx/string.h>
33 #include <wx/button.h>
34 #include <wx/sizer.h>
35 //#include <wx/gauge.h>
36 #include <wx/dialog.h>
37 #include <wx/imaglist.h>
38 #include <wx/icon.h>
39 #include <wx/socket.h>
40 #include <wx/log.h>
41 #include <wx/msgdlg.h>
42 #include <wx/xml/xml.h>
43 
49  public wxDialog
50 {
51  DECLARE_CLASS(wxGISSearchServerDlg)
52 public:
53  enum
54  {
55  ID_SEARCHBT = wxID_HIGHEST + 4511,
56  ID_STOPBT,
57  ID_ACCEPT
58  };
59 public:
60  wxGISSearchServerDlg(INetConnFactory* pFactory, wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Search Server"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 400,300 ), long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER );
62  virtual wxXmlNode* GetConnectionProperties() const {return m_pConnProps;};
63  //virtual INetClientConnection* GetConnection();
64 protected:
65  virtual void CreateControls(bool bShowGauge);
66  virtual void AddServer(wxXmlNode* pServerData);
67  //events
68  void OnAccept( wxCommandEvent& event );
69  void OnAcceptUI( wxUpdateUIEvent& event );
70  void OnSearch( wxCommandEvent& event );
71  void OnSearchUI( wxUpdateUIEvent& event );
72  void OnStop( wxCommandEvent& event );
73  void OnStopUI( wxUpdateUIEvent& event );
74  void OnNetMsg ( wxGISNetEvent& event );
75  /*void OnClose(wxCloseEvent& event);*/
76 protected:
77  wxListCtrl* m_listCtrl;
78  wxButton* m_button_search;
79  wxButton* m_button_stop;
80  wxButton* m_button_accept;
81  //wxGauge* m_gauge;
82 
83  wxString m_ipaddress;
84  wxImageList m_ImageList;
85  INetConnFactory* m_pFactory;
86  wxXmlNode* m_pConnProps;
87 
88  long m_nConnectionPointCookie;
89 
90 private:
91  DECLARE_EVENT_TABLE()
92 };
The network connection factory interface class.
Definition: netfactory.h:33
Definition: netevent.h:34
The dialog to search remote servers.
Definition: serversearchdlg.h:48