Package wx :: Class EvtHandler
[frames | no frames]

Type EvtHandler

object --+    
         |    
    Object --+
             |
            EvtHandler

Known Subclasses:
DocManager, DocService, Document, GridColMover, GridRowMover, Menu, Process, PyApp, TaskBarIcon, Timer, Validator, View, Window

Proxy of C++ EvtHandler class


Method Summary
EvtHandler __init__(self)
  __repr__(self)
  AddPendingEvent(self, event)
  Bind(self, event, handler, source, id, id2)
Bind an event to an event handler.
  Connect(self, id, lastId, eventType, func)
bool Disconnect(self, id, lastId, eventType)
bool GetEvtHandlerEnabled(self)
EvtHandler GetNextHandler(self)
EvtHandler GetPreviousHandler(self)
bool ProcessEvent(self, event)
  ProcessPendingEvents(self)
  SetEvtHandlerEnabled(self, enabled)
  SetNextHandler(self, handler)
  SetPreviousHandler(self, handler)
  Unbind(self, event, source, id, id2)
Disconencts the event handler binding for event from self.
    Inherited from Object
  Destroy(self)
Deletes the C++ object this Python object is a proxy for.
String GetClassName(self)
Returns the class name of the C++ class using wxRTTI.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Method Details

Bind(self, event, handler, source=None, id=-1, id2=-1)

Bind an event to an event handler.

Parameters:
event - One of the EVT_* objects that specifies the type of event to bind,

handler - A callable object to be invoked when the event is delivered to self. Pass None to disconnect an event handler.

source - Sometimes the event originates from a different window than self, but you still want to catch it in self. (For example, a button event delivered to a frame.) By passing the source of the event, the event handling system is able to differentiate between the same event type from different controls.

id - Used to spcify the event source by ID instead of instance.

id2 - Used when it is desirable to bind a handler to a range of IDs, such as with EVT_MENU_RANGE.

Unbind(self, event, source=None, id=-1, id2=-1)

Disconencts the event handler binding for event from self. Returns True if successful.


Generated by Epydoc 2.1.20050511.rpd on Sat Jun 16 17:01:58 2007 http://epydoc.sf.net