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

EventDispatcher. More...

#import <CCEventDispatcher.h>

Inheritance diagram for CCEventDispatcher:
<CCMacEventDelegate>

Instance Methods

(void) - 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...
 
(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...
 
(void) - removeTouchDelegate:
 Removes a touch delegate. More...
 
(void) - removeAllTouchDelegates
 Removes all touch delegates, releasing all the delegates. More...
 
- Instance Methods inherited from <CCMacEventDelegate>
(void) - mouseDown:
(void) - mouseUp:
(void) - mouseMoved:
(void) - mouseDragged:
(void) - rightMouseDown:
(void) - rightMouseDragged:
(void) - rightMouseUp:
(void) - otherMouseDown:
(void) - otherMouseDragged:
(void) - otherMouseUp:
(void) - scrollWheel:
(void) - mouseEntered:
(void) - mouseExited:
(void) - keyDown:
(void) - keyUp:
(void) - flagsChanged:
(void) - touchesBeganWithEvent:
var - touchesBeganWithEvent:
local - touchesBeganWithEvent:
(void) - touchesMovedWithEvent:
(void) - touchesEndedWithEvent:
(void) - touchesCancelledWithEvent:

Class Methods

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

Protected Attributes

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

Properties

BOOL dispatchEvents

Detailed Description

EventDispatcher.

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

EventDispatcher singleton.

var sharedDispatcher

EventDispatcher singleton.

local sharedDispatcher

EventDispatcher 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: