-#define EVT_SPLITTER_SASH_POS_CHANGED(id, fn) \
- DECLARE_EVENT_TABLE_ENTRY( \
- wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, \
- id, \
- -1, \
- (wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
- NULL \
- ),
-
-#define EVT_SPLITTER_SASH_POS_CHANGING(id, fn) \
- DECLARE_EVENT_TABLE_ENTRY( \
- wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, \
- id, \
- -1, \
- (wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
- NULL \
- ),
-
-#define EVT_SPLITTER_DCLICK(id, fn) \
- DECLARE_EVENT_TABLE_ENTRY( \
- wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, \
- id, \
- -1, \
- (wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
- NULL \
- ),
-
-#define EVT_SPLITTER_UNSPLIT(id, fn) \
- DECLARE_EVENT_TABLE_ENTRY( \
- wxEVT_COMMAND_SPLITTER_UNSPLIT, \
- id, \
- -1, \
- (wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
- NULL \
- ),
-
-#endif // __SPLITTERH_G__
+#define wxSplitterEventHandler(func) \
+ wxEVENT_HANDLER_CAST(wxSplitterEventFunction, func)
+
+#define wx__DECLARE_SPLITTEREVT(evt, id, fn) \
+ wx__DECLARE_EVT1(wxEVT_SPLITTER_ ## evt, id, wxSplitterEventHandler(fn))
+
+#define EVT_SPLITTER_SASH_POS_CHANGED(id, fn) \
+ wx__DECLARE_SPLITTEREVT(SASH_POS_CHANGED, id, fn)
+
+#define EVT_SPLITTER_SASH_POS_CHANGING(id, fn) \
+ wx__DECLARE_SPLITTEREVT(SASH_POS_CHANGING, id, fn)
+
+#define EVT_SPLITTER_DCLICK(id, fn) \
+ wx__DECLARE_SPLITTEREVT(DOUBLECLICKED, id, fn)
+
+#define EVT_SPLITTER_UNSPLIT(id, fn) \
+ wx__DECLARE_SPLITTEREVT(UNSPLIT, id, fn)
+
+
+// old wxEVT_COMMAND_* constants
+#define wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED wxEVT_SPLITTER_SASH_POS_CHANGED
+#define wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING wxEVT_SPLITTER_SASH_POS_CHANGING
+#define wxEVT_COMMAND_SPLITTER_DOUBLECLICKED wxEVT_SPLITTER_DOUBLECLICKED
+#define wxEVT_COMMAND_SPLITTER_UNSPLIT wxEVT_SPLITTER_UNSPLIT
+
+#endif // _WX_GENERIC_SPLITTER_H_