Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

ClientGui.h

Go to the documentation of this file.
00001 
00015 #ifndef _CLIENTGUI
00016 #define _CLIENTGUI
00017 
00018 #include "Definitions.h"
00019 
00020 #include <wx/wxprec.h>
00021 #ifndef WX_PRECOMP
00022    #include <wx/wx.h>
00023 #endif
00024 #include <wx/mdi.h>
00025 #include <wx/config.h>
00026 #include "Connessione.h"
00027 
00028 #define CLIENTWIDTH 640
00029 #define CLIENTHEIGHT 480
00030 
00031 const wxString LOCATION = _("FramePrefs");  // Nome con cui vengono salvate le
00032                                             // dimensioni del frame
00033 const wxString LOCATION_X = _("xpos"); 
00034 const wxString LOCATION_Y = _("ypos"); 
00035 const wxString LOCATION_W = _("width"); 
00036 const wxString LOCATION_H = _("height");
00037 
00038 class ClientGui : public PARENT_FRAME
00039 {
00040     protected:
00047         ClientGui(wxWindow* parent,
00048                   wxWindowID id,
00049                   const wxString& title, 
00050                   const wxPoint& position, 
00051                   const wxSize& size, 
00052                   long style, 
00053                   const wxString& name);
00057         ~ClientGui();
00058 
00059     public:
00065         wxMenuBar* clientMenuBar;
00066         
00075         static ClientGui* Instance(wxWindow* parent,
00076                                    wxWindowID id = -1,
00077                                    const wxString& title = _("Untitled"), 
00078                                    const wxPoint& position = wxDefaultPosition,
00079                                    const wxSize& size = wxDefaultSize,
00080                                    long style = GUI_STYLE,
00081                                    const wxString& name = _("QUIrCK"));
00088         void DeleteConnection(Connessione* connection);
00099         void CreateConnection(wxString nick, wxString name, wxString serverAddr,
00100                               wxString port, wxString timeout, bool rfcCompliant);
00101 
00102     private:
00106         static ClientGui* clientInstance;
00110         WX_DEFINE_ARRAY(Connessione*, wxArrayConnessioni);
00114                 wxArrayConnessioni openConnection;
00115 
00119         void CreateGUIControls();
00123         wxRect DetermineFrameSize (wxConfig* config = NULL); 
00127         void StoreFrameSize (wxRect rect, wxConfig* config = NULL);
00128 
00129         // Dichiarazione della tabella degli eventi.
00130         DECLARE_EVENT_TABLE()
00131 
00132         
00135         void ClientClose(wxCloseEvent& event);
00139         void OpenConnectionDlg(wxCommandEvent& event);
00140 };    
00141 
00142 enum{
00143     NEWCONNECTION
00144 };    
00145 
00146 #endif
00147 

Generated on Thu Dec 2 16:51:42 2004 for Quirck by  doxygen 1.3.9.1