Cocos2d-x  v3.11
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
Event Class Reference

Base class of all kinds of events. More...

Inherits Ref.

Inherited by EventAcceleration, EventCustom, EventFocus, EventKeyboard, EventMouse, and EventTouch.

Public Types

enum  Type
 Type Event type.
 

Public Member Functions

virtual ~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...
 
local retain ()
 Retains the ownership. More...
 
void 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.
 

Protected Member Functions

 Event (Type type)
 Constructor.
 
 Event ( var type)
 Constructor.
 
 Event ( local type)
 Constructor.
 

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.
 
bool _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 
local _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 

Detailed Description

Base class of all kinds of events.

Member Function Documentation

Type getType ( ) const
inline

Gets the event type.

The event type.

var getType ( )
inline

Gets the event type.

The event type.

local getType ( )
inline

Gets the event type.

The event type.

bool isStopped ( ) const
inline

Checks whether the event has been stopped.

True if the event has been stopped.

var isStopped ( )
inline

Checks whether the event has been stopped.

True if the event has been stopped.

local isStopped ( )
inline

Checks whether the event has been stopped.

True if the event has been stopped.

Node* getCurrentTarget ( )
inline

Gets current target of the event.

The target with which the event associates. It onlys be available when the event listener is associated with node. It returns 0 when the listener is associated with fixed priority.

var getCurrentTarget ( )
inline

Gets current target of the event.

The target with which the event associates. It onlys be available when the event listener is associated with node. It returns 0 when the listener is associated with fixed priority.

local getCurrentTarget ( )
inline

Gets current target of the event.

The target with which the event associates. It onlys be available when the event listener is associated with node. It returns 0 when the listener is associated with fixed priority.


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