cocos2d-x  3.0alpha1
 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, NOTIFICATION, 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, EVENT_LISTENER,
  ARMATURE_EVENT
}
 
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 
NOTIFICATION 
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 
EVENT_LISTENER 
ARMATURE_EVENT 

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: