Package fife :: Package extensions :: Package pychan :: Module events :: Class EventMapper
[hide private]
[frames] | no frames]

Class EventMapper

source code

object --+
         |
        EventMapper

Handles events and callbacks for widgets.Widget and derived classes.

Every PyChan widget has an EventMapper instance as attribute event_mapper.

This instance handles all necessary house-keeping. Such an event mapper can be either attached or detached. In its attached state an EventListenerBase is added to the Guichan widget and will redirect the events to the callbacks.

In its detached state no events are received from the real Guichan widget.

The event mapper starts in the detached state. When a new event is captured the mapper attaches itself automatically. The widget doesn't need to handle that.

Instance Methods [hide private]
 
__init__(self, widget)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__repr__(self)
repr(x)
source code
 
attach(self) source code
 
detach(self) source code
 
capture(self, event_name, callback, group_name) source code
 
isCaptured(self, event_name, group_name="default") source code
 
getCapturedEvents(self) source code
 
getListener(self, event_name) source code
 
removeEvent(self, event_name, group_name) source code
 
addEvent(self, event_name, callback, group_name) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, widget)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)