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

CCEventDispatcher. More...

#import <CCEventDispatcher.h>

Inheritance diagram for CCEventDispatcher:
<MacEventDelegate>

Instance Methods

(void) - addMouseDelegate:priority:
 Adds a mouse delegate to the dispatcher's list. More...
 
local - addMouseDelegate:priority:
 Adds a mouse delegate to the dispatcher's list. More...
 
(void) - removeMouseDelegate:
 removes a mouse delegate More...
 
(void) - removeAllMouseDelegates
 Removes all mouse delegates, releasing all the delegates. More...
 
(void) - addKeyboardDelegate:priority:
 Adds a Keyboard delegate to the dispatcher's list. More...
 
local - addKeyboardDelegate:priority:
 Adds a Keyboard delegate to the dispatcher's list. More...
 
(void) - removeKeyboardDelegate:
 removes a mouse delegate More...
 
(void) - removeAllKeyboardDelegates
 Removes all mouse delegates, releasing all the delegates. More...
 
(void) - addTouchDelegate:priority:
 Adds a Touch delegate to the dispatcher's list. More...
 
local - addTouchDelegate:priority:
 Adds a Touch delegate to the dispatcher's list. More...
 
(void) - removeTouchDelegate:
 Removes a touch delegate. More...
 
(void) - removeAllTouchDelegates
 Removes all touch delegates, releasing all the delegates. More...
 
- Instance Methods inherited from <MacEventDelegate>
(void) - mouseDown:
(void) - mouseUp:
var - mouseUp:
local - mouseUp:
(void) - mouseMoved:
var - mouseMoved:
local - mouseMoved:
(void) - mouseDragged:
var - mouseDragged:
local - mouseDragged:
(void) - rightMouseDown:
var - rightMouseDown:
local - rightMouseDown:
(void) - rightMouseDragged:
var - rightMouseDragged:
local - rightMouseDragged:
(void) - rightMouseUp:
var - rightMouseUp:
local - rightMouseUp:
(void) - otherMouseDown:
var - otherMouseDown:
local - otherMouseDown:
(void) - otherMouseDragged:
var - otherMouseDragged:
local - otherMouseDragged:
(void) - otherMouseUp:
var - otherMouseUp:
local - otherMouseUp:
(void) - scrollWheel:
var - scrollWheel:
local - scrollWheel:
(void) - mouseEntered:
var - mouseEntered:
local - mouseEntered:
(void) - mouseExited:
var - mouseExited:
local - mouseExited:
(void) - keyDown:
var - keyDown:
local - keyDown:
(void) - keyUp:
var - keyUp:
local - keyUp:
(void) - flagsChanged:
var - flagsChanged:
local - flagsChanged:
(void) - touchesBeganWithEvent:
var - touchesBeganWithEvent:
local - touchesBeganWithEvent:
(void) - touchesMovedWithEvent:
var - touchesMovedWithEvent:
local - touchesMovedWithEvent:
(void) - touchesEndedWithEvent:
var - touchesEndedWithEvent:
local - touchesEndedWithEvent:
(void) - touchesCancelledWithEvent:
var - touchesCancelledWithEvent:
local - touchesCancelledWithEvent:

Class Methods

(CCEventDispatcher *) + sharedDispatcher
 CCEventDispatcher singleton. More...
 

Protected Attributes

BOOL dispatchEvents_
struct _listEntry * keyboardDelegates_
var keyboardDelegates_
local keyboardDelegates_
struct _listEntry * mouseDelegates_
struct _listEntry * touchDelegates_

Properties

BOOL dispatchEvents

Detailed Description

CCEventDispatcher.

This is object is responsible for dispatching the events:

  • Mouse events
  • Keyboard events
  • Touch events

Only available on Mac

Method Documentation

- (void) addKeyboardDelegate: (id< CCKeyboardEventDelegate >)  delegate
priority: (NSInteger)  priority 

Adds a Keyboard delegate to the dispatcher's list.

Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

- (void) addKeyboardDelegate: var  delegate
priority: var  priority 

Adds a Keyboard delegate to the dispatcher's list.

Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

- (void) addKeyboardDelegate: local  delegate
priority: local  priority 

Adds a Keyboard delegate to the dispatcher's list.

Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

- (void) addMouseDelegate: (id< CCMouseEventDelegate >)  delegate
priority: (NSInteger)  priority 

Adds a mouse delegate to the dispatcher's list.

Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

- (void) addMouseDelegate: var  delegate
priority: var  priority 

Adds a mouse delegate to the dispatcher's list.

Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

- (void) addMouseDelegate: local  delegate
priority: local  priority 

Adds a mouse delegate to the dispatcher's list.

Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

- (void) addTouchDelegate: (id< CCTouchEventDelegate >)  delegate
priority: (NSInteger)  priority 

Adds a Touch delegate to the dispatcher's list.

Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

- (void) addTouchDelegate: var  delegate
priority: var  priority 

Adds a Touch delegate to the dispatcher's list.

Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

- (void) addTouchDelegate: local  delegate
priority: local  priority 

Adds a Touch delegate to the dispatcher's list.

Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

- (void) removeAllKeyboardDelegates

Removes all mouse delegates, releasing all the delegates.

var removeAllKeyboardDelegates

Removes all mouse delegates, releasing all the delegates.

local removeAllKeyboardDelegates

Removes all mouse delegates, releasing all the delegates.

- (void) removeAllMouseDelegates

Removes all mouse delegates, releasing all the delegates.

var removeAllMouseDelegates

Removes all mouse delegates, releasing all the delegates.

local removeAllMouseDelegates

Removes all mouse delegates, releasing all the delegates.

- (void) removeAllTouchDelegates

Removes all touch delegates, releasing all the delegates.

var removeAllTouchDelegates

Removes all touch delegates, releasing all the delegates.

local removeAllTouchDelegates

Removes all touch delegates, releasing all the delegates.

- (void) removeKeyboardDelegate: (id)  delegate

removes a mouse delegate

- (void) removeKeyboardDelegate: var  delegate

removes a mouse delegate

- (void) removeKeyboardDelegate: local  delegate

removes a mouse delegate

- (void) removeMouseDelegate: (id)  delegate

removes a mouse delegate

- (void) removeMouseDelegate: var  delegate

removes a mouse delegate

- (void) removeMouseDelegate: local  delegate

removes a mouse delegate

- (void) removeTouchDelegate: (id)  delegate

Removes a touch delegate.

- (void) removeTouchDelegate: var  delegate

Removes a touch delegate.

- (void) removeTouchDelegate: local  delegate

Removes a touch delegate.

+ (CCEventDispatcher*)
sharedDispatcher

CCEventDispatcher singleton.

var sharedDispatcher

CCEventDispatcher singleton.

local sharedDispatcher

CCEventDispatcher singleton.

Member Data Documentation

- (BOOL) dispatchEvents_
protected
var dispatchEvents_
protected
local dispatchEvents_
protected
- (struct _listEntry*)
keyboardDelegates_
protected
var keyboardDelegates_
protected
local keyboardDelegates_
protected
- (struct _listEntry*)
mouseDelegates_
protected
var mouseDelegates_
protected
local mouseDelegates_
protected
- (struct _listEntry*)
touchDelegates_
protected
var touchDelegates_
protected
local touchDelegates_
protected

Property Documentation

- (BOOL) dispatchEvents
readwritenonatomicassign
var dispatchEvents
readwritenonatomicassign
local dispatchEvents
readwritenonatomicassign

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