]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/listbook.h
fixed library order (important for static linking under Unix
[wxWidgets.git] / include / wx / listbook.h
index 1b292be68657af993fd4d70ec3092ec6999657eb..9414943190298dc7520727a00127f5ba16641992 100644 (file)
@@ -147,23 +147,14 @@ extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING;
 
 typedef void (wxEvtHandler::*wxListbookEventFunction)(wxListbookEvent&);
 
-#define EVT_LISTBOOK_PAGE_CHANGED(id, fn)                                   \
-  DECLARE_EVENT_TABLE_ENTRY(                                                \
-    wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED,                                    \
-    id,                                                                     \
-    wxID_ANY,                                                               \
-    (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxListbookEventFunction, &fn ),  \
-    NULL                                                                    \
-  ),
-
-#define EVT_LISTBOOK_PAGE_CHANGING(id, fn)                                  \
-  DECLARE_EVENT_TABLE_ENTRY(                                                \
-    wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING,                                   \
-    id,                                                                     \
-    wxID_ANY,                                                               \
-    (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxListbookEventFunction, &fn ),  \
-    NULL                                                                    \
-  ),
+#define wxListbookEventHandler(func) \
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxListbookEventFunction, &func)
+
+#define EVT_LISTBOOK_PAGE_CHANGED(winid, fn) \
+    wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, winid, wxListbookEventHandler(fn))
+
+#define EVT_LISTBOOK_PAGE_CHANGING(winid, fn) \
+    wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, winid, wxListbookEventHandler(fn))
 
 #endif // wxUSE_LISTBOOK