]> git.saurik.com Git - wxWidgets.git/commitdiff
Added event handler macro
authorJulian Smart <julian@anthemion.co.uk>
Tue, 22 Jan 2008 08:23:31 +0000 (08:23 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 22 Jan 2008 08:23:31 +0000 (08:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/richtext/richtextctrl.h

index 416a53413e09505dd5061e40df6874ba6a9848ca..d6b23f03d5492f87ce8a477d19ec79db033d80e0 100644 (file)
@@ -900,6 +900,9 @@ END_DECLARE_EVENT_TYPES()
 
 typedef void (wxEvtHandler::*wxRichTextEventFunction)(wxRichTextEvent&);
 
+#define wxRichTextEventHandler(func) \
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxRichTextEventFunction, &func)
+
 #define EVT_RICHTEXT_LEFT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxRichTextEventFunction, & fn ), NULL ),
 #define EVT_RICHTEXT_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxRichTextEventFunction, & fn ), NULL ),
 #define EVT_RICHTEXT_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxRichTextEventFunction, & fn ), NULL ),