Package pygsear :: Module Event :: Class EventGroup
[show private | hide private]
[frames | no frames]

Class EventGroup

object --+    
         |    
     Group --+
             |
            EventGroup


Used to group related events.
Method Summary
  __init__(self, event)
Initialize the Group.
  __len__(self)
__len__() -> int number of sprites in group (inherited from Group)
a new object with type S, a subtype of T __new__(S, ...)
  __nonzero__(self)
__nonzero__() -> bool ask if group is empty (inherited from Group)
  __repr__(self)
(inherited from Group)
  add(self, event)
Add the event to the container.
  add_internal(self, sprite)
(inherited from Group)
  check(self)
Go through the pygame event queue and callback to events that should be triggered.
  copy(self)
copy() -> Group copy a group with all the same sprites (inherited from Group)
  disable(self)
Do not allow callbacks to any sprites in this group to go through.
  empty(self)
empty() remove all sprites (inherited from Group)
  enable(self)
Allow callbacks to all events in this group to go through.
  events(self)
return a list of all events in this group.
  has(self, sprite)
has(sprite) -> bool ask if group has sprite (inherited from Group)
  kill(self)
Call the killmethod on every event in this group, to remove all of the events from all of the groups they are in.
  remove(self, sprite)
remove(sprite) remove sprite from group (inherited from Group)
  remove_internal(self, sprite)
(inherited from Group)
  sprites(self)
sprites() -> iterator return an object to loop over each sprite (inherited from Group)
  update(self, *args)
update(...) call update for all member sprites (inherited from Group)

Method Details

__init__(self, event=())
(Constructor)

Initialize the Group.
Parameters:
event - Event to add to the Group initially, or a sequence of events to add.

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

add(self, event)

Add the event to the container.
Parameters:
event - Event to add, or a sequence of events to add.

check(self)

Go through the pygame event queue and callback to events that should be triggered.

Also checks the special TIMEOUT_Events queue, but only if any TIMEOUT_Events have been added to the group.

Note: This empties the queue.

disable(self)

Do not allow callbacks to any sprites in this group to go through.

enable(self)

Allow callbacks to all events in this group to go through.

events(self)

return a list of all events in this group.

kill(self)

Call the kill method on every event in this group, to remove all of the events from all of the groups they are in.

Generated by Epydoc 1.1 on Sun Nov 30 19:33:11 2003 http://epydoc.sf.net