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

TerminalGui.h

Go to the documentation of this file.
00001 
00012 #ifndef _TERMINALGUI
00013 #define _TERMINALGUI
00014 
00015 #include "Definitions.h"
00016 
00017 #include <wx/wxprec.h>
00018 #ifndef WX_PRECOMP
00019    #include <wx/wx.h>
00020 #endif
00021 #include <wx/mdi.h>
00022 #include <wx/config.h>
00023 
00024 #define TERMINALWIDTH 500
00025 #define TERMINALHEIGHT 300
00026 
00027 // Definizione di dove verranno memorizzate le dimensioni del Terminale
00028 const wxString T_LOCATION_X = _("xpos");    
00029 const wxString T_LOCATION_Y = _("ypos"); 
00030 const wxString T_LOCATION_W = _("width"); 
00031 const wxString T_LOCATION_H = _("height");
00032 
00040 class Connessione;
00041 
00042 class TerminalGui : public CHILD_FRAME
00043 {
00044     protected:
00045         // Classe base astratta
00054         TerminalGui(Connessione* connection,
00055                 PARENT_FRAME* parent, wxWindowID id = -1,
00056                 const wxString& title = _("Terminal"), 
00057                 const wxPoint& position = wxDefaultPosition, 
00058                 const wxSize& size = wxDefaultSize, 
00059                 long style = GUI_STYLE, 
00060                 const wxString& name = _("Quirck Terminal"));
00061         
00062     public:
00065         ~TerminalGui();
00077         virtual void receiveMsg(wxString message,
00078                                 wxTextAttr style = STYLE_DEFAULT); 
00079 
00080     protected:
00085         wxTextCtrl *viewer;
00089         wxTextCtrl *commandline;
00093         Connessione* connessione;
00094         wxString T_LOCATION;
00102         virtual void SetLayout();        
00106         wxRect DetermineFrameSize(wxConfig* config = NULL);
00113         void StoreFrameSize(wxRect rect, wxConfig* config = NULL);
00114 
00115     private:
00116         static unsigned int offset;  // Variabile che memorizza l'offset di
00117                                      // creazione delle finestre
00122         void CreateGUIControls();
00123 
00124         // Dichiarazione della tabella che gestisce gli eventi (per i singoli
00125         // eventi vedi doc WxWidgets)
00126         DECLARE_EVENT_TABLE()
00127         
00128         
00133         void TerminalGuiClose(wxCloseEvent& event);
00140         void EnterCommand(wxCommandEvent&); 
00141 };    
00142 
00143 // Enumerazione usata per defiinre gli ID dei componenti grafici del Terminale
00144 enum
00145 {
00146     COMMAND_LINE,
00147     VIEWER,
00148 };
00149 
00150 #endif
00151 

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