2 #include "EventClasses.h" 19 virtual int OnEvent(
const IEvent* event,
const string& sScriptCode);
31 const string& GetCode()
const {
return m_sCode;};
32 const string& GetFileName()
const {
return m_sFileName;};
33 void SetScript(
const string& sScript);
34 bool Equals(
const CEventHandler& e)
const {
return (m_sID==e.m_sID);}
35 bool Equals(
const string& sID)
const {
return (m_sID==sID);}
36 inline bool IsMouseEvent()
const {
return (m_type & (EH_MOUSE|EH_MOUSE_MOVE|EH_MOUSE_DOWN|EH_MOUSE_UP))>0;}
37 inline bool IsKeyEvent()
const {
return (m_type & (EH_KEY | EH_KEY_UP))>0;}
38 inline bool IsEditorEvent()
const {
return (m_type & EH_EDITOR)>0;}
39 inline bool IsSystemEvent()
const {
return (m_type & EH_SYSTEM)>0;}
40 inline bool IsNetworkEvent()
const {
return (m_type & EH_NETWORK)>0;}
41 inline bool IsTouchEvent()
const {
return (m_type & EH_TOUCH)>0; }
42 inline bool IsEvent(
int nEventType)
const {
return (m_type & (0x1<<nEventType))>0;}
47 CEventHandler(DWORD nType,
const string& sID,
const string& sScript);
virtual int OnEvent(const IEvent *event, const string &sScriptCode)
the callback function, when a given event is fired.
Definition: EventHandler.cpp:73
different physics engine has different winding order.
Definition: EventBinding.h:32
DWORD GetType()
get the event type.
Definition: EventHandler.h:44
event handler
Definition: EventHandler.h:11
the event interface
Definition: IEvent.h:8