cocos2d-x  3.0Beta0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ScriptHandlerMgr Class Reference

#include <LuaScriptHandlerMgr.h>

Public Types

enum  HandlerType : int {
  NODE = 0, MENU_CLICKED, CALLFUNC, SCHEDULE,
  TOUCHES, KEYPAD, ACCELEROMETER, CONTROL_TOUCH_DOWN,
  CONTROL_TOUCH_DRAG_INSIDE, CONTROL_TOUCH_DRAG_OUTSIDE, CONTROL_TOUCH_DRAG_ENTER, CONTROL_TOUCH_DRAG_EXIT,
  CONTROL_TOUCH_UP_INSIDE, CONTROL_TOUCH_UP_OUTSIDE, CONTROL_TOUCH_UP_CANCEL, CONTROL_VALUE_CHANGED,
  WEBSOCKET_OPEN, WEBSOCKET_MESSAGE, WEBSOCKET_CLOSE, WEBSOCKET_ERROR,
  GL_NODE_DRAW, SCROLLVIEW_SCROLL, SCROLLVIEW_ZOOM, TABLECELL_TOUCHED,
  TABLECELL_HIGHLIGHT, TABLECELL_UNHIGHLIGHT, TABLECELL_WILL_RECYCLE, TABLECELL_SIZE_FOR_INDEX,
  TABLECELL_AT_INDEX, TABLEVIEW_NUMS_OF_CELLS, XMLHTTPREQUEST_READY_STATE_CHANGE, ASSETSMANAGER_PROGRESS,
  ASSETSMANAGER_SUCCESS, ASSETSMANAGER_ERROR, STUDIO_EVENT_LISTENER, ARMATURE_EVENT,
  EVENT_ACC, EVENT_CUSTIOM, EVENT_KEYBOARD_PRESSED, EVENT_KEYBOARD_RELEASED,
  EVENT_TOUCH_BEGAN, EVENT_TOUCH_MOVED, EVENT_TOUCH_ENDED, EVENT_TOUCH_CANCELLED,
  EVENT_TOUCHES_BEGAN, EVENT_TOUCHES_MOVED, EVENT_TOUCHES_ENDED, EVENT_TOUCHES_CANCELLED,
  EVENT_MOUSE_DOWN, EVENT_MOUSE_UP, EVENT_MOUSE_MOVE, EVENT_MOUSE_SCROLL,
  EVENT_SPINE
}
 
typedef int Handler
typedef std::pair< HandlerType,
Handler
HandlerPair
typedef std::vector< HandlerPairVecHandlerPairs
typedef std::map< void
*, VecHandlerPairs
MapObjectHandlers

Public Member Functions

 ScriptHandlerMgr (void)
virtual ~ScriptHandlerMgr (void)
void addObjectHandler (void *object, int handler, ScriptHandlerMgr::HandlerType handlerType)
void removeObjectHandler (void *object, ScriptHandlerMgr::HandlerType handlerType)
int getObjectHandler (void *object, ScriptHandlerMgr::HandlerType handlerType)
void removeObjectAllHandlers (void *object)

Static Public Member Functions

static ScriptHandlerMgrgetInstance (void)

Member Typedef Documentation

typedef int Handler
typedef std::pair<HandlerType,
Handler> HandlerPair
typedef std::map<void*,VecHandlerPairs>
MapObjectHandlers
typedef std::vector
<HandlerPair> VecHandlerPairs

Member Enumeration Documentation

enum HandlerType : int
strong
Enumerator
NODE 
MENU_CLICKED 
CALLFUNC 
SCHEDULE 
TOUCHES 
KEYPAD 
ACCELEROMETER 
CONTROL_TOUCH_DOWN 
CONTROL_TOUCH_DRAG_INSIDE 
CONTROL_TOUCH_DRAG_OUTSIDE 
CONTROL_TOUCH_DRAG_ENTER 
CONTROL_TOUCH_DRAG_EXIT 
CONTROL_TOUCH_UP_INSIDE 
CONTROL_TOUCH_UP_OUTSIDE 
CONTROL_TOUCH_UP_CANCEL 
CONTROL_VALUE_CHANGED 
WEBSOCKET_OPEN 
WEBSOCKET_MESSAGE 
WEBSOCKET_CLOSE 
WEBSOCKET_ERROR 
GL_NODE_DRAW 
SCROLLVIEW_SCROLL 
SCROLLVIEW_ZOOM 
TABLECELL_TOUCHED 
TABLECELL_HIGHLIGHT 
TABLECELL_UNHIGHLIGHT 
TABLECELL_WILL_RECYCLE 
TABLECELL_SIZE_FOR_INDEX 
TABLECELL_AT_INDEX 
TABLEVIEW_NUMS_OF_CELLS 
XMLHTTPREQUEST_READY_STATE_CHANGE 
ASSETSMANAGER_PROGRESS 
ASSETSMANAGER_SUCCESS 
ASSETSMANAGER_ERROR 
STUDIO_EVENT_LISTENER 
ARMATURE_EVENT 
EVENT_ACC 
EVENT_CUSTIOM 
EVENT_KEYBOARD_PRESSED 
EVENT_KEYBOARD_RELEASED 
EVENT_TOUCH_BEGAN 
EVENT_TOUCH_MOVED 
EVENT_TOUCH_ENDED 
EVENT_TOUCH_CANCELLED 
EVENT_TOUCHES_BEGAN 
EVENT_TOUCHES_MOVED 
EVENT_TOUCHES_ENDED 
EVENT_TOUCHES_CANCELLED 
EVENT_MOUSE_DOWN 
EVENT_MOUSE_UP 
EVENT_MOUSE_MOVE 
EVENT_MOUSE_SCROLL 
EVENT_SPINE 

Constructor & Destructor Documentation

ScriptHandlerMgr ( void  )
virtual ~ScriptHandlerMgr ( void  )
virtual

Member Function Documentation

void addObjectHandler ( void *  object,
int  handler,
ScriptHandlerMgr::HandlerType  handlerType 
)
static ScriptHandlerMgr*
getInstance
( void  )
static
int getObjectHandler ( void *  object,
ScriptHandlerMgr::HandlerType  handlerType 
)
void removeObjectAllHandlers ( void *  object)
void removeObjectHandler ( void *  object,
ScriptHandlerMgr::HandlerType  handlerType 
)

The documentation for this class was generated from the following file: