+ /**
+ Asynchronously call the given functor.
+
+ Calling this function on an object schedules an asynchronous call to
+ the functor specified as CallAfter() argument at a (slightly) later
+ time. This is useful when processing some events as certain actions
+ typically can't be performed inside their handlers, e.g. you shouldn't
+ show a modal dialog from a mouse click event handler as this would
+ break the mouse capture state -- but you can call a function showing
+ this message dialog after the current event handler completes.
+
+ Notice that it is safe to use CallAfter() from other, non-GUI,
+ threads, but that the method will be always called in the main, GUI,
+ thread context.
+
+ This overload is particularly useful in combination with C++11 lambdas:
+ @code
+ wxGetApp().CallAfter([]{
+ wxBell();
+ });
+ @endcode
+
+ @param functor The functor to call.
+
+ @note This method is not available with Visual C++ before version 8
+ (Visual Studio 2005) as earlier versions of the compiler don't
+ have the required support for C++ templates to implement it.
+
+ @since 2.9.6
+ */
+ template<typename T>
+ void CallAfter(const T& functor);
+