cocos2d-x  2.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCTouchDispatcher Class Reference

@ More...

#include <CCTouchDispatcher.h>

Inheritance diagram for CCTouchDispatcher:
CCObject EGLTouchDelegate CCCopying

Public Member Functions

 ~CCTouchDispatcher ()
bool init (void)
 CCTouchDispatcher ()
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. 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)
virtual void touchesBegan (CCSet *touches, CCEvent *pEvent)
virtual void touchesMoved (CCSet *touches, CCEvent *pEvent)
virtual void touchesEnded (CCSet *touches, CCEvent *pEvent)
virtual void touchesCancelled (CCSet *touches, CCEvent *pEvent)
CCTouchHandlerfindHandler (CCTouchDelegate *pDelegate)
- Public Member Functions inherited from CCObject
 CCObject (void)
virtual ~CCObject (void)
void release (void)
void retain (void)
CCObjectautorelease (void)
CCObjectcopy (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)
- Public Member Functions inherited from CCCopying
virtual CCObjectcopyWithZone (CCZone *pZone)
- Public Member Functions inherited from EGLTouchDelegate
virtual ~EGLTouchDelegate ()

Protected Member Functions

void forceRemoveDelegate (CCTouchDelegate *pDelegate)
void forceAddHandler (CCTouchHandler *pHandler, CCArray *pArray)
void forceRemoveAllDelegates (void)
void rearrangeHandlers (CCArray *pArray)
CCTouchHandlerfindHandler (CCArray *pArray, CCTouchDelegate *pDelegate)
local findHandler ( local pArray, local pDelegate)

Protected Attributes

CCArraym_pTargetedHandlers
CCArraym_pStandardHandlers
bool m_bLocked
bool m_bToAdd
bool m_bToRemove
CCArraym_pHandlersToAdd
struct _ccCArray * m_pHandlersToRemove
local 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

Additional Inherited Members

- Public Attributes inherited from CCObject
unsigned int m_uID
int m_nLuaID

Detailed Description

@

@

Constructor & Destructor Documentation

CCTouchDispatcher ( )
inline

Member Function Documentation

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.

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.

CCTouchHandler* findHandler ( CCTouchDelegate pDelegate)
CCTouchHandler* findHandler ( CCArray pArray,
CCTouchDelegate pDelegate 
)
protected
local findHandler ( local  pArray,
local  pDelegate 
)
protected
void forceAddHandler ( CCTouchHandler pHandler,
CCArray pArray 
)
protected
local forceAddHandler ( local  pHandler,
local  pArray 
)
protected
void forceRemoveAllDelegates ( void  )
protected
local forceRemoveAllDelegates (   )
protected
void forceRemoveDelegate ( CCTouchDelegate pDelegate)
protected
local forceRemoveDelegate ( local  pDelegate)
protected
bool init ( void  )
bool isDispatchEvents ( void  )

Whether or not the events are going to be dispatched.

Default: true

local isDispatchEvents (   )

Whether or not the events are going to be dispatched.

Default: true

void rearrangeHandlers ( CCArray pArray)
protected
local rearrangeHandlers ( local  pArray)
protected
void removeAllDelegates ( void  )

Removes all touch delegates, releasing all the delegates.

void removeDelegate ( CCTouchDelegate pDelegate)

Removes a touch delegate.

The delegate will be released

void setDispatchEvents ( bool  bDispatchEvents)
local setDispatchEvents ( local  bDispatchEvents)
void setPriority ( int  nPriority,
CCTouchDelegate pDelegate 
)

Changes the priority of a previously added delegate.

The lower the number, the higher the priority

void touches ( CCSet pTouches,
CCEvent pEvent,
unsigned int  uIndex 
)
virtual void touchesBegan ( CCSet touches,
CCEvent pEvent 
)
virtual

Implements EGLTouchDelegate.

virtual void touchesCancelled ( CCSet touches,
CCEvent pEvent 
)
virtual

Implements EGLTouchDelegate.

virtual void touchesEnded ( CCSet touches,
CCEvent pEvent 
)
virtual

Implements EGLTouchDelegate.

virtual void touchesMoved ( CCSet touches,
CCEvent pEvent 
)
virtual

Implements EGLTouchDelegate.

Member Data Documentation

bool m_bDispatchEvents
protected
local m_bDispatchEvents
protected
bool m_bLocked
protected
local m_bLocked
protected
bool m_bToAdd
protected
local m_bToAdd
protected
bool m_bToQuit
protected
local m_bToQuit
protected
bool m_bToRemove
protected
local m_bToRemove
protected
CCArray* m_pHandlersToAdd
protected
local m_pHandlersToAdd
protected
struct _ccCArray*
m_pHandlersToRemove
protected
local m_pHandlersToRemove
protected
CCArray* m_pStandardHandlers
protected
local m_pStandardHandlers
protected
CCArray* m_pTargetedHandlers
protected
local m_pTargetedHandlers
protected
struct
ccTouchHandlerHelperData
m_sHandlerHelperData[ccTouchMax]
protected
struct
ccTouchHandlerHelperData
m_sHandlerHelperData[ccTouchMax]
protected

The documentation for this class was generated from the following file: