Class CCControl

#include <Geode/cocos/extensions/GUI/CCControlExtension/CCControl.h>
classCCControl:publiccocos2d::CCLayerRGBA{ ... }
No description provided
Examples0
Public static methods0
Public member functions22
cocos2d::extension::CCControlStategetState()const

The current control state constant.

ℹ Robtop Addition: Made non virtual

virtualvoidsetEnabled(
boolbEnabled
)

Tells whether the control is enabled.

virtualboolisEnabled()
No description provided
virtualvoidsetSelected(
boolbSelected
)

A Boolean value that determines the control selected state.

virtualboolisSelected()
No description provided
virtualvoidsetHighlighted(
boolbHighlighted
)

A Boolean value that determines whether the control is highlighted.

virtualboolisHighlighted()
No description provided
boolhasVisibleParents()
No description provided
virtualvoidneedsLayout()

Updates the control layout using its current internal state.

virtualboolisOpacityModifyRGB()
No description provided
virtualvoidsetOpacityModifyRGB(
boolbOpacityModifyRGB
)
No description provided
virtualboolinit()
No description provided
virtualvoidonEnter()
No description provided
virtualvoidonExit()
No description provided
virtualvoidregisterWithTouchDispatcher()
No description provided
virtualvoidsendActionsForControlEvents()

Sends action messages for the given control events.

Parameters

controlEvents

A bitmask whose set flags specify the control events for which action messages are sent. See "CCControlEvent" for bitmask constants.
virtualvoidaddTargetWithActionForControlEvents(,,)

Adds a target and action for a particular event (or events) to an internal dispatch table. The action message may optionnaly include the sender and the event as parameters, in that order. When you call this method, target is not retained.

Parameters

target

The target object that is, the object to which the action message is sent. It cannot be nil. The target is not retained.

action

A selector identifying an action message. It cannot be NULL.

controlEvents

A bitmask specifying the control events for which the action message is sent. See "CCControlEvent" for bitmask constants.
virtualvoidremoveTargetWithActionForControlEvents(,,)

Removes a target and action for a particular event (or events) from an internal dispatch table.

Parameters

target

The target object�that is, the object to which the action message is sent. Pass nil to remove all targets paired with action and the specified control events.

action

A selector identifying an action message. Pass NULL to remove all action messages paired with target.

controlEvents

A bitmask specifying the control events associated with target and action. See "CCControlEvent" for bitmask constants.
virtualcocos2d::CCPointgetTouchLocation()

Returns a point corresponding to the touh location converted into the control space coordinates.

Parameters

touch

A CCTouch object that represents a touch.
virtualboolisTouchInside()

Returns a boolean value that indicates whether a touch is inside the bounds of the receiver. The given touch must be relative to the world.

Parameters

touch

A CCTouch object that represents a touch.
Return value
YES whether a touch is inside the receiver��s rect.
voidaddHandleOfControlEvent(
intnFunID
,)
No description provided
voidremoveHandleOfControlEvent()
No description provided
Fields2
boolm_bIsOpacityModifyRGB
;
No description provided
boolm_hasVisibleParents
;

True if all of the controls parents are visible

Protected member functions4
cocos2d::extension::CCInvocation*invocationWithTargetAndActionForControlEvent(,,)

Returns an CCInvocation object able to construct messages using a given target-action pair. (The invocation may optionnaly include the sender and the event as parameters, in that order)

Parameters

target

The target object.

action

A selector identifying an action message.

controlEvent

A control events for which the action message is sent. See "CCControlEvent" for constants.
Return value
an CCInvocation object able to construct messages using a given target-action pair.
cocos2d::CCArray*dispatchListforControlEvent()

Returns the CCInvocation list for the given control event. If the list does not exist, it’ll create an empty array before returning it.

Parameters

controlEvent

A control events for which the action message is sent. See "CCControlEvent" for constants.
Return value
the CCInvocation list for the given control event.
voidaddTargetWithActionForControlEvent(,,)

Adds a target and action for a particular event to an internal dispatch table. The action message may optionnaly include the sender and the event as parameters, in that order. When you call this method, target is not retained.

Parameters

target

The target object��that is, the object to which the action message is sent. It cannot be nil. The target is not retained.

action

A selector identifying an action message. It cannot be NULL.

controlEvent

A control event for which the action message is sent. See "CCControlEvent" for constants.
voidremoveTargetWithActionForControlEvent(,,)

Removes a target and action for a particular event from an internal dispatch table.

Parameters

target

The target object��that is, the object to which the action message is sent. Pass nil to remove all targets paired with action and the specified control events.

action

A selector identifying an action message. Pass NULL to remove all action messages paired with target.

controlEvent

A control event for which the action message is sent. See "CCControlEvent" for constants.
Protected fields5
;

The current control state constant.

ℹ Robtop Addition: Made non virtual

boolm_bEnabled
;
No description provided
boolm_bSelected
;
No description provided
boolm_bHighlighted
;
No description provided
cocos2d::CCDictionary*m_pDispatchTable
;

Table of connection between the CCControlEvents and their associated target-actions pairs. For each CCButtonEvents a list of NSInvocation (which contains the target-action pair) is linked.