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

maiaButton.h

Go to the documentation of this file.
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 _maiaButton_
00029 #define _maiaButton_
00030 
00031 #include <wx/wx.h>
00032 #include <string>
00033 
00034 #include <openmaia/libopenmaia.h>
00035 #include <openmaia/libopenmaiaui.h>
00036 
00037 
00038 #include "maiaButtonData.h"
00039 
00056 class maiaButton: public omUIButton {
00057 
00058  private:
00059   // private variables
00060   int normalIndex, selIndex, scanIndex ;   
00061   int scanSoundIndex, selSoundIndex ; 
00062   bool haveScanSound, haveSelSound ;  
00063   maiaButtonData *buttonData ;    
00064 
00065   bool isCurrent ;   
00066 
00067   void RenderPushButton() ;
00068   void SendSimulation() ;
00069 
00070 
00071   DECLARE_EVENT_TABLE()
00072 
00073  public:
00074   maiaButton( wxWindow *, bool, maiaButtonData *) ; 
00075 
00076 
00077   void Show() ;
00078 
00079   void Clean();      // paint the normal button
00080   void Select();     // make the button selected
00081   void Scan();       // make the button scanned
00082   void OnClick();  //implement virtual funtion of the super
00083   void OnFocus() ; // implement virual on focus function of the super
00084 
00085   void PaintDefaultPicture() ;   // call the Clean() method
00086   void LightOn() ;  // call the Scan() method, used in the automatic scan mode
00087   void LightOnSingle() ;  // call the Scan() method, used in the automatic scan mode
00088   void LightOff() ;  // call the Clean() method, used in the automatic scan mode
00089   void Execute() ;  // inser command code in the queue, used in automatic scan mode
00090   void SetCurrent(); // set this node as the current
00091   void ResetCurrent() ;  // reset this not as the current
00092 
00093 } ;
00094 
00095 
00096 #endif // _maiaButton_
00097