Package wx :: Package lib :: Module evtmgr :: Class EventManager
[frames | no frames]

Class EventManager


This is the main class in the module, and is the only class that the application programmer needs to use. There is a pre-created instance of this class called 'eventManager'. It should not be necessary to create other instances.


Method Summary
  __init__(self)
  Bind(self, listener, event, source, win, id)
Registers a listener function (or any callable object) to receive events of type event coming from the source window.
  DeregisterDeadTopics(self)
Deregister any entries relating to dead wxPython objects.
  DeregisterListener(self, listener)
Deregister all event notifications for the given listener.
  DeregisterWindow(self, win)
Deregister all events coming from the given window.
  GetDeadTopics(self)
Return a list of topics relating to dead wxPython objects.
  GetStats(self)
Return a dictionary with data about my state.
  Register(self, listener, event, source, win, id)
Registers a listener function (or any callable object) to receive events of type event coming from the source window.
  Subscribe(self, listener, event, source, win, id)
Registers a listener function (or any callable object) to receive events of type event coming from the source window.

Method Details

Bind(self, listener, event, source=None, win=None, id=None)

Registers a listener function (or any callable object) to receive events of type event coming from the source window. For example:

eventManager.Register(self.OnButton, EVT_BUTTON, theButton)

Alternatively, the specific window where the event is delivered, and/or the ID of the event source can be specified. For example:

eventManager.Register(self.OnButton, EVT_BUTTON, win=self, id=ID_BUTTON)

or:

eventManager.Register(self.OnButton, EVT_BUTTON, theButton, self)

DeregisterDeadTopics(self)

Deregister any entries relating to dead wxPython objects. Not sure if this is an important issue; 1) My app code always de-registers listeners it doesn't need. 2) I don't think that lingering references to these dead objects is a problem.

DeregisterListener(self, listener)

Deregister all event notifications for the given listener.

DeregisterWindow(self, win)

Deregister all events coming from the given window.

GetDeadTopics(self)

Return a list of topics relating to dead wxPython objects.

GetStats(self)

Return a dictionary with data about my state.

Register(self, listener, event, source=None, win=None, id=None)

Registers a listener function (or any callable object) to receive events of type event coming from the source window. For example:

eventManager.Register(self.OnButton, EVT_BUTTON, theButton)

Alternatively, the specific window where the event is delivered, and/or the ID of the event source can be specified. For example:

eventManager.Register(self.OnButton, EVT_BUTTON, win=self, id=ID_BUTTON)

or:

eventManager.Register(self.OnButton, EVT_BUTTON, theButton, self)

Subscribe(self, listener, event, source=None, win=None, id=None)

Registers a listener function (or any callable object) to receive events of type event coming from the source window. For example:

eventManager.Register(self.OnButton, EVT_BUTTON, theButton)

Alternatively, the specific window where the event is delivered, and/or the ID of the event source can be specified. For example:

eventManager.Register(self.OnButton, EVT_BUTTON, win=self, id=ID_BUTTON)

or:

eventManager.Register(self.OnButton, EVT_BUTTON, theButton, self)

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:11:21 2007 http://epydoc.sf.net