Ticket #9999 (closed enhancement: duplicate)

Opened 2 years ago

Last modified 2 years ago

Improved/typesafe event handling patch.

Reported by: brianvanderburg Owned by:
Priority: normal Milestone:
Component: base Version:
Keywords: improved event handling Cc:
Blocked By: Patch: no
Blocking:

Description

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.

Change History

Changed 2 years ago by brianvanderburg

  • status changed from new to closed
  • resolution set to duplicate
Note: See TracTickets for help on using tickets.