.\" This is a wxWidgets manpage page generated from the XML docs .TH wxEvtHandler 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxEvtHandler \- .SH DESCRIPTION A class that can handle events from the windowing system. wxWindow (and therefore all window classes) are derived from this class. When events are received, wxEvtHandler invokes the method listed in the event table using itself as the object. When using multiple inheritance it is imperative that the wxEvtHandler(-derived) class be the first class inherited such that the "this" pointer for the overall object will be identical to the "this" pointer for the wxEvtHandler portion. .SH "PARENTS" wxObject .SH "INCLUDE FILES" wx/event.h .SH MEMBERS .SS wxEvtHandler () Constructor. .SS ~wxEvtHandler () Destructor. If the handler is part of a chain, the destructor will unlink itself and restore the previous and next handlers so that they point to each other. .SS void AddPendingEvent (wxEvent& event) This function posts an event to be processed later. .SS void Connect (int idint lastIdwxEventType eventTypewxObjectEventFunction functionwxObject* userData = NULLwxEvtHandler* eventSink = NULL) .SS void Connect (int idwxEventType eventTypewxObjectEventFunction functionwxObject* userData = NULLwxEvtHandler* eventSink = NULL) .SS void Connect (wxEventType eventTypewxObjectEventFunction functionwxObject* userData = NULLwxEvtHandler* eventSink = NULL) Connects the given function dynamically with the event handler, id and event type. This is an alternative to the use of static event tables. See the 'event' or the old 'dynamic' sample for usage. .SS bool Disconnect (wxEventType eventType = wxEVT_NULLwxObjectEventFunction function = NULLwxObject* userData = NULLwxEvtHandler* eventSink = NULL) .SS bool Disconnect (int id = \texttt{wxID_ANY}wxEventType eventType = wxEVT_NULLwxObjectEventFunction function = NULLwxObject* userData = NULLwxEvtHandler* eventSink = NULL) .SS bool Disconnect (int idint lastId = \texttt{wxID_ANY}wxEventType eventType = wxEVT_NULLwxObjectEventFunction function = NULLwxObject* userData = NULLwxEvtHandler* eventSink = NULL) Disconnects the given function dynamically from the event handler, using the specified parameters as search criteria and returning true if a matching function has been found and removed. This method can only disconnect functions which have been added using the wxEvtHandler::Connect method. There is no way to disconnect functions connected using the (static) event tables. .SS void* GetClientData () Gets user-supplied client data. .SS wxClientData* GetClientObject () Get a pointer to the user-supplied client data object. .SS bool GetEvtHandlerEnabled () Returns true if the event handler is enabled, false otherwise. .SS wxEvtHandler* GetNextHandler () Gets the pointer to the next handler in the chain. .SS wxEvtHandler* GetPreviousHandler () Gets the pointer to the previous handler in the chain. .SS virtual bool ProcessEvent (wxEvent& event) Processes an event, searching event tables and calling zero or more suitable event handler function(s). .SS virtual bool SearchEventTable (wxEventTable& tablewxEvent& event) Searches the event table, executing an event handler function if an appropriate one is found. .SS void SetClientData (void* data) Sets user-supplied client data. .SS void SetClientObject (wxClientData* data) Set the client data object. Any previous object will be deleted. .SS void SetEvtHandlerEnabled (bool enabled) Enables or disables the event handler. .SS void SetNextHandler (wxEvtHandler* handler) Sets the pointer to the next handler. .SS void SetPreviousHandler (wxEvtHandler* handler) Sets the pointer to the previous handler. .SH "SEE ALSO" wxObject Event handling overview .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.