00001 00002 // This code is part of the MaiaProject free software 00003 // 00004 // Keyboard and Mouse Emulator - Virtual keyboard Engine 00005 // 00006 // Copyright (c) 2002-2003 Luca Clivio <luca.clivio@maiaproject.org> 00007 // Tel. +39-347-2538040 00008 // via B.Croce 2, 20037 Paderno Dugnano (Milano) - Italy 00009 // 00010 // Developers: 00011 // Simone Mangano <simone.mangano@maiaproject.org> 00012 // Andrea Tosato <andrea.tosato@maiaproject.org> 00013 // 00014 // ----------------------------------------------------------------------------- 00015 // This program is free software; This program is free software; 00016 // you can redistribute it and/or modify it under the terms of the 00017 // GNU General Public License as published by the Free Software Foundation; 00018 // either version 2 of the License, or (at your option) any later version. 00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 // GNU General Public License for more details. 00022 // You should have received a copy of the GNU General Public License 00023 // along with this program; if not, write to the Free Software 00024 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00026 00027 00028 #ifndef _maiaKeyboard_ 00029 #define _maiaKeyboard_ 00030 00031 00032 #include <openmaia/libopenmaia.h> 00033 #include <openmaia/libopenmaiaui.h> 00034 00035 #include <omcommon.h> 00036 00037 #include "maiaButton.h" 00038 #include "maiaButtonData.h" 00039 #include "maiaOptions.h" 00040 #include "maiaXMLTags.h" 00041 #include "maiaOptions.h" 00042 00043 00044 #include <unistd.h> 00045 00046 #include <wx/wx.h> 00047 00048 00058 class maiaKeyboard: public omUIKeyboard, public wxTimer{ 00059 private: 00060 bool lastAutoscan, lastJoystick; 00061 bool autoscan, joystick; 00062 int scanTick ; 00063 00064 bool reachKey ; 00065 maiaButtonData *currentKeyData ; 00066 wxWindow *parentWindow ; 00067 00068 00069 //Needed in LinkConnectedButtons() 00070 std::vector<omUIButton *> buttons; 00071 00072 00073 omObject *currentButton ; 00074 maiaOptions *opts; 00075 00076 00077 // ------------------------ private functions 00078 void Notify() ; 00079 void LinkConnectedButtons(); 00080 00081 public: 00082 maiaKeyboard(wxWindow *, int) ; 00083 void Init(); 00084 void Reload(); 00085 // methods used by the parser 00086 void AtStartDocument() ; 00087 void AtEndDocument() ; 00088 void AtStartTag( wxString, omXMLParameters ) ; 00089 void AtEndTag( wxString ) ; 00090 // method used by the automatic scan system 00091 void Start(); // start automatic scan 00092 void Stop() ; // stop automatic scan 00093 // void Action() ; // pass the action signal to the tree 00094 // void Tick() ; // force the tick action from the extern 00095 void SetCurrentButton( omObject *) ; // set the current selected node 00096 omObject *GetCurrentButton() ; 00097 void Action() ; 00098 void GoDown() ; 00099 void GoUp() ; 00100 void GoLeft() ; 00101 void GoRight() ; 00102 void LoadKeyboard(wxString) ; // load the keyboard 00103 } ; 00104 00105 00106 00107 #endif // _maiaKeyboard_
Copyright © by Luca Clivio |