00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __EXMANAGERINPUTGLUT_H__
00025 #define __EXMANAGERINPUTGLUT_H__
00026
00027
00028
00029 #include "ExDefine.h"
00030 #include "ExMath.h"
00031 #include "ExManagerCommand.h"
00032 #include "InputActionList.h"
00033
00034 class ExManagerInputGLUT
00035 {
00036 private:
00037
00038
00039
00040 ExManagerCommand *ManagerCommand;
00041
00042
00043 bool m_Keyboard;
00044 bool m_Mouse;
00045 bool m_SpaceBall;
00046 bool m_Tablet;
00047 bool m_Joystick;
00048 int m_MouseNumberButtons;
00049 int m_SpaceBallNumberButtons;
00050 int m_TabletNumberButtons;
00051 int m_JoystickNumberButtons;
00052 int m_JoystickNumberAxes;
00053 public:
00054
00055
00056
00057 ExManagerInputGLUT(void);
00058 ~ExManagerInputGLUT(void);
00059
00060
00061
00062 std::ostrstream *Consol;
00063 void (*WriteToConsol)(const char *Label);
00064
00065 inline void SetManagerCommand(ExManagerCommand *Command){ManagerCommand = Command;}
00066
00067
00068
00069 inline bool IsKeyboard(void) {return m_Keyboard;};
00070 inline bool IsMouse(void) {return m_Mouse;};
00071 inline bool IsSpaceBall(void) {return m_SpaceBall;};
00072 inline bool IsTablet(void) {return m_Tablet;};
00073 inline bool IsJoystick(void) {return m_Joystick;};
00074 void CheckInput(void);
00075 void DisplayAviableInput(void);
00076
00077
00078
00079 void Key (unsigned char key,int x,int y);
00080 void KeyUp (unsigned char key, int x, int y);
00081 void KeySpe (int key,int x,int y);
00082 void KeySpeUp (int key, int x, int y);
00083
00084
00085
00086 void Mouse (int button, int state, int x, int y);
00087 void MouseMotion (int x, int y);
00088 void MousePassiveMotion (int x, int y);
00089 void Focus (int state);
00090
00091
00092
00093 void SpaceballMotion(int x, int y, int z);
00094 void SpaceballRotate(int x, int y, int z);
00095
00096
00097
00098 void TabletMotion(int x, int y);
00099 void TabletButton(int button, int state, int x, int y);
00100
00101
00102
00103 };
00104 #endif //__EXMANAGERINPUTGLUT_H__