Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

maiaconfigFrame.h

Go to the documentation of this file.
00001 
00003 // This code is part of the MaiaProject free software
00004 //
00005 // Keyboard and Mouse Emulator - Virtual keyboard Engine
00006 //
00007 // Copyright (c) 2002-2003 Luca Clivio <luca.clivio@maiaproject.org>
00008 // Tel. +39-347-2538040
00009 // via B.Croce 2, 20037 Paderno Dugnano (Milano) - Italy
00010 //
00011 // Developers:
00012 //    Simone Mangano <simone.mangano@maiaproject.org>
00013 //    Andrea Tosato  <andrea.tosato@maiaproject.org>
00014 //
00015 //  -----------------------------------------------------------------------------
00016 //  This program is free software; This program is free software; 
00017 //  you can redistribute it and/or modify it under the terms of the 
00018 //  GNU General Public License as published by the Free Software Foundation; 
00019 //  either version 2 of the License, or (at your option) any later version.
00020 //  but WITHOUT ANY WARRANTY; without even the implied warranty of                              
00021 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the                                
00022 //  GNU General Public License for more details.                                                
00023 //  You should have received a copy of the GNU General Public License                           
00024 //  along with this program; if not, write to the Free Software                                 
00025 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                                   
00027 #ifndef _maiaconfigFrame_
00028 #define _maiaconfigFrame_
00029 
00030 #include <wx/wx.h>
00031 #include <wx/xrc/xmlres.h>  
00032 
00033 #include <iostream>
00034 
00035 #include <openmaia/libopenmaia.h>
00036 
00037 
00038 class maiaconfigMain;
00039 
00040 #include "maiaconfig.h"
00041 
00042 
00052 // Define a new frame type: this is going to be our main frame
00053 class maiaconfigFrame : public wxFrame, public omObject
00054 {
00055 
00056 public:
00057     maiaconfigFrame( wxWindow* parent=(wxWindow *)NULL);    
00058 
00059 private:
00060     omConnector *connector; 
00061     wxString host; 
00062     int port;
00063     omGetKeyDialog *getKeyDialog;
00064 
00065     bool toSave;   
00066 
00067     // ------ pointers to frame objects
00068     
00069     // check box
00070     wxCheckBox *autoscan,
00071       *joystick,
00072       *direct,
00073       *actionOnPress,
00074       *enableKeyboard,
00075       *grabKeys,
00076       *enableJoystick,
00077       *enableSerial;
00078 
00079     // text controls
00080     wxTextCtrl *actionKeyDisplay, 
00081       *upKeyDisplay, 
00082       *downKeyDisplay,
00083       *leftKeyDisplay, 
00084       *rightKeyDisplay,
00085       *scanTimeDisplay;
00086     // slider controls
00087     wxSlider *scanTime;
00088 
00089     void NotifyTCPMessage(omTCPMessage); 
00090 
00091     // generic event handlers
00092     //void OnQuit(wxCommandEvent&);
00093     bool Destroy();
00094 
00095     // sliders events
00096     void OnChangeScanTime(wxCommandEvent& WXUNUSED(event)); 
00097 
00098     // buttons event handlers
00099     void SaveButtonPressed(wxCommandEvent& WXUNUSED(event)); 
00100     void ApplyChangesPressed(wxCommandEvent& WXUNUSED(event)); 
00101     void GetActionKey(wxCommandEvent& WXUNUSED(event));
00102     void GetUpKey(wxCommandEvent& WXUNUSED(event));
00103     void GetDownKey(wxCommandEvent& WXUNUSED(event));
00104     void GetLeftKey(wxCommandEvent& WXUNUSED(event));
00105     void GetRightKey(wxCommandEvent& WXUNUSED(event));
00106 
00107     void AskAllParameters();    
00108     void SendAllParameters();   
00109     
00110 
00111     // event handler
00112     void OnSize( wxSizeEvent);
00113     void OnClose( wxSizeEvent);
00114     
00115     DECLARE_EVENT_TABLE()
00116 
00117 };
00118 
00119 
00120 #endif  // _maiaconfigFrame_