00001 #ifndef MOUSEINTERFACE_H 00002 #define MOUSEINTERFACE_H 00003 00004 #include "Types.h" 00005 #include "MouseEvent.h" 00006 00007 namespace RenderTools{ 00008 00009 class MouseInterface { 00010 friend class MouseEvent; 00011 public: 00012 virtual void onMouseEvent( const MouseEvent & ); 00013 00014 static const Vec2 & getMouseNow( void ); 00015 static const Vec2 & getMouseBefore( void ); 00016 static bool isLeftButtonPressed( void ); 00017 static bool isMiddleButtonPressed( void ); 00018 static bool isRightButtonPressed( void ); 00019 00020 private: 00021 static Vec2 s_mouseNow; 00022 static Vec2 s_mouseBefore; 00023 static bool s_leftButton; 00024 static bool s_middleButton; 00025 static bool s_rightButton; 00026 00027 }; 00028 00029 }; 00030 00031 #endif 00032