00001 /****************************************************************************\ 00002 * * 00003 * 21.02.2006 * 00004 * IInputHandler - Header File * 00005 * * 00006 * (c) Robert Hausmair * 00007 * * 00008 \****************************************************************************/ 00009 00010 #ifndef __IINPUTHANDLER_H__ 00011 #define __IINPUTHANDLER_H__ 00012 00013 /****************************************************************************\ 00014 * REQUIRED HEADERS * 00015 \****************************************************************************/ 00016 #include <Definitions.h> 00017 00018 #include "Memory/mmgr.h" 00019 #include "Memory/IManagedObject.h" 00020 00021 /****************************************************************************\ 00022 * DEFINITIONS * 00023 \****************************************************************************/ 00024 00025 /****************************************************************************\ 00026 * CLASS * 00027 \****************************************************************************/ 00028 class IInputHandler:public IManagedObject 00029 { 00030 /**************************************************************************\ 00031 * PUBLIC CLASS FUNCTIONS * 00032 \**************************************************************************/ 00033 public: 00034 IInputHandler() {SetPriority(1000);} 00035 IInputHandler(word wPriority) {SetPriority(wPriority);} 00036 00037 virtual bool OnMouseMove(sdword sdwX, sdword sdwY, sdword sdwZ) {return false;} 00038 virtual bool OnMouseKeyDown(byte bKey) {return false;} 00039 virtual bool OnMouseKeyUp(byte bKey) {return false;} 00040 virtual bool OnChar(char c) {return false;} 00041 virtual bool OnKeyDown(dword dwKey) {return false;} 00042 virtual bool OnKeyUp(dword dwKey) {return false;} 00043 00044 virtual void SetPriority(word wPriortiy) {m_wPriority = wPriortiy;} 00045 virtual word GetPriority() {return m_wPriority;} 00046 00047 virtual ~IInputHandler() {}; 00048 00049 /**************************************************************************\ 00050 * PROTECTED CLASS FUNCTIONS * 00051 \**************************************************************************/ 00052 protected: 00053 00054 /**************************************************************************\ 00055 * PRIVATE CLASS FUNCTIONS * 00056 \**************************************************************************/ 00057 private: 00058 //Private copy constructor and assignment operator to prevent mistakes: 00059 IInputHandler(const IInputHandler &); 00060 IInputHandler &operator =(const IInputHandler &); 00061 00062 /**************************************************************************\ 00063 * PROTECTED CLASS MEMBERS * 00064 \**************************************************************************/ 00065 protected: 00066 00067 /**************************************************************************\ 00068 * PRIVATE CLASS MEMBERS * 00069 \**************************************************************************/ 00070 private: 00071 word m_wPriority; 00072 }; 00073 00074 #endif