Cocos2d-x  v3.17
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
EventTouch Class Reference

Touch event. More...

Inherits Event.

Public Types

enum  EventCode
 EventCode Touch event code. More...
 
- Public Types inherited from Event
enum  Type
 Type Event type. More...
 

Public Member Functions

 EventTouch ()
 Constructor.
 
 EventTouch ()
 Constructor.
 
EventCode getEventCode () const
 Get event code. More...
 
local getEventCode ()
 Get event code. More...
 
const std::vector< Touch * > & getTouches () const
 Get the touches. More...
 
local getTouches ()
 Get the touches. More...
 
void setEventCode (EventCode eventCode)
 Set the event code. More...
 
void setTouches (const std::vector< Touch * > &touches)
 Set the touches. More...
 
var setTouches ( var touches)
 Set the touches. More...
 
local setTouches ( local touches)
 Set the touches. More...
 
- Public Member Functions inherited from Event
virtual ~Event ()
 Destructor.
 
var ~Event ()
 Destructor.
 
local ~Event ()
 Destructor.
 
Type getType () const
 Gets the event type. More...
 
var getType ()
 Gets the event type. More...
 
local getType ()
 Gets the event type. More...
 
void stopPropagation ()
 Stops propagation for current event.
 
var stopPropagation ()
 Stops propagation for current event.
 
local stopPropagation ()
 Stops propagation for current event.
 
bool isStopped () const
 Checks whether the event has been stopped. More...
 
var isStopped ()
 Checks whether the event has been stopped. More...
 
local isStopped ()
 Checks whether the event has been stopped. More...
 
NodegetCurrentTarget ()
 Gets current target of the event. More...
 
var getCurrentTarget ()
 Gets current target of the event. More...
 
local getCurrentTarget ()
 Gets current target of the event. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
local release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor. More...
 

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
local _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
local _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
local _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 
local _rooted
 When true, it means that the object was already rooted.
 
- Protected Member Functions inherited from Event
 Event (Type type)
 Constructor.
 
 Event ( var type)
 Constructor.
 
 Event ( local type)
 Constructor.
 

Detailed Description

Touch event.

Member Function Documentation

EventCode getEventCode ( ) const
inline

Get event code.

Returns
The code of the event.
var getEventCode ( )
inline

Get event code.

Returns
The code of the event.
local getEventCode ( )
inline

Get event code.

Returns
The code of the event.
const std::vector<Touch*>
& getTouches
( ) const
inline

Get the touches.

Returns
The touches of the event.
var getTouches ( )
inline

Get the touches.

Returns
The touches of the event.
local getTouches ( )
inline

Get the touches.

Returns
The touches of the event.
void setEventCode ( EventCode  eventCode)
inline

Set the event code.

Parameters
eventCodeA given EventCode.
var setEventCode ( var  eventCode)
inline

Set the event code.

Parameters
eventCodeA given EventCode.
local setEventCode ( local  eventCode)
inline

Set the event code.

Parameters
eventCodeA given EventCode.
void setTouches ( const std::vector< Touch * > &  touches)
inline

Set the touches.

Parameters
touchesA given touches vector.
var setTouches ( var  touches)
inline

Set the touches.

Parameters
touchesA given touches vector.
local setTouches ( local  touches)
inline

Set the touches.

Parameters
touchesA given touches vector.

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