|
cocos2d-x
2.2.3-gd2.113-rev1ec524e
|
#include <CCTouchDispatcher.h>
Public Member Functions | |
| ~CCTouchDispatcher () | |
| NA. More... | |
| bool | init (void) |
| NA. More... | |
| CCTouchDispatcher () | |
| NA. More... | |
| bool | isDispatchEvents (void) |
| Whether or not the events are going to be dispatched. More... | |
| void | setDispatchEvents (bool bDispatchEvents) |
| void | addStandardDelegate (CCTouchDelegate *pDelegate, int nPriority) |
| Adds a standard touch delegate to the dispatcher's list. More... | |
| void | addTargetedDelegate (CCTouchDelegate *pDelegate, int nPriority, bool bSwallowsTouches) |
| Adds a targeted touch delegate to the dispatcher's list. More... | |
| void | removeDelegate (CCTouchDelegate *pDelegate) |
| Removes a touch delegate. More... | |
| void | removeAllDelegates (void) |
| Removes all touch delegates, releasing all the delegates NA. More... | |
| void | setPriority (int nPriority, CCTouchDelegate *pDelegate) |
| Changes the priority of a previously added delegate. More... | |
| void | touches (CCSet *pTouches, CCEvent *pEvent, unsigned int uIndex) |
| NA. More... | |
| virtual void | touchesBegan (CCSet *touches, CCEvent *pEvent) |
| NA. More... | |
| virtual void | touchesMoved (CCSet *touches, CCEvent *pEvent) |
| NA. More... | |
| virtual void | touchesEnded (CCSet *touches, CCEvent *pEvent) |
| NA. More... | |
| virtual void | touchesCancelled (CCSet *touches, CCEvent *pEvent) |
| NA. More... | |
| CCTouchHandler * | findHandler (CCTouchDelegate *pDelegate) |
| NA. More... | |
| void | incrementForcePrio (int priority) |
| void | decrementForcePrio (int priority) |
Public Member Functions inherited from CCObject | |
| CCObject (void) | |
| virtual | ~CCObject (void) |
| NA. More... | |
| void | release (void) |
| void | retain (void) |
| CCObject * | autorelease (void) |
| CCObject * | copy (void) |
| bool | isSingleReference (void) const |
| unsigned int | retainCount (void) const |
| virtual bool | isEqual (const CCObject *pObject) |
| virtual void | acceptVisitor (CCDataVisitor &visitor) |
| virtual void | update (float dt) |
| CCObject (const CCObject &) | |
| CCObject & | operator= (const CCObject &) |
| virtual void | encodeWithCoder (DS_Dictionary *) |
| virtual bool | canEncode () |
| CCObjectType | getObjType () const |
| virtual int | getTag () const |
| virtual void | setTag (int nTag) |
| void | setObjType (CCObjectType) |
Public Member Functions inherited from CCCopying | |
| virtual CCObject * | copyWithZone (CCZone *pZone) |
Public Member Functions inherited from EGLTouchDelegate | |
| virtual void | touchesBegan (CCSet *touches, CCEvent *pEvent)=0 |
| NA. More... | |
| virtual void | touchesMoved (CCSet *touches, CCEvent *pEvent)=0 |
| NA. More... | |
| virtual void | touchesEnded (CCSet *touches, CCEvent *pEvent)=0 |
| NA. More... | |
| virtual void | touchesCancelled (CCSet *touches, CCEvent *pEvent)=0 |
| NA. More... | |
| virtual | ~EGLTouchDelegate () |
| NA. More... | |
Protected Member Functions | |
| void | forceRemoveDelegate (CCTouchDelegate *pDelegate) |
| void | forceAddHandler (CCTouchHandler *pHandler, CCArray *pArray) |
| void | forceRemoveAllDelegates (void) |
| void | rearrangeHandlers (CCArray *pArray) |
| CCTouchHandler * | findHandler (CCArray *pArray, CCTouchDelegate *pDelegate) |
Protected Attributes | |
| CCArray * | m_pTargetedHandlers |
| CCArray * | m_pStandardHandlers |
| bool | m_bLocked |
| bool | m_bToAdd |
| bool | m_bToRemove |
| CCArray * | m_pHandlersToAdd |
| struct _ccCArray * | m_pHandlersToRemove |
| bool | m_bToQuit |
| bool | m_bDispatchEvents |
| struct ccTouchHandlerHelperData | m_sHandlerHelperData [ccTouchMax] |
Protected Attributes inherited from CCObject | |
| unsigned int | m_uReference |
| unsigned int | m_uAutoReleaseCount |
| int | m_nTag |
| int | m_eObjType |
| unsigned int | m_uObjectIdxInArray |
| bool | m_bForcePrio |
| int | m_nTargetPrio |
| bool | getForcePrio (void) |
| void | setForcePrio (bool var) |
| int | getTargetPrio (void) |
| void | setTargetPrio (int var) |
Additional Inherited Members | |
Static Public Member Functions inherited from CCObject | |
| static CCObject * | createWithCoder (DS_Dictionary *) |
Public Attributes inherited from CCObject | |
| unsigned int | m_uID |
| int | m_nLuaID |
Singleton that handles all the touch events. The dispatcher dispatches events to the registered TouchHandlers. There are 2 different type of touch handlers:
The Standard Touch Handlers work like the CocoaTouch touch handler: a set of touches is passed to the delegate. On the other hand, the Targeted Touch Handlers only receive 1 touch at the time, and they can "swallow" touches (avoid the propagation of the event).
Firstly, the dispatcher sends the received touches to the targeted touches. These touches can be swallowed by the Targeted Touch Handlers. If there are still remaining touches, then the remaining touches will be sent to the Standard Touch Handlers.
| ~CCTouchDispatcher | ( | ) |
NA.
|
inline |
NA.
| void addStandardDelegate | ( | CCTouchDelegate * | pDelegate, |
| int | nPriority | ||
| ) |
Adds a standard touch delegate to the dispatcher's list.
See StandardTouchDelegate description. IMPORTANT: The delegate will be retained. NA
| void addTargetedDelegate | ( | CCTouchDelegate * | pDelegate, |
| int | nPriority, | ||
| bool | bSwallowsTouches | ||
| ) |
Adds a targeted touch delegate to the dispatcher's list.
See TargetedTouchDelegate description. IMPORTANT: The delegate will be retained. NA
| void decrementForcePrio | ( | int | priority | ) |
|
protected |
| CCTouchHandler * findHandler | ( | CCTouchDelegate * | pDelegate | ) |
NA.
|
protected |
|
protected |
|
protected |
| bool getForcePrio | ( | void | ) |
| int getTargetPrio | ( | void | ) |
| void incrementForcePrio | ( | int | priority | ) |
| bool init | ( | void | ) |
NA.
| bool isDispatchEvents | ( | void | ) |
Whether or not the events are going to be dispatched.
Default: true
|
protected |
| void removeAllDelegates | ( | void | ) |
Removes all touch delegates, releasing all the delegates NA.
| void removeDelegate | ( | CCTouchDelegate * | pDelegate | ) |
Removes a touch delegate.
The delegate will be released NA
| void setDispatchEvents | ( | bool | bDispatchEvents | ) |
| void setForcePrio | ( | bool | var | ) |
| void setPriority | ( | int | nPriority, |
| CCTouchDelegate * | pDelegate | ||
| ) |
Changes the priority of a previously added delegate.
The lower the number, the higher the priority NA
| void setTargetPrio | ( | int | var | ) |
NA.
Implements EGLTouchDelegate.
NA.
Implements EGLTouchDelegate.
NA.
Implements EGLTouchDelegate.
NA.
Implements EGLTouchDelegate.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |