Package pajammin :: Module input :: Class _MouseButtonListener
[show private | hide private]
[frames | no frames]

Class _MouseButtonListener

Listener --+
           |
          _MouseButtonListener

Known Subclasses:
MousePressListener, MouseReleaseListener, _MouseClickDragListener

Base class for mouse-related events
Method Summary
  __init__(self, callback, cbdata, priority, button, buttons, rect)
  is_relevant(self, event)
Return true if this listener's callback should be notified about the given event.
    Inherited from Listener
  __cmp__(self, other)
  handle(self, event)
  start(self)
  stop(self)

Class Variable Summary
NoneType event_type = None                                                                  

Method Details

__init__(self, callback, cbdata=(), priority=50, button=None, buttons=None, rect=None)
(Constructor)

Construct a new listener.
Parameters:
callback - The listener's callback function. When an relevant event occurs, this callback will be called with the event object, plus any arguments specified in cbdata.
cbdata - A tuple containing extra arguments for the callback function.
priority - The priority of this listener.
button - If specified, then only report events that use the given mouse button.
buttons - If specified, then only report events that use one of the given mouse buttons.
rect - If specified, then only report events whose position is inside the given rectangle.
Overrides:
pajammin.input.Listener.__init__

is_relevant(self, event)

Return true if this listener's callback should be notified about the given event.
Overrides:
pajammin.input.Listener.is_relevant (inherited documentation)

Class Variable Details

event_type

Type:
NoneType
Value:
None