2012-06-13 02:59:49 +08:00
|
|
|
#ifndef _CCB_CCBSELECTORRESOLVER_H_
|
|
|
|
#define _CCB_CCBSELECTORRESOLVER_H_
|
2012-06-05 06:52:49 +08:00
|
|
|
|
|
|
|
#include "cocos2d.h"
|
|
|
|
|
|
|
|
NS_CC_EXT_BEGIN
|
|
|
|
|
2012-06-15 09:16:54 +08:00
|
|
|
#define CCB_SELECTORRESOLVER_CCMENUITEM_GLUE(TARGET, SELECTORNAME, METHOD) if(pTarget == TARGET && pSelectorName->compare(SELECTORNAME) == 0) { \
|
|
|
|
return menu_selector(METHOD); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define CCB_SELECTORRESOLVER_CCCONTROL_GLUE(TARGET, SELECTORNAME, METHOD) if(pTarget == TARGET && pSelectorName->compare(SELECTORNAME) == 0) { \
|
|
|
|
return cccontrol_selector(METHOD); \
|
|
|
|
}
|
|
|
|
|
2012-06-14 18:32:44 +08:00
|
|
|
class CC_DLL CCBSelectorResolver {
|
2012-06-05 06:52:49 +08:00
|
|
|
public:
|
2012-06-16 13:04:23 +08:00
|
|
|
virtual ~CCBSelectorResolver() {}
|
2012-06-15 09:16:54 +08:00
|
|
|
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName) = 0;
|
2012-06-14 15:01:01 +08:00
|
|
|
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName) = 0;
|
2012-06-05 06:52:49 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
NS_CC_EXT_END
|
|
|
|
|
|
|
|
#endif
|