00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef CybWinMouse2ScriptC_H
00027 #define CybWinMouse2ScriptC_H
00028
00029
00030 #include "oaw/ctk/cybviewc.h"
00031 #include "oaw/ctk/cybviewpointsensorc.h"
00032 #include "oaw/win/wndc.h"
00033 #include "../oawconfig.h"
00034
00035 OAW_BEGIN_NAMESPACE
00036
00037 class CybScriptC;
00038 class CybGraphicChannelC;
00039
00040 class OAW_DLLMAPPING CybWinMouse2ScriptC
00041 {
00042 public:
00043 CybWinMouse2ScriptC(CybWorldC*,CybGraphicChannelC*);
00044
00045 void Button(int bnr,int state, int x, int y);
00046 void Motion(int x,int y);
00047 void KeyPressed(char ch);
00048
00049 void SetScript(CybScriptC*);
00050 void SetWindowSize(long w, long h){m_winWidth=w;m_winHeight=h;}
00051
00052 protected:
00053 void CalcMousePos(int iX, int iY,VectorC&,VectorC&,SFRotation&);
00054
00055 protected:
00056
00057 CybWorldC* m_pWorld;
00058 CybGraphicChannelC* m_pChannel_mouse;
00059 CybScriptC* m_pScriptWinEvents;
00060 long m_winEventsKeyID;
00061 long m_winEventsMousePosID;
00062 long m_winEventsMouseDirID;
00063 long m_winEventsMouseOriID;
00064 long m_winEventsMouseButtonID;
00065 long m_winMousePosX_alt;
00066 long m_winMousePosY_alt;
00067 SFBool m_bMouseLogOn;
00068 long m_winWidth,m_winHeight;
00069 };
00070
00071 OAW_END_NAMESPACE
00072
00073 #endif
00074
00075
00076
00077
00078
00079
00080