cocos2d-x  2.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Control Exntension

Classes

class  CCControl
 
class  CCControlButton
 for Cocos2D. More...
 
class  CCControlColourPicker
 
class  CCControlHuePicker
 
class  CCControlPotentiometer
 for Cocos2D. More...
 
class  CCControlSaturationBrightnessPicker
 
class  CCControlSlider
 
class  CCControlStepper
 
class  CCControlSwitch
 for Cocos2D. More...
 
class  CCColor3bObject
 helper class to store ccColor3B's in mutable arrays More...
 
class  CCControlUtils
 
class  CCInvocation
 
class  CCScale9Sprite
 A 9-slice sprite for cocos2d. More...
 

Macros

#define kControlEventTotalNumber   9
 Number of kinds of control event. More...
 
#define cccontrol_selector(_SELECTOR)   (SEL_CCControlHandler)(&_SELECTOR)

Typedefs

typedef unsigned int CCControlEvent
typedef unsigned int CCControlState
typedef void(CCObject::* SEL_CCControlHandler )(CCObject *, CCControlEvent)

Enumerations

enum  {
  CCControlEventTouchDown = 1 << 0, CCControlEventTouchDragInside = 1 << 1, CCControlEventTouchDragOutside = 1 << 2, CCControlEventTouchDragEnter = 1 << 3,
  CCControlEventTouchDragExit = 1 << 4, CCControlEventTouchUpInside = 1 << 5, CCControlEventTouchUpOutside = 1 << 6, CCControlEventTouchCancel = 1 << 7,
  CCControlEventValueChanged = 1 << 8
}
 Kinds of possible events for the control objects. More...
 
enum  { CCControlStateNormal = 1 << 0, CCControlStateHighlighted = 1 << 1, CCControlStateDisabled = 1 << 2, CCControlStateSelected = 1 << 3 }
 The possible state for a control. More...
 
enum  CCControlStepperPart { kCCControlStepperPartMinus, kCCControlStepperPartPlus, kCCControlStepperPartNone }
 

Functions

 CCColor3bObject (ccColor3B s_value)
static CCSprite * addSpriteToTargetWithPosAndAnchor (const char *spriteName, CCNode *target, CCPoint pos, CCPoint anchor)
static HSV HSVfromRGB (RGBA value)
static RGBA RGBfromHSV (HSV value)
static CCRect CCRectUnion (const CCRect &src1, const CCRect &src2)
virtual SEL_CCControlHandler getAction (void)
virtual CCObject * getTarget (void)
 getTarget More...
 
virtual CCControlEvent getControlEvent (void)
 getControlEvent More...
 
static CCInvocation * create (CCObject *target, SEL_CCControlHandler action, CCControlEvent controlEvent)
 CCInvocation (CCObject *target, SEL_CCControlHandler action, CCControlEvent controlEvent)
void invoke (CCObject *sender)

Variables

double r
double g
double b
double a
double h
double s
double v
ccColor3B value
SEL_CCControlHandler m_action
CCObject * m_target
CCControlEvent m_controlEvent

Detailed Description

Macro Definition Documentation

#define cccontrol_selector (   _SELECTOR)    (SEL_CCControlHandler)(&_SELECTOR)
#define kControlEventTotalNumber   9

Number of kinds of control event.

Typedef Documentation

typedef unsigned int CCControlEvent
typedef unsigned int CCControlState
typedef void(CCObject::*
SEL_CCControlHandler)(CCObject
*, CCControlEvent)

Enumeration Type Documentation

anonymous enum

Kinds of possible events for the control objects.

Enumerator
CCControlEventTouchDown 
CCControlEventTouchDragInside 
CCControlEventTouchDragOutside 
CCControlEventTouchDragEnter 
CCControlEventTouchDragExit 
CCControlEventTouchUpInside 
CCControlEventTouchUpOutside 
CCControlEventTouchCancel 
CCControlEventValueChanged 
anonymous enum

The possible state for a control.

Enumerator
CCControlStateNormal 
CCControlStateHighlighted 
CCControlStateDisabled 
CCControlStateSelected 
enum CCControlStepperPart
Enumerator
kCCControlStepperPartMinus 
kCCControlStepperPartPlus 
kCCControlStepperPartNone 

Function Documentation

CCColor3bObject ( ccColor3B  s_value)
inline
CCInvocation ( CCObject target,
SEL_CCControlHandler  action,
CCControlEvent  controlEvent 
)
static CCSprite*
addSpriteToTargetWithPosAndAnchor
( const char *  spriteName,
CCNode target,
CCPoint  pos,
CCPoint  anchor 
)
static
static CCRect CCRectUnion ( const CCRect src1,
const CCRect src2 
)
static
static CCInvocation* create ( CCObject target,
SEL_CCControlHandler  action,
CCControlEvent  controlEvent 
)
static
virtual SEL_CCControlHandler
getAction
( void  )
virtual
virtual CCControlEvent
getControlEvent
( void  )
virtual

getControlEvent

virtual CCObject* getTarget ( void  )
virtual

getTarget

static HSV HSVfromRGB ( RGBA  value)
static
void invoke ( CCObject sender)
static RGBA RGBfromHSV ( HSV  value)
static

Variable Documentation

double a
double b
double g
double h
SEL_CCControlHandler m_action
protected
CCControlEvent m_controlEvent
protected
CCObject* m_target
protected
double r
double s
double v
ccColor3B value