]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/splitter.h
fix wxDEFINE_EVENT_REFERENCE in wxEVENTS_COMPATIBILITY_2_8 case
[wxWidgets.git] / include / wx / generic / splitter.h
index 498471fa9940fb4b69cb580836d0bf2f3bf2fa3d..a86febee95d063acaa772119e3f5d8b2574263c9 100644 (file)
@@ -322,6 +322,8 @@ public:
         SetEventObject(splitter);
         if (splitter) m_id = splitter->GetId();
     }
+    wxSplitterEvent(const wxSplitterEvent& event)
+        : wxNotifyEvent(event), m_data(event.m_data) { }
 
     // SASH_POS_CHANGED methods
 
@@ -366,6 +368,8 @@ public:
         return m_data.pt.y;
     }
 
+    virtual wxEvent *Clone() const { return new wxSplitterEvent(*this); }
+
 private:
     friend class WXDLLIMPEXP_FWD_CORE wxSplitterWindow;
 
@@ -380,13 +384,13 @@ private:
         } pt;               // position of double click for DCLICK event
     } m_data;
 
-    DECLARE_DYNAMIC_CLASS_NO_COPY(wxSplitterEvent)
+    DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSplitterEvent)
 };
 
 typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&);
 
 #define wxSplitterEventHandler(func) \
-    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSplitterEventFunction, &func)
+    wxEVENT_HANDLER_CAST(wxSplitterEventFunction, func)
 
 #define wx__DECLARE_SPLITTEREVT(evt, id, fn) \
     wx__DECLARE_EVT1(wxEVT_COMMAND_SPLITTER_ ## evt, id, wxSplitterEventHandler(fn))