Implement wx-prefixed macros versions of DECLARE_EVENT_TABLE, BEGIN_EVENT_TABLE* and END_EVENT_TABLE macros.
Implement compatibility aliases for non-prefixed macro names. Require a final semicolon where possible. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b19b28c8fc
commit
a0e9a5dfde
@ -79,25 +79,12 @@ typedef int wxEventType;
|
||||
// the wxEVENT_HANDLER_CAST-macro.
|
||||
#define wxStaticCastEvent(type, val) static_cast<type>(val)
|
||||
|
||||
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
|
||||
#define wxDECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
|
||||
wxEventTableEntry(type, winid, idLast, wxNewEventTableFunctor(type, fn), obj)
|
||||
|
||||
#define DECLARE_EVENT_TABLE_TERMINATOR() \
|
||||
#define wxDECLARE_EVENT_TABLE_TERMINATOR() \
|
||||
wxEventTableEntry(wxEVT_NULL, 0, 0, 0, 0)
|
||||
|
||||
// obsolete event declaration/definition macros, we don't need them any longer
|
||||
// but we keep them for compatibility as it doesn't cost us anything anyhow
|
||||
#define BEGIN_DECLARE_EVENT_TYPES()
|
||||
#define END_DECLARE_EVENT_TYPES()
|
||||
#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \
|
||||
extern expdecl const wxEventType name;
|
||||
#define DECLARE_EVENT_TYPE(name, value) \
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, name, value)
|
||||
#define DECLARE_LOCAL_EVENT_TYPE(name, value) \
|
||||
DECLARE_EXPORTED_EVENT_TYPE(wxEMPTY_PARAMETER_VALUE, name, value)
|
||||
#define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType();
|
||||
#define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name)
|
||||
|
||||
// generate a new unique event type
|
||||
extern WXDLLIMPEXP_BASE wxEventType wxNewEventType();
|
||||
|
||||
@ -277,7 +264,7 @@ wxNewEventFunctor(const wxEventType& WXUNUSED(evtType),
|
||||
return new wxObjectEventFunctor(method, handler);
|
||||
}
|
||||
|
||||
// This version is used by DECLARE_EVENT_TABLE_ENTRY()
|
||||
// This version is used by wxDECLARE_EVENT_TABLE_ENTRY()
|
||||
inline wxObjectEventFunctor *
|
||||
wxNewEventTableFunctor(const wxEventType& WXUNUSED(evtType),
|
||||
wxObjectEventFunction method)
|
||||
@ -611,7 +598,7 @@ wxMakeEventFunctor(const EventTag&,
|
||||
method, handler);
|
||||
}
|
||||
|
||||
// Create an event functor for the event table via DECLARE_EVENT_TABLE_ENTRY:
|
||||
// Create an event functor for the event table via wxDECLARE_EVENT_TABLE_ENTRY:
|
||||
// in this case we don't have the handler (as it's always the same as the
|
||||
// object which generated the event) so we must use Class as its type
|
||||
template <typename EventTag, typename Class, typename EventArg>
|
||||
@ -3568,20 +3555,20 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
// N.B. In GNU-WIN32, you *have* to take the address of a member function
|
||||
// (use &) or the compiler crashes...
|
||||
|
||||
#define DECLARE_EVENT_TABLE() \
|
||||
private: \
|
||||
static const wxEventTableEntry sm_eventTableEntries[]; \
|
||||
protected: \
|
||||
static const wxEventTable sm_eventTable; \
|
||||
virtual const wxEventTable* GetEventTable() const; \
|
||||
static wxEventHashTable sm_eventHashTable; \
|
||||
virtual wxEventHashTable& GetEventHashTable() const;
|
||||
#define wxDECLARE_EVENT_TABLE() \
|
||||
private: \
|
||||
static const wxEventTableEntry sm_eventTableEntries[]; \
|
||||
protected: \
|
||||
static const wxEventTable sm_eventTable; \
|
||||
virtual const wxEventTable* GetEventTable() const; \
|
||||
static wxEventHashTable sm_eventHashTable; \
|
||||
virtual wxEventHashTable& GetEventHashTable() const
|
||||
|
||||
// N.B.: when building DLL with Borland C++ 5.5 compiler, you must initialize
|
||||
// sm_eventTable before using it in GetEventTable() or the compiler gives
|
||||
// E2233 (see http://groups.google.com/groups?selm=397dcc8a%241_2%40dnews)
|
||||
|
||||
#define BEGIN_EVENT_TABLE(theClass, baseClass) \
|
||||
#define wxBEGIN_EVENT_TABLE(theClass, baseClass) \
|
||||
const wxEventTable theClass::sm_eventTable = \
|
||||
{ &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
|
||||
const wxEventTable *theClass::GetEventTable() const \
|
||||
@ -3591,7 +3578,7 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
{ return theClass::sm_eventHashTable; } \
|
||||
const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
|
||||
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE1(theClass, baseClass, T1) \
|
||||
#define wxBEGIN_EVENT_TABLE_TEMPLATE1(theClass, baseClass, T1) \
|
||||
template<typename T1> \
|
||||
const wxEventTable theClass<T1>::sm_eventTable = \
|
||||
{ &baseClass::sm_eventTable, &theClass<T1>::sm_eventTableEntries[0] }; \
|
||||
@ -3606,7 +3593,7 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
template<typename T1> \
|
||||
const wxEventTableEntry theClass<T1>::sm_eventTableEntries[] = { \
|
||||
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE2(theClass, baseClass, T1, T2) \
|
||||
#define wxBEGIN_EVENT_TABLE_TEMPLATE2(theClass, baseClass, T1, T2) \
|
||||
template<typename T1, typename T2> \
|
||||
const wxEventTable theClass<T1, T2>::sm_eventTable = \
|
||||
{ &baseClass::sm_eventTable, &theClass<T1, T2>::sm_eventTableEntries[0] }; \
|
||||
@ -3621,7 +3608,7 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
template<typename T1, typename T2> \
|
||||
const wxEventTableEntry theClass<T1, T2>::sm_eventTableEntries[] = { \
|
||||
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE3(theClass, baseClass, T1, T2, T3) \
|
||||
#define wxBEGIN_EVENT_TABLE_TEMPLATE3(theClass, baseClass, T1, T2, T3) \
|
||||
template<typename T1, typename T2, typename T3> \
|
||||
const wxEventTable theClass<T1, T2, T3>::sm_eventTable = \
|
||||
{ &baseClass::sm_eventTable, &theClass<T1, T2, T3>::sm_eventTableEntries[0] }; \
|
||||
@ -3636,7 +3623,7 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
template<typename T1, typename T2, typename T3> \
|
||||
const wxEventTableEntry theClass<T1, T2, T3>::sm_eventTableEntries[] = { \
|
||||
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE4(theClass, baseClass, T1, T2, T3, T4) \
|
||||
#define wxBEGIN_EVENT_TABLE_TEMPLATE4(theClass, baseClass, T1, T2, T3, T4) \
|
||||
template<typename T1, typename T2, typename T3, typename T4> \
|
||||
const wxEventTable theClass<T1, T2, T3, T4>::sm_eventTable = \
|
||||
{ &baseClass::sm_eventTable, &theClass<T1, T2, T3, T4>::sm_eventTableEntries[0] }; \
|
||||
@ -3651,7 +3638,7 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
template<typename T1, typename T2, typename T3, typename T4> \
|
||||
const wxEventTableEntry theClass<T1, T2, T3, T4>::sm_eventTableEntries[] = { \
|
||||
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE5(theClass, baseClass, T1, T2, T3, T4, T5) \
|
||||
#define wxBEGIN_EVENT_TABLE_TEMPLATE5(theClass, baseClass, T1, T2, T3, T4, T5) \
|
||||
template<typename T1, typename T2, typename T3, typename T4, typename T5> \
|
||||
const wxEventTable theClass<T1, T2, T3, T4, T5>::sm_eventTable = \
|
||||
{ &baseClass::sm_eventTable, &theClass<T1, T2, T3, T4, T5>::sm_eventTableEntries[0] }; \
|
||||
@ -3666,7 +3653,7 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
template<typename T1, typename T2, typename T3, typename T4, typename T5> \
|
||||
const wxEventTableEntry theClass<T1, T2, T3, T4, T5>::sm_eventTableEntries[] = { \
|
||||
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE7(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7) \
|
||||
#define wxBEGIN_EVENT_TABLE_TEMPLATE7(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7) \
|
||||
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> \
|
||||
const wxEventTable theClass<T1, T2, T3, T4, T5, T6, T7>::sm_eventTable = \
|
||||
{ &baseClass::sm_eventTable, &theClass<T1, T2, T3, T4, T5, T6, T7>::sm_eventTableEntries[0] }; \
|
||||
@ -3681,7 +3668,7 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> \
|
||||
const wxEventTableEntry theClass<T1, T2, T3, T4, T5, T6, T7>::sm_eventTableEntries[] = { \
|
||||
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE8(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7, T8) \
|
||||
#define wxBEGIN_EVENT_TABLE_TEMPLATE8(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7, T8) \
|
||||
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> \
|
||||
const wxEventTable theClass<T1, T2, T3, T4, T5, T6, T7, T8>::sm_eventTable = \
|
||||
{ &baseClass::sm_eventTable, &theClass<T1, T2, T3, T4, T5, T6, T7, T8>::sm_eventTableEntries[0] }; \
|
||||
@ -3696,7 +3683,8 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> \
|
||||
const wxEventTableEntry theClass<T1, T2, T3, T4, T5, T6, T7, T8>::sm_eventTableEntries[] = { \
|
||||
|
||||
#define END_EVENT_TABLE() DECLARE_EVENT_TABLE_TERMINATOR() };
|
||||
#define wxEND_EVENT_TABLE() \
|
||||
wxDECLARE_EVENT_TABLE_TERMINATOR() };
|
||||
|
||||
/*
|
||||
* Event table macros
|
||||
@ -3710,7 +3698,7 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
// - id1, id2 ids of the first/last id
|
||||
// - fn the function (should be cast to the right type)
|
||||
#define wx__DECLARE_EVT2(evt, id1, id2, fn) \
|
||||
DECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
|
||||
wxDECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
|
||||
#define wx__DECLARE_EVT1(evt, id, fn) \
|
||||
wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
|
||||
#define wx__DECLARE_EVT0(evt, fn) \
|
||||
@ -4022,4 +4010,39 @@ WXDLLIMPEXP_CORE wxWindow* wxFindFocusDescendant(wxWindow* ancestor);
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Compatibility macro aliases
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// deprecated variants _not_ requiring a semicolon after them and without wx prefix
|
||||
// (note that also some wx-prefixed macro do _not_ require a semicolon because
|
||||
// it's not always possible to force the compire to require it)
|
||||
|
||||
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
|
||||
wxDECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj)
|
||||
#define DECLARE_EVENT_TABLE_TERMINATOR() wxDECLARE_EVENT_TABLE_TERMINATOR()
|
||||
#define DECLARE_EVENT_TABLE() wxDECLARE_EVENT_TABLE();
|
||||
#define BEGIN_EVENT_TABLE(a,b) wxBEGIN_EVENT_TABLE(a,b)
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE1(a,b,c) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c)
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE2(a,b,c,d) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c,d)
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE3(a,b,c,d,e) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c,d,e)
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE4(a,b,c,d,e,f) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c,d,e,f)
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE5(a,b,c,d,e,f,g) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c,d,e,f,g)
|
||||
#define BEGIN_EVENT_TABLE_TEMPLATE6(a,b,c,d,e,f,g,h) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c,d,e,f,g,h)
|
||||
#define END_EVENT_TABLE() wxEND_EVENT_TABLE()
|
||||
|
||||
// other obsolete event declaration/definition macros; we don't need them any longer
|
||||
// but we keep them for compatibility as it doesn't cost us anything anyhow
|
||||
#define BEGIN_DECLARE_EVENT_TYPES()
|
||||
#define END_DECLARE_EVENT_TYPES()
|
||||
#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \
|
||||
extern expdecl const wxEventType name;
|
||||
#define DECLARE_EVENT_TYPE(name, value) \
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, name, value)
|
||||
#define DECLARE_LOCAL_EVENT_TYPE(name, value) \
|
||||
DECLARE_EXPORTED_EVENT_TYPE(wxEMPTY_PARAMETER_VALUE, name, value)
|
||||
#define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType();
|
||||
#define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name)
|
||||
|
||||
#endif // _WX_EVENT_H_
|
||||
|
@ -2619,9 +2619,9 @@ extern const int wxEVT_GRID_CREATE_CELL;
|
||||
extern const int wxEVT_GRID_CHANGE_LABELS;
|
||||
extern const int wxEVT_GRID_CHANGE_SEL_LABEL;
|
||||
|
||||
#define EVT_GRID_CREATE_CELL(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CREATE_CELL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ),
|
||||
#define EVT_GRID_CHANGE_LABELS(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_LABELS, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ),
|
||||
#define EVT_GRID_CHANGE_SEL_LABEL(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_SEL_LABEL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ),
|
||||
#define EVT_GRID_CREATE_CELL(fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CREATE_CELL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ),
|
||||
#define EVT_GRID_CHANGE_LABELS(fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_LABELS, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ),
|
||||
#define EVT_GRID_CHANGE_SEL_LABEL(fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_SEL_LABEL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ),
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -107,7 +107,7 @@ typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEv
|
||||
wxEVENT_HANDLER_CAST( wxQueryLayoutInfoEventFunction, func )
|
||||
|
||||
#define EVT_QUERY_LAYOUT_INFO(func) \
|
||||
DECLARE_EVENT_TABLE_ENTRY( wxEVT_QUERY_LAYOUT_INFO, wxID_ANY, wxID_ANY, wxQueryLayoutInfoEventHandler( func ), NULL ),
|
||||
wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_QUERY_LAYOUT_INFO, wxID_ANY, wxID_ANY, wxQueryLayoutInfoEventHandler( func ), NULL ),
|
||||
|
||||
/*
|
||||
* This event is used to take a bite out of the available client area.
|
||||
@ -146,7 +146,7 @@ typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEv
|
||||
#define wxCalculateLayoutEventHandler( func ) wxEVENT_HANDLER_CAST(wxCalculateLayoutEventFunction, func)
|
||||
|
||||
#define EVT_CALCULATE_LAYOUT(func) \
|
||||
DECLARE_EVENT_TABLE_ENTRY( wxEVT_CALCULATE_LAYOUT, wxID_ANY, wxID_ANY, wxCalculateLayoutEventHandler( func ), NULL ),
|
||||
wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_CALCULATE_LAYOUT, wxID_ANY, wxID_ANY, wxCalculateLayoutEventHandler( func ), NULL ),
|
||||
|
||||
#if wxUSE_SASH
|
||||
|
||||
|
@ -216,21 +216,21 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_WEBKIT_BEFORE_LOAD, wxWebKitBe
|
||||
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_WEBKIT_NEW_WINDOW, wxWebKitNewWindowEvent );
|
||||
|
||||
#define EVT_WEBKIT_STATE_CHANGED(func) \
|
||||
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_STATE_CHANGED, \
|
||||
wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_STATE_CHANGED, \
|
||||
wxID_ANY, \
|
||||
wxID_ANY, \
|
||||
wxWebKitStateChangedEventHandler( func ), \
|
||||
NULL ),
|
||||
|
||||
#define EVT_WEBKIT_BEFORE_LOAD(func) \
|
||||
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_BEFORE_LOAD, \
|
||||
wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_BEFORE_LOAD, \
|
||||
wxID_ANY, \
|
||||
wxID_ANY, \
|
||||
wxWebKitBeforeLoadEventHandler( func ), \
|
||||
NULL ),
|
||||
|
||||
#define EVT_WEBKIT_NEW_WINDOW(func) \
|
||||
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_NEW_WINDOW, \
|
||||
wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_NEW_WINDOW, \
|
||||
wxID_ANY, \
|
||||
wxID_ANY, \
|
||||
wxWebKitNewWindowEventFunction( func ), \
|
||||
|
@ -337,18 +337,18 @@ typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&);
|
||||
wxEVENT_HANDLER_CAST(wxMediaEventFunction, func)
|
||||
|
||||
//Macro for usage with message maps
|
||||
#define EVT_MEDIA_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
#define EVT_MEDIA_STOP(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STOP, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
#define EVT_MEDIA_FINISHED(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
#define EVT_MEDIA_STOP(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STOP, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
|
||||
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_LOADED, wxMediaEvent );
|
||||
#define EVT_MEDIA_LOADED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_LOADED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
#define EVT_MEDIA_LOADED(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_LOADED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
|
||||
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_STATECHANGED, wxMediaEvent );
|
||||
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_PLAY, wxMediaEvent );
|
||||
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_PAUSE, wxMediaEvent );
|
||||
#define EVT_MEDIA_STATECHANGED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STATECHANGED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
#define EVT_MEDIA_PLAY(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PLAY, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
#define EVT_MEDIA_PAUSE(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PAUSE, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
#define EVT_MEDIA_STATECHANGED(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STATECHANGED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
#define EVT_MEDIA_PLAY(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PLAY, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
#define EVT_MEDIA_PAUSE(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PAUSE, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ),
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// common backend base class used by many other backends
|
||||
|
@ -255,7 +255,7 @@ typedef void (wxEvtHandler::*wxActiveXEventFunction)(wxActiveXEvent&);
|
||||
#define wxActiveXEventHandler(func) \
|
||||
wxEVENT_HANDLER_CAST( wxActiveXEventFunction, func )
|
||||
|
||||
#define EVT_ACTIVEX(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_ACTIVEX, id, -1, wxActiveXEventHandler( fn ), NULL ),
|
||||
#define EVT_ACTIVEX(id, fn) wxDECLARE_EVENT_TABLE_ENTRY(wxEVT_ACTIVEX, id, -1, wxActiveXEventHandler( fn ), NULL ),
|
||||
|
||||
#endif // wxUSE_ACTIVEX
|
||||
|
||||
|
@ -2258,20 +2258,20 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID,
|
||||
#ifndef SWIG
|
||||
typedef void (wxEvtHandler::*wxPropertyGridEventFunction)(wxPropertyGridEvent&);
|
||||
|
||||
#define EVT_PG_SELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_SELECTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_HIGHLIGHTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_HIGHLIGHTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_RIGHT_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_DOUBLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_DOUBLE_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_PAGE_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_PAGE_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_ITEM_COLLAPSED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_COLLAPSED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_ITEM_EXPANDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_EXPANDED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_LABEL_EDIT_BEGIN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_LABEL_EDIT_BEGIN, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_LABEL_EDIT_ENDING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_LABEL_EDIT_ENDING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_COL_BEGIN_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_BEGIN_DRAG, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_COL_DRAGGING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_DRAGGING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_COL_END_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_END_DRAG, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_SELECTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_SELECTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_CHANGING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_HIGHLIGHTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_HIGHLIGHTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_RIGHT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_RIGHT_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_DOUBLE_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_DOUBLE_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_PAGE_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_PAGE_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_ITEM_COLLAPSED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_COLLAPSED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_ITEM_EXPANDED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_EXPANDED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_LABEL_EDIT_BEGIN(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_LABEL_EDIT_BEGIN, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_LABEL_EDIT_ENDING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_LABEL_EDIT_ENDING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_COL_BEGIN_DRAG(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_BEGIN_DRAG, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_COL_DRAGGING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_DRAGGING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_COL_END_DRAG(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_END_DRAG, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
|
||||
#define wxPropertyGridEventHandler(fn) \
|
||||
wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn )
|
||||
|
@ -959,24 +959,24 @@ typedef void (wxEvtHandler::*wxRichTextEventFunction)(wxRichTextEvent&);
|
||||
#define wxRichTextEventHandler(func) \
|
||||
wxEVENT_HANDLER_CAST(wxRichTextEventFunction, func)
|
||||
|
||||
#define EVT_RICHTEXT_LEFT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_LEFT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_RETURN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_RETURN, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_CHARACTER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_CHARACTER, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_DELETE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_DELETE, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_LEFT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_RIGHT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_MIDDLE_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_LEFT_DCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_RETURN(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_RETURN, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_CHARACTER(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_CHARACTER, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_DELETE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_DELETE, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
|
||||
#define EVT_RICHTEXT_STYLESHEET_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_STYLESHEET_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_STYLESHEET_REPLACING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_STYLESHEET_REPLACED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_STYLESHEET_CHANGING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_STYLESHEET_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_STYLESHEET_REPLACING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_STYLESHEET_REPLACED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
|
||||
#define EVT_RICHTEXT_CONTENT_INSERTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_CONTENT_DELETED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_STYLE_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_SELECTION_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_BUFFER_RESET(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_BUFFER_RESET, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_CONTENT_INSERTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_CONTENT_DELETED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_STYLE_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_SELECTION_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
#define EVT_RICHTEXT_BUFFER_RESET(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_BUFFER_RESET, id, -1, wxRichTextEventHandler( fn ), NULL ),
|
||||
|
||||
#endif
|
||||
// wxUSE_RICHTEXT
|
||||
|
@ -4471,36 +4471,36 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
|
||||
#define wxStyledTextEventHandler( func ) \
|
||||
wxEVENT_HANDLER_CAST( wxStyledTextEventFunction, func )
|
||||
|
||||
#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_CALLTIP_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_AUTOCOMP_SELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_INDICATOR_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_INDICATOR_RELEASE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_RELEASE, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_AUTOCOMP_CANCELLED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_CANCELLED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_CHAR_DELETED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_CHANGE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_STYLENEEDED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_CHARADDED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_SAVEPOINTREACHED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_SAVEPOINTLEFT(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_ROMODIFYATTEMPT(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_KEY(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_DOUBLECLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_UPDATEUI(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_MODIFIED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_MACRORECORD(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_MARGINCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_NEEDSHOWN(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_PAINTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_USERLISTSELECTION(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_URIDROPPED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_DWELLSTART(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_DWELLEND(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_START_DRAG(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_DRAG_OVER(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_DO_DROP(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_ZOOM(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_HOTSPOT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_HOTSPOT_DCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_CALLTIP_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_AUTOCOMP_SELECTION(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_INDICATOR_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_INDICATOR_RELEASE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_RELEASE, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_AUTOCOMP_CANCELLED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_CANCELLED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
#define EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_CHAR_DELETED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -254,13 +254,13 @@ struct wxComboCtrlFeatures
|
||||
int m_value; // current item index
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(wxListViewComboPopup, wxListView)
|
||||
wxBEGIN_EVENT_TABLE(wxListViewComboPopup, wxListView)
|
||||
EVT_MOTION(wxListViewComboPopup::OnMouseMove)
|
||||
EVT_LEFT_UP(wxListViewComboPopup::OnMouseClick)
|
||||
END_EVENT_TABLE()
|
||||
wxEND_EVENT_TABLE()
|
||||
@endcode
|
||||
|
||||
Here's how you would create and populate it in a dialog constructor:
|
||||
|
@ -3854,13 +3854,6 @@ typedef int wxEventType;
|
||||
*/
|
||||
wxEventType wxEVT_NULL;
|
||||
|
||||
/**
|
||||
Initializes a new event type using wxNewEventType().
|
||||
|
||||
@deprecated Use wxDEFINE_EVENT() instead
|
||||
*/
|
||||
#define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType();
|
||||
|
||||
/**
|
||||
Generates a new unique event type.
|
||||
|
||||
@ -3957,9 +3950,9 @@ wxEventType wxNewEventType();
|
||||
|
||||
...
|
||||
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MY(wxID_ANY, MyFrame::OnMyEvent)
|
||||
END_EVENT_TABLE()
|
||||
wxEND_EVENT_TABLE()
|
||||
@endcode
|
||||
|
||||
@param evt
|
||||
@ -3989,38 +3982,39 @@ wxEventType wxNewEventType();
|
||||
#define wx__DECLARE_EVT0(evt, fn) \
|
||||
wx__DECLARE_EVT1(evt, wxID_ANY, fn)
|
||||
|
||||
|
||||
/**
|
||||
Use this macro inside a class declaration to declare a @e static event table
|
||||
for that class.
|
||||
|
||||
In the implementation file you'll need to use the BEGIN_EVENT_TABLE()
|
||||
and the END_EVENT_TABLE() macros, plus some additional @c EVT_xxx macro
|
||||
In the implementation file you'll need to use the wxBEGIN_EVENT_TABLE()
|
||||
and the wxEND_EVENT_TABLE() macros, plus some additional @c EVT_xxx macro
|
||||
to capture events.
|
||||
|
||||
Note that this macro requires a final semicolon.
|
||||
|
||||
@see @ref overview_events_eventtables
|
||||
*/
|
||||
#define DECLARE_EVENT_TABLE()
|
||||
#define wxDECLARE_EVENT_TABLE()
|
||||
|
||||
/**
|
||||
Use this macro in a source file to start listing @e static event handlers
|
||||
for a specific class.
|
||||
|
||||
Use END_EVENT_TABLE() to terminate the event-declaration block.
|
||||
Use wxEND_EVENT_TABLE() to terminate the event-declaration block.
|
||||
|
||||
@see @ref overview_events_eventtables
|
||||
*/
|
||||
#define BEGIN_EVENT_TABLE(theClass, baseClass)
|
||||
#define wxBEGIN_EVENT_TABLE(theClass, baseClass)
|
||||
|
||||
/**
|
||||
Use this macro in a source file to end listing @e static event handlers
|
||||
for a specific class.
|
||||
|
||||
Use BEGIN_EVENT_TABLE() to start the event-declaration block.
|
||||
Use wxBEGIN_EVENT_TABLE() to start the event-declaration block.
|
||||
|
||||
@see @ref overview_events_eventtables
|
||||
*/
|
||||
#define END_EVENT_TABLE()
|
||||
#define wxEND_EVENT_TABLE()
|
||||
|
||||
/**
|
||||
In a GUI application, this function posts @a event to the specified @e dest
|
||||
|
@ -309,14 +309,14 @@ public:
|
||||
char m_data[1024];
|
||||
wxCriticalSection m_dataCS; // protects field above
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
wxDEFINE_EVENT(wxEVT_COMMAND_MYTHREAD_UPDATE, wxThreadEvent)
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_MYTHREAD_UPDATE, MyFrame::OnThreadUpdate)
|
||||
EVT_CLOSE(MyFrame::OnClose)
|
||||
END_EVENT_TABLE()
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
void MyFrame::DoStartALongTask()
|
||||
{
|
||||
@ -687,15 +687,15 @@ enum
|
||||
MyThread *m_pThread;
|
||||
wxCriticalSection m_pThreadCS; // protects the m_pThread pointer
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_CLOSE(MyFrame::OnClose)
|
||||
EVT_MENU(Minimal_Start, MyFrame::DoStartThread)
|
||||
EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_MYTHREAD_UPDATE, MyFrame::OnThreadUpdate)
|
||||
EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_MYTHREAD_COMPLETED, MyFrame::OnThreadCompletion)
|
||||
END_EVENT_TABLE()
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
wxDEFINE_EVENT(wxEVT_COMMAND_MYTHREAD_COMPLETED, wxThreadEvent)
|
||||
wxDEFINE_EVENT(wxEVT_COMMAND_MYTHREAD_UPDATE, wxThreadEvent)
|
||||
|
@ -149,11 +149,12 @@ public:
|
||||
|
||||
private:
|
||||
wxTimer m_timer;
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_TIMER(TIMER_ID, MyFrame::OnTimer)
|
||||
END_EVENT_TABLE()
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
MyFrame::MyFrame()
|
||||
: m_timer(this, TIMER_ID)
|
||||
|
@ -118,7 +118,7 @@ wxEventHashTable &wxEvtHandler::GetEventHashTable() const
|
||||
wxEventHashTable wxEvtHandler::sm_eventHashTable(wxEvtHandler::sm_eventTable);
|
||||
|
||||
const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] =
|
||||
{ DECLARE_EVENT_TABLE_TERMINATOR() };
|
||||
{ wxDECLARE_EVENT_TABLE_TERMINATOR() };
|
||||
|
||||
|
||||
// wxUSE_MEMORY_TRACING considers memory freed from the static objects dtors
|
||||
@ -151,8 +151,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxEventTableEntryModule, wxModule)
|
||||
|
||||
const wxEventType wxEVT_FIRST = 10000;
|
||||
const wxEventType wxEVT_USER_FIRST = wxEVT_FIRST + 2000;
|
||||
const wxEventType wxEVT_NULL = wxNewEventType();
|
||||
|
||||
DEFINE_EVENT_TYPE(wxEVT_NULL)
|
||||
wxDEFINE_EVENT( wxEVT_IDLE, wxIdleEvent );
|
||||
|
||||
#endif // wxUSE_BASE
|
||||
|
Loading…
Reference in New Issue
Block a user