cocos2d-x  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCBProxy Class Reference

CCBProxy is a proxy for cocosbuilder. More...

#include <CCBProxy.h>

Inheritance diagram for CCBProxy:

Public Member Functions

 CCBProxy ()
 Default constructor,do nothing. More...
 
virtual ~CCBProxy ()
 Destructor. More...
 
 CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD (CCBProxy, create)
 Create a CCBProxy object. More...
 
 CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD ( local CCBProxy, local create)
 Create a CCBProxy object. More...
 
CCBReadercreateCCBReader ()
 Createa a CCBReader object. More...
 
local createCCBReader ()
 Createa a CCBReader object. More...
 
Node * readCCBFromFile (const char *pszFileName, CCBReader *pCCBReader, bool bSetOwner=false)
const char * getNodeTypeName (Node *pNode)
 Get the true type name of pNode. More...
 
void setCallback (Node *node, int handle, int controlEvents=0)
 Set relationship between the Lua callback function refrence index handle and the node. More...
 

Detailed Description

CCBProxy is a proxy for cocosbuilder.

By using CCBProxy we could create a CCBReader object conveniently and set the Lua callback function when some events triggered should be passed onto Lua.

Constructor & Destructor Documentation

CCBProxy ( )
inline

Default constructor,do nothing.

local CCBProxy ( )
inline

Default constructor,do nothing.

virtual ~CCBProxy ( )
inlinevirtual

Destructor.

local ~CCBProxy ( )
inlinevirtual

Destructor.

Member Function Documentation

CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD ( CCBProxy  ,
create   
)

Create a CCBProxy object.

Returns
a CCBProxy object.
local
CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD
( local  ,
local   
)

Create a CCBProxy object.

Returns
a CCBProxy object.
CCBReader* createCCBReader ( )

Createa a CCBReader object.

Returns
a CCBReader object.
local createCCBReader ( )

Createa a CCBReader object.

Returns
a CCBReader object.
const char* getNodeTypeName ( Node *  pNode)

Get the true type name of pNode.

By using the dynamic_cast function, we coulde get the true type name of pNode.

pNode the Node object used to query.

Returns
a string pointer point to the true type name otherwise return "No Support".
local getNodeTypeName ( local  pNode)

Get the true type name of pNode.

By using the dynamic_cast function, we coulde get the true type name of pNode.

pNode the Node object used to query.

Returns
a string pointer point to the true type name otherwise return "No Support".
Node* readCCBFromFile ( const char *  pszFileName,
CCBReader pCCBReader,
bool  bSetOwner = false 
)
local readCCBFromFile ( local  pszFileName,
local  pCCBReader,
local  bSetOwner = false 
)
void setCallback ( Node *  node,
int  handle,
int  controlEvents = 0 
)

Set relationship between the Lua callback function refrence index handle and the node.

According to the different controlEvents values,we would choose different ScriptHandlerMgr::HandlerTyp. When node receive the events information should be passed on to Lua, it would find the Lua callback funtion by the Lua callback function refrence index.

Parameters
nodethe node object should pass on the events information to Lua,when the events are triggered.
handlethe Lua callback function refrence index.
controlEventsthe combination value of Control::EventType, default 0.
local setCallback ( local  node,
local  handle,
local  controlEvents = 0 
)

Set relationship between the Lua callback function refrence index handle and the node.

According to the different controlEvents values,we would choose different ScriptHandlerMgr::HandlerTyp. When node receive the events information should be passed on to Lua, it would find the Lua callback funtion by the Lua callback function refrence index.

Parameters
nodethe node object should pass on the events information to Lua,when the events are triggered.
handlethe Lua callback function refrence index.
controlEventsthe combination value of Control::EventType, default 0.

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