OSDLMouseHandler.h

Go to the documentation of this file.
00001 #ifndef OSDL_MOUSE_HANDLER_H_
00002 #define OSDL_MOUSE_HANDLER_H_
00003 
00004 
00005 
00006 #include "OSDLInputDeviceHandler.h"   // for inheritance
00007 #include "OSDLMouseCommon.h"          // for MouseNumber, etc.
00008 
00009 
00010 #include <string>
00011 #include <list>
00012 
00013 
00014 namespace OSDL
00015 {
00016 
00017 
00018     namespace MVC
00019     {
00020 
00021         /*
00022          * The mouse handler can propagate mouse events to the relevant
00023          * controllers.
00024          *
00025          */
00026         class Controller ;
00027     
00028     }
00029 
00030         
00031     namespace Events
00032     {
00033     
00034     
00035         // Manages mice.
00036         class Mouse ;
00037         
00038         
00039         
00052         class OSDL_DLL MouseHandler : public InputDeviceHandler
00053         {
00054         
00055 
00056             /*
00057              * The events module has to trigger the mouse event callbacks
00058              * of this mouse handler.
00059              *
00060              */
00061             friend class OSDL::Events::EventsModule ;
00062 
00063             
00064             public:
00065 
00066 
00067 
00082                 explicit MouseHandler( bool useClassicalMice = true )
00083                     throw( InputDeviceHandlerException ) ;
00084                 
00085                 
00090                 virtual ~MouseHandler() throw() ;
00091 
00092 
00107                 virtual void linkToController( 
00108                         OSDL::MVC::Controller & controller ) 
00109                     throw( MouseException ) ;
00110                  
00111     
00129                 virtual void linkToController( MouseNumber index,
00130                         OSDL::MVC::Controller & controller ) 
00131                     throw( MouseException ) ;
00132                  
00133             
00145                 virtual const std::string toString( 
00146                         Ceylan::VerbosityLevels level = Ceylan::high ) 
00147                     const throw() ;
00148                 
00149                 
00150                 
00151                 // Static section.
00152                 
00153                  
00161                 static MouseNumber GetAvailableMiceCount() throw() ;
00162                 
00163                 
00164                 
00165                 
00166         protected :
00167                         
00168                     
00169                 /*
00170                  * Event-driven callbacks for input propagation, from
00171                  * the Events module to this handler.
00172                  *
00173                  */
00174             
00175                     
00185                 virtual void focusGained( 
00186                     const FocusEvent & mouseFocusEvent ) const throw() ;
00187                 
00188                 
00198                 virtual void focusLost( 
00199                     const FocusEvent & mouseFocusEvent ) const throw() ;
00200                  
00201                         
00202                             
00210                 virtual void mouseMoved( 
00211                     const MouseMotionEvent & mouseMovedEvent ) const throw() ;
00212                 
00213                             
00221                 virtual void buttonPressed( 
00222                         const MouseButtonEvent & mouseButtonPressedEvent )  
00223                     const throw() ;
00224                         
00225                             
00233                 virtual void buttonReleased( 
00234                         const MouseButtonEvent & mouseButtonReleasedEvent ) 
00235                     const throw() ;
00236 
00237 
00238 
00244                 virtual void blank() throw() ;
00245 
00246                 
00256                 virtual void checkMouseAt( MouseNumber index ) const throw() ;
00257                 
00258 
00263                 MouseNumber _miceCount ;
00264                 
00265                  
00275                 Mouse ** _mice ;
00276 
00277 
00283                 bool _useClassicalMice ;
00284 
00285 
00286             private:
00287         
00288         
00297                 explicit MouseHandler( const MouseHandler & source )
00298                     throw() ;
00299             
00300             
00309                 MouseHandler & operator = ( 
00310                     const MouseHandler & source ) throw() ;
00311                                         
00312                 
00313         } ;
00314     
00315     }   
00316     
00317 }
00318 
00319 
00320 
00321 #endif // OSDL_MOUSE_HANDLER_H_

Generated on Fri Mar 30 14:46:59 2007 for OSDL by  doxygen 1.5.1