00001
00002
00003
00004
00005
00006
00007
00008 #ifndef INPUTHANDLER_H_
00009 #define INPUTHANDLER_H_
00010
00011 #include "DEBUG.h"
00012
00013 #include <set>
00014
00015 #include <OISEvents.h>
00016 #include <OISMouse.h>
00017 #include <OISKeyboard.h>
00018
00019
00020 namespace OgreGFX {
00021
00022 class GraphicsInteractionManager;
00023
00024 class KeyHandler {
00025 protected:
00026 const std::set<OIS::KeyCode> *modifiers;
00027 OIS::KeyCode key;
00028 public:
00029 GraphicsInteractionManager *gfxMgr;
00030 KeyHandler(GraphicsInteractionManager *gim, const std::set<OIS::KeyCode> *modifierKeys, const OIS::KeyCode keyCode){
00031 gfxMgr = gim;
00032 modifiers = modifierKeys;
00033 key = keyCode;
00034 }
00035
00036 virtual void handleKeyEvent() {
00037 DEBUG(std::cout << "Handling key: " << key << std::endl;)
00038 }
00039
00040 };
00041
00042 class MouseHandler {
00043 public:
00044 GraphicsInteractionManager *gfxMgr;
00045 MouseHandler(GraphicsInteractionManager *gim, const std::set<OIS::KeyCode> *modifierKeys, const OIS::MouseButtonID oisMouseButtonId){
00046 gfxMgr = gim;
00047 modifiers = modifierKeys;
00048 mouseButton = oisMouseButtonId;
00049 }
00050 virtual void handleMouseEvent(const OIS::MouseEvent &arg) {
00051 DEBUG(std::cout << "Handling mousebutton: " << mouseButton << std::endl;)
00052 }
00053
00054 protected:
00055 const std::set<OIS::KeyCode> *modifiers;
00056 OIS::MouseButtonID mouseButton;
00057 };
00058
00059 }
00060
00061
00062 #endif