#include "wx/meta/removeref.h"
+#ifdef wxHAS_REMOVEREF
+ // CallAfter() implementation requires wxRemoveRef(), so just disable it
+ // for compilers too broken to not allow defining it.
+ #define wxHAS_CALL_AFTER
+#endif
+
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
// done asynchronously, i.e. at some later time, instead of immediately when
// the event object is constructed.
+#ifdef wxHAS_CALL_AFTER
+
// This is a base class used to process all method calls.
class wxAsyncMethodCallEvent : public wxEvent
{
const ParamType2 m_param2;
};
+#endif // wxHAS_CALL_AFTER
+
+
#if wxUSE_GUI
// NOTE: uses AddPendingEvent(); call only from secondary threads
#endif
+#ifdef wxHAS_CALL_AFTER
// Asynchronous method calls: these methods schedule the given method
// pointer for a later call (during the next idle event loop iteration).
//
}
// Notice that we use P1 and not T1 for the parameter to allow passing
- // parameters that are only convertible to the type taken by the method
+ // parameters that are convertible to the type taken by the method
// instead of being exactly the same, to be closer to the usual method call
// semantics.
template <typename T, typename T1, typename P1>
static_cast<T*>(this), method, x1, x2)
);
}
+#endif // wxHAS_CALL_AFTER
// Connecting and disconnecting