CCBProxy is a proxy for cocosbuilder. More...
#include <CCBProxy.h>
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... | |
CCBReader * | createCCBReader () |
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... | |
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.
|
inline |
Default constructor,do nothing.
|
inline |
Default constructor,do nothing.
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Destructor.
CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD | ( | CCBProxy | , |
create | |||
) |
local CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD |
( | local | , |
local | |||
) |
CCBReader* createCCBReader | ( | ) |
Createa a CCBReader object.
local createCCBReader | ( | ) |
Createa 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.
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.
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.
node | the node object should pass on the events information to Lua,when the events are triggered. |
handle | the Lua callback function refrence index. |
controlEvents | the 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.
node | the node object should pass on the events information to Lua,when the events are triggered. |
handle | the Lua callback function refrence index. |
controlEvents | the combination value of Control::EventType, default 0. |