]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/event.h
fix typos and update MSW code to use new wxPENSTYLE_* enum values
[wxWidgets.git] / include / wx / event.h
index 4a456f1dbbd24a0b616e699c2d5bb35aaccc51ba..109c842ffb2a5e80e377e10d71e572bfff1dcc9e 100644 (file)
@@ -2258,7 +2258,10 @@ protected:
 // 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();
@@ -2358,7 +2361,9 @@ public:
 
     // 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[];
@@ -2425,13 +2430,16 @@ protected:
     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
@@ -2480,6 +2488,7 @@ private:
 
     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
@@ -2491,9 +2500,12 @@ inline void wxPostEvent(wxEvtHandler *dest, const wxEvent& event)
 }
 
 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
 
@@ -2541,7 +2553,6 @@ typedef void (wxEvtHandler::*wxInitDialogEventFunction)(wxInitDialogEvent&);
 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&);
@@ -2601,8 +2612,6 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
     (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) \