00001 #ifndef OSDL_MOUSE_HANDLER_H_
00002 #define OSDL_MOUSE_HANDLER_H_
00003
00004
00005
00006 #include "OSDLInputDeviceHandler.h"
00007 #include "OSDLMouseCommon.h"
00008
00009
00010 #include <string>
00011 #include <list>
00012
00013
00014 namespace OSDL
00015 {
00016
00017
00018 namespace MVC
00019 {
00020
00021
00022
00023
00024
00025
00026 class Controller ;
00027
00028 }
00029
00030
00031 namespace Events
00032 {
00033
00034
00035
00036 class Mouse ;
00037
00038
00039
00052 class OSDL_DLL MouseHandler : public InputDeviceHandler
00053 {
00054
00055
00056
00057
00058
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
00152
00153
00161 static MouseNumber GetAvailableMiceCount() throw() ;
00162
00163
00164
00165
00166 protected :
00167
00168
00169
00170
00171
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_