Improved/typesafe event handling patch.
|Reported by:||brianvanderburg||Owned by:|
|Keywords:||improved event handling||Cc:||Peter_Most@…|
This patch provides the changes to wxWidgets to support the improved event handling. Old event macros still work just fine but no type checking is done on them. The new event handling makes it possible to connect an event not only to a member function or a wxEvtHandler derived class, but also to a global function or even a functor object. This class also provides a wxConnect template function for dynamic connections. wxConnect/wxEvtHandler::Connect return a wxEventConnection object that can be used to disconnect the event or check if it is still connected.
This patch also changes the minimal sample to show it in operation.