extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED;
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TOOL_ENTER;
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_SPINCTRL_UPDATED;
+extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED;
// Sockets and timers send events, too
extern WXDLLIMPEXP_BASE const wxEventType wxEVT_SOCKET;
// wxEvtHandler: the base class for all objects handling wxWidgets events
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_BASE wxEvtHandler : public wxObject, public wxTrackable
+class WXDLLIMPEXP_BASE wxEvtHandler : public wxObject
+#if wxUSE_WEAKREF
+ , public wxTrackable
+#endif
{
public:
wxEvtHandler();
// Avoid problems at exit by cleaning up static hash table gracefully
void ClearEventHashTable() { GetEventHashTable().Clear(); }
+#if wxUSE_WEAKREF
void OnSinkDestroyed( wxEvtHandler *sink );
+#endif
private:
static const wxEventTableEntry sm_eventTableEntries[];
virtual void DoSetClientData( void *data );
virtual void *DoGetClientData() const;
+#if wxUSE_WEAKREF
// Search tracker objects for event connection with this sink
wxEventConnectionRef *FindRefInTrackerList(wxEvtHandler *eventSink);
+#endif
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxEvtHandler)
};
+#if wxUSE_WEAKREF
// ----------------------------------------------------------------------------
// wxEventConnectionRef represents all connections between two event handlers
// and enables automatic disconnect when an event handler sink goes out of
DECLARE_NO_ASSIGN_CLASS(wxEventConnectionRef)
};
+#endif // wxUSE_WEAKREF
// Post a message to the given eventhandler which will be processed during the
// next event loop iteration
}
typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&);
+typedef void (wxEvtHandler::*wxIdleEventFunction)(wxIdleEvent&);
#define wxEventHandler(func) \
(wxObjectEventFunction)wxStaticCastEvent(wxEventFunction, &func)
+#define wxIdleEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxIdleEventFunction, &func)
#if wxUSE_GUI
typedef void (wxEvtHandler::*wxSysColourChangedEventFunction)(wxSysColourChangedEvent&);
typedef void (wxEvtHandler::*wxDisplayChangedEventFunction)(wxDisplayChangedEvent&);
typedef void (wxEvtHandler::*wxUpdateUIEventFunction)(wxUpdateUIEvent&);
-typedef void (wxEvtHandler::*wxIdleEventFunction)(wxIdleEvent&);
typedef void (wxEvtHandler::*wxCloseEventFunction)(wxCloseEvent&);
typedef void (wxEvtHandler::*wxShowEventFunction)(wxShowEvent&);
typedef void (wxEvtHandler::*wxIconizeEventFunction)(wxIconizeEvent&);
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDisplayChangedEventFunction, &func)
#define wxUpdateUIEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxUpdateUIEventFunction, &func)
-#define wxIdleEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxIdleEventFunction, &func)
#define wxCloseEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCloseEventFunction, &func)
#define wxShowEventHandler(func) \