1. made compilation with WXWIN_COMPATIBILITY_EVENT_TYPES really work

2. moved ~50% of the event types in their own headers/sources from event.h/cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-01-31 17:16:40 +00:00
parent 6164f93ca2
commit 2e4df4bfaf
40 changed files with 853 additions and 726 deletions

View File

@@ -151,16 +151,25 @@ private:
#include "wx/generic/calctrl.h" #include "wx/generic/calctrl.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// calendar events macros // calendar event types and macros for handling them
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_SEL_CHANGED, 950)
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_DAY_CHANGED, 951)
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_MONTH_CHANGED, 952)
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_YEAR_CHANGED, 953)
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_DOUBLECLICKED, 954)
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_WEEKDAY_CLICKED, 955)
END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&); typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&);
#define EVT_CALENDAR(id, fn) wxEventTableEntry(wxEVT_CALENDAR_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL), #define EVT_CALENDAR(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL),
#define EVT_CALENDAR_SEL_CHANGED(id, fn) wxEventTableEntry(wxEVT_CALENDAR_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL), #define EVT_CALENDAR_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL),
#define EVT_CALENDAR_DAY(id, fn) wxEventTableEntry(wxEVT_CALENDAR_DAY_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL), #define EVT_CALENDAR_DAY(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_DAY_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL),
#define EVT_CALENDAR_MONTH(id, fn) wxEventTableEntry(wxEVT_CALENDAR_MONTH_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL), #define EVT_CALENDAR_MONTH(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_MONTH_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL),
#define EVT_CALENDAR_YEAR(id, fn) wxEventTableEntry(wxEVT_CALENDAR_YEAR_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL), #define EVT_CALENDAR_YEAR(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_YEAR_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL),
#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) wxEventTableEntry(wxEVT_CALENDAR_WEEKDAY_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL), #define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_WEEKDAY_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxCalendarEventFunction) & fn, (wxObject *) NULL),
#endif // _WX_CALCTRL_H #endif // _WX_CALCTRL_H

View File

@@ -153,7 +153,7 @@ public:
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// DIALUP events processing // wxDialUpManager events
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// the event class for the dialup events // the event class for the dialup events
@@ -179,11 +179,16 @@ public:
// the type of dialup event handler function // the type of dialup event handler function
typedef void (wxEvtHandler::*wxDialUpEventFunction)(wxDialUpEvent&); typedef void (wxEvtHandler::*wxDialUpEventFunction)(wxDialUpEvent&);
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_DIALUP_CONNECTED, 450)
DECLARE_EVENT_TYPE(wxEVT_DIALUP_DISCONNECTED, 451)
END_DECLARE_EVENT_TYPES()
// macros to catch dialup events // macros to catch dialup events
#define EVT_DIALUP_CONNECTED(func) \ #define EVT_DIALUP_CONNECTED(func) \
wxEventTableEntry( wxEVT_DIALUP_CONNECTED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxDialUpEventFunction) & func, NULL), DECLARE_EVENT_TABLE_ENTRY( wxEVT_DIALUP_CONNECTED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxDialUpEventFunction) & func, NULL),
#define EVT_DIALUP_DISCONNECTED(func) \ #define EVT_DIALUP_DISCONNECTED(func) \
wxEventTableEntry( wxEVT_DIALUP_DISCONNECTED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxDialUpEventFunction) & func, NULL), DECLARE_EVENT_TABLE_ENTRY( wxEVT_DIALUP_DISCONNECTED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxDialUpEventFunction) & func, NULL),
#endif // wxUSE_DIALUP_MANAGER #endif // wxUSE_DIALUP_MANAGER

View File

@@ -71,25 +71,32 @@ typedef int wxEventType;
#define DECLARE_EVENT_TABLE_ENTRY(type, id, idLast, fn, obj) \ #define DECLARE_EVENT_TABLE_ENTRY(type, id, idLast, fn, obj) \
{ type, id, idLast, fn, obj } { type, id, idLast, fn, obj }
#define BEGIN_DECLARE_EVENT_TYPES() enum {
#define END_DECLARE_EVENT_TYPES() };
#define DECLARE_EVENT_TYPE(name, value) name = wxEVT_FIRST + value, #define DECLARE_EVENT_TYPE(name, value) name = wxEVT_FIRST + value,
#define DEFINE_EVENT_TYPE(name)
#else // !WXWIN_COMPATIBILITY_EVENT_TYPES #else // !WXWIN_COMPATIBILITY_EVENT_TYPES
#define DECLARE_EVENT_TABLE_ENTRY(type, id, idLast, fn, obj) \ #define DECLARE_EVENT_TABLE_ENTRY(type, id, idLast, fn, obj) \
wxEventTableEntry(type, id, idLast, fn, obj) wxEventTableEntry(type, id, idLast, fn, obj)
#define BEGIN_DECLARE_EVENT_TYPES()
#define END_DECLARE_EVENT_TYPES()
#define DECLARE_EVENT_TYPE(name, value) extern wxEventType name; #define DECLARE_EVENT_TYPE(name, value) extern wxEventType name;
#define DEFINE_EVENT_TYPE(name) wxEventType name = wxNewEventType();
// generate a new unique event type // generate a new unique event type
extern WXDLLEXPORT wxEventType wxNewEventType(); extern WXDLLEXPORT wxEventType wxNewEventType();
#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES #endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
BEGIN_DECLARE_EVENT_TYPES()
#if WXWIN_COMPATIBILITY_EVENT_TYPES #if WXWIN_COMPATIBILITY_EVENT_TYPES
enum
{
wxEVT_NULL = 0, wxEVT_NULL = 0,
wxEVT_FIRST = 10000, wxEVT_FIRST = 10000,
wxEVT_USER_FIRST = wxEVT_FIRST + 2000,
#else // !WXWIN_COMPATIBILITY_EVENT_TYPES #else // !WXWIN_COMPATIBILITY_EVENT_TYPES
// it is important to still have these as constants to avoid // it is important to still have these as constants to avoid
// initialization order related problems // initialization order related problems
@@ -225,13 +232,6 @@ DECLARE_EVENT_TYPE(wxEVT_INIT_DIALOG, 437)
DECLARE_EVENT_TYPE(wxEVT_IDLE, 438) DECLARE_EVENT_TYPE(wxEVT_IDLE, 438)
DECLARE_EVENT_TYPE(wxEVT_UPDATE_UI, 439) DECLARE_EVENT_TYPE(wxEVT_UPDATE_UI, 439)
// System misc.
DECLARE_EVENT_TYPE(wxEVT_END_PROCESS, 440)
// Dial up events
DECLARE_EVENT_TYPE(wxEVT_DIALUP_CONNECTED, 450)
DECLARE_EVENT_TYPE(wxEVT_DIALUP_DISCONNECTED, 451)
// Generic command events // Generic command events
// Note: a click is a higher-level event than button down/up // Note: a click is a higher-level event than button down/up
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LEFT_CLICK, 500) DECLARE_EVENT_TYPE(wxEVT_COMMAND_LEFT_CLICK, 500)
@@ -242,82 +242,11 @@ DECLARE_EVENT_TYPE(wxEVT_COMMAND_SET_FOCUS, 504)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_KILL_FOCUS, 505) DECLARE_EVENT_TYPE(wxEVT_COMMAND_KILL_FOCUS, 505)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_ENTER, 506) DECLARE_EVENT_TYPE(wxEVT_COMMAND_ENTER, 506)
// Tree control event types
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_DRAG, 600)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_RDRAG, 601)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, 602)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_LABEL_EDIT, 603)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_DELETE_ITEM, 604)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_GET_INFO, 605)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_SET_INFO, 606)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDED, 607)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDING, 608)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSED, 609)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSING, 610)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGED, 611)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGING, 612)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_KEY_DOWN, 613)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, 614)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, 615)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, 616)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_DRAG, 617)
// List control event types
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_DRAG, 700)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_RDRAG, 701)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, 702)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT, 703)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM, 704)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, 705)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_GET_INFO, 706)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_SET_INFO, 707)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED, 708)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED, 709)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN, 710)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_INSERT_ITEM, 711)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_CLICK, 712)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, 713)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, 714)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, 715)
// Tab and notebook control event types
#if defined(__BORLANDC__) && defined(__WIN16__)
// For 16-bit BC++, these 2 would be identical otherwise (truncated)
#define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED wxEVT_COMMAND_NB_PAGE_CHANGED
#define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING wxEVT_COMMAND_NB_PAGE_CHANGING
#endif
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED, 800)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING, 801)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, 802)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, 803)
// Splitter events
DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, 850)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, 851)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, 852)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_UNSPLIT, 853)
// Wizard events
DECLARE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGED, 900)
DECLARE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGING, 901)
DECLARE_EVENT_TYPE(wxEVT_WIZARD_CANCEL, 902)
// Calendar events
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_SEL_CHANGED, 950)
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_DAY_CHANGED, 951)
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_MONTH_CHANGED, 952)
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_YEAR_CHANGED, 953)
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_DOUBLECLICKED, 954)
DECLARE_EVENT_TYPE(wxEVT_CALENDAR_WEEKDAY_CLICKED, 955)
// Help events // Help events
DECLARE_EVENT_TYPE(wxEVT_HELP, 1050) DECLARE_EVENT_TYPE(wxEVT_HELP, 1050)
DECLARE_EVENT_TYPE(wxEVT_DETAILED_HELP, 1051) DECLARE_EVENT_TYPE(wxEVT_DETAILED_HELP, 1051)
#if WXWIN_COMPATIBILITY_EVENT_TYPES END_DECLARE_EVENT_TYPES()
};
#endif // WXWIN_COMPATIBILITY_EVENT_TYPES
// these 2 events are the same // these 2 events are the same
#define wxEVT_COMMAND_TOOL_CLICKED wxEVT_COMMAND_MENU_SELECTED #define wxEVT_COMMAND_TOOL_CLICKED wxEVT_COMMAND_MENU_SELECTED
@@ -1508,14 +1437,29 @@ protected:
typedef void (wxObject::*wxObjectEventFunction)(wxEvent&); typedef void (wxObject::*wxObjectEventFunction)(wxEvent&);
// we can't have ctors nor base struct in backwards compatibility mode or
// otherwise we won't be able to initialize the objects with an agregate, so
// we have to keep both versions
#if WXWIN_COMPATIBILITY_EVENT_TYPES
struct WXDLLEXPORT wxEventTableEntry
{
// For some reason, this can't be wxEventType, or VC++ complains.
int m_eventType; // main event type
int m_id; // control/menu/toolbar id
int m_lastId; // used for ranges of ids
wxObjectEventFunction m_fn; // function to call: not wxEventFunction,
// because of dependency problems
wxObject* m_callbackUserData;
};
#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
// struct containing the members common to static and dynamic event tables // struct containing the members common to static and dynamic event tables
// entries // entries
struct WXDLLEXPORT wxEventTableEntryBase struct WXDLLEXPORT wxEventTableEntryBase
{ {
// provide default ctors for everything in backwards compatibility mode
#if WXWIN_COMPATIBILITY_EVENT_TYPES
wxEventTableEntryBase() { }
#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
wxEventTableEntryBase(int id, int idLast, wxEventTableEntryBase(int id, int idLast,
wxObjectEventFunction fn, wxObject *data) wxObjectEventFunction fn, wxObject *data)
{ {
@@ -1524,7 +1468,6 @@ struct WXDLLEXPORT wxEventTableEntryBase
m_fn = fn; m_fn = fn;
m_callbackUserData = data; m_callbackUserData = data;
} }
#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
// the range of ids for this entry: if m_lastId == -1, the range consists // the range of ids for this entry: if m_lastId == -1, the range consists
// only of m_id, otherwise it is m_id..m_lastId inclusive // only of m_id, otherwise it is m_id..m_lastId inclusive
@@ -1540,16 +1483,13 @@ struct WXDLLEXPORT wxEventTableEntryBase
// an entry from a static event table // an entry from a static event table
struct WXDLLEXPORT wxEventTableEntry : public wxEventTableEntryBase struct WXDLLEXPORT wxEventTableEntry : public wxEventTableEntryBase
{ {
#if WXWIN_COMPATIBILITY_EVENT_TYPES int m_eventType;
wxEventTableEntry() { }
#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
wxEventTableEntry(const int& evType, int id, int idLast, wxEventTableEntry(const int& evType, int id, int idLast,
wxObjectEventFunction fn, wxObject *data) wxObjectEventFunction fn, wxObject *data)
: wxEventTableEntryBase(id, idLast, fn, data), : wxEventTableEntryBase(id, idLast, fn, data),
m_eventType(evType) m_eventType(evType)
{ {
} }
#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
// the reference to event type: this allows us to not care about the // the reference to event type: this allows us to not care about the
// (undefined) order in which the event table entries and the event types // (undefined) order in which the event table entries and the event types
@@ -1563,16 +1503,12 @@ struct WXDLLEXPORT wxEventTableEntry : public wxEventTableEntryBase
// an entry used in dynamic event table managed by wxEvtHandler::Connect() // an entry used in dynamic event table managed by wxEvtHandler::Connect()
struct WXDLLEXPORT wxDynamicEventTableEntry : public wxEventTableEntryBase struct WXDLLEXPORT wxDynamicEventTableEntry : public wxEventTableEntryBase
{ {
#if WXWIN_COMPATIBILITY_EVENT_TYPES
wxDynamicEventTableEntry() { }
#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
wxDynamicEventTableEntry(int evType, int id, int idLast, wxDynamicEventTableEntry(int evType, int id, int idLast,
wxObjectEventFunction fn, wxObject *data) wxObjectEventFunction fn, wxObject *data)
: wxEventTableEntryBase(id, idLast, fn, data) : wxEventTableEntryBase(id, idLast, fn, data)
{ {
m_eventType = evType; m_eventType = evType;
} }
#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
// not a reference here as we can't keep a reference to a temporary int // not a reference here as we can't keep a reference to a temporary int
// created to wrap the constant value typically passed to Connect() - nor // created to wrap the constant value typically passed to Connect() - nor
@@ -1580,6 +1516,11 @@ struct WXDLLEXPORT wxDynamicEventTableEntry : public wxEventTableEntryBase
int m_eventType; int m_eventType;
}; };
#endif // !WXWIN_COMPATIBILITY_EVENT_TYPES
// ----------------------------------------------------------------------------
// wxEventTable: an array of event entries terminated with {0, 0, 0, 0, 0}
// ----------------------------------------------------------------------------
struct WXDLLEXPORT wxEventTable struct WXDLLEXPORT wxEventTable
{ {
const wxEventTable *baseTable; // base event table (next in chain) const wxEventTable *baseTable; // base event table (next in chain)
@@ -1749,220 +1690,220 @@ protected:\
virtual const wxEventTable* GetEventTable() const; virtual const wxEventTable* GetEventTable() const;
#define BEGIN_EVENT_TABLE(theClass, baseClass) \ #define BEGIN_EVENT_TABLE(theClass, baseClass) \
const wxEventTable *theClass::GetEventTable() const { return &theClass::sm_eventTable; }\ const wxEventTable *theClass::GetEventTable() const \
{ return &theClass::sm_eventTable; } \
const wxEventTable theClass::sm_eventTable = \ const wxEventTable theClass::sm_eventTable = \
{ &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
#define END_EVENT_TABLE() \ #define END_EVENT_TABLE() DECLARE_EVENT_TABLE_ENTRY( 0, 0, 0, 0, 0 ) };
wxEventTableEntry( 0, 0, 0, 0, 0 ) };
/* /*
* Event table macros * Event table macros
*/ */
// Generic events // Generic events
#define EVT_CUSTOM(event, id, func) wxEventTableEntry( event, id, -1, (wxObjectEventFunction) (wxEventFunction) & func, (wxObject *) NULL ), #define EVT_CUSTOM(event, id, func) DECLARE_EVENT_TABLE_ENTRY( event, id, -1, (wxObjectEventFunction) (wxEventFunction) & func, (wxObject *) NULL ),
#define EVT_CUSTOM_RANGE(event, id1, id2, func) wxEventTableEntry( event, id1, id2, (wxObjectEventFunction) (wxEventFunction) & func, (wxObject *) NULL ), #define EVT_CUSTOM_RANGE(event, id1, id2, func) DECLARE_EVENT_TABLE_ENTRY( event, id1, id2, (wxObjectEventFunction) (wxEventFunction) & func, (wxObject *) NULL ),
// Miscellaneous // Miscellaneous
#define EVT_SIZE(func) wxEventTableEntry( wxEVT_SIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSizeEventFunction) & func, (wxObject *) NULL ), #define EVT_SIZE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSizeEventFunction) & func, (wxObject *) NULL ),
#define EVT_MOVE(func) wxEventTableEntry( wxEVT_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMoveEventFunction) & func, (wxObject *) NULL ), #define EVT_MOVE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMoveEventFunction) & func, (wxObject *) NULL ),
#define EVT_CLOSE(func) wxEventTableEntry( wxEVT_CLOSE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL ), #define EVT_CLOSE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CLOSE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL ),
#define EVT_END_SESSION(func) wxEventTableEntry( wxEVT_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL ), #define EVT_END_SESSION(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL ),
#define EVT_QUERY_END_SESSION(func) wxEventTableEntry( wxEVT_QUERY_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL ), #define EVT_QUERY_END_SESSION(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_QUERY_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL ),
#define EVT_PAINT(func) wxEventTableEntry( wxEVT_PAINT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxPaintEventFunction) & func, (wxObject *) NULL ), #define EVT_PAINT(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PAINT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxPaintEventFunction) & func, (wxObject *) NULL ),
#define EVT_ERASE_BACKGROUND(func) wxEventTableEntry( wxEVT_ERASE_BACKGROUND, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxEraseEventFunction) & func, (wxObject *) NULL ), #define EVT_ERASE_BACKGROUND(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_ERASE_BACKGROUND, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxEraseEventFunction) & func, (wxObject *) NULL ),
#define EVT_CHAR(func) wxEventTableEntry( wxEVT_CHAR, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, (wxObject *) NULL ), #define EVT_CHAR(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CHAR, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, (wxObject *) NULL ),
#define EVT_KEY_DOWN(func) wxEventTableEntry( wxEVT_KEY_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, (wxObject *) NULL ), #define EVT_KEY_DOWN(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_KEY_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, (wxObject *) NULL ),
#define EVT_KEY_UP(func) wxEventTableEntry( wxEVT_KEY_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, (wxObject *) NULL ), #define EVT_KEY_UP(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_KEY_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, (wxObject *) NULL ),
#define EVT_CHAR_HOOK(func) wxEventTableEntry( wxEVT_CHAR_HOOK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, NULL ), #define EVT_CHAR_HOOK(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CHAR_HOOK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, NULL ),
#define EVT_MENU_HIGHLIGHT(id, func) wxEventTableEntry( wxEVT_MENU_HIGHLIGHT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL ), #define EVT_MENU_HIGHLIGHT(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MENU_HIGHLIGHT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL ),
#define EVT_MENU_HIGHLIGHT_ALL(func) wxEventTableEntry( wxEVT_MENU_HIGHLIGHT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL ), #define EVT_MENU_HIGHLIGHT_ALL(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MENU_HIGHLIGHT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL ),
#define EVT_SET_FOCUS(func) wxEventTableEntry( wxEVT_SET_FOCUS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, (wxObject *) NULL ), #define EVT_SET_FOCUS(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SET_FOCUS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, (wxObject *) NULL ),
#define EVT_KILL_FOCUS(func) wxEventTableEntry( wxEVT_KILL_FOCUS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, (wxObject *) NULL ), #define EVT_KILL_FOCUS(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_KILL_FOCUS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, (wxObject *) NULL ),
#define EVT_ACTIVATE(func) wxEventTableEntry( wxEVT_ACTIVATE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxActivateEventFunction) & func, (wxObject *) NULL ), #define EVT_ACTIVATE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_ACTIVATE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxActivateEventFunction) & func, (wxObject *) NULL ),
#define EVT_ACTIVATE_APP(func) wxEventTableEntry( wxEVT_ACTIVATE_APP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxActivateEventFunction) & func, (wxObject *) NULL ), #define EVT_ACTIVATE_APP(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_ACTIVATE_APP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxActivateEventFunction) & func, (wxObject *) NULL ),
#define EVT_END_SESSION(func) wxEventTableEntry( wxEVT_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL ), #define EVT_END_SESSION(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL ),
#define EVT_QUERY_END_SESSION(func) wxEventTableEntry( wxEVT_QUERY_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL ), #define EVT_QUERY_END_SESSION(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_QUERY_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL ),
#define EVT_DROP_FILES(func) wxEventTableEntry( wxEVT_DROP_FILES, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxDropFilesEventFunction) & func, (wxObject *) NULL ), #define EVT_DROP_FILES(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_DROP_FILES, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxDropFilesEventFunction) & func, (wxObject *) NULL ),
#define EVT_INIT_DIALOG(func) wxEventTableEntry( wxEVT_INIT_DIALOG, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxInitDialogEventFunction) & func, (wxObject *) NULL ), #define EVT_INIT_DIALOG(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_INIT_DIALOG, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxInitDialogEventFunction) & func, (wxObject *) NULL ),
#define EVT_SYS_COLOUR_CHANGED(func) wxEventTableEntry( wxEVT_SYS_COLOUR_CHANGED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSysColourChangedFunction) & func, (wxObject *) NULL ), #define EVT_SYS_COLOUR_CHANGED(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SYS_COLOUR_CHANGED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSysColourChangedFunction) & func, (wxObject *) NULL ),
#define EVT_SHOW(func) wxEventTableEntry( wxEVT_SHOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxShowEventFunction) & func, (wxObject *) NULL ), #define EVT_SHOW(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SHOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxShowEventFunction) & func, (wxObject *) NULL ),
#define EVT_MAXIMIZE(func) wxEventTableEntry( wxEVT_MAXIMIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMaximizeEventFunction) & func, (wxObject *) NULL ), #define EVT_MAXIMIZE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MAXIMIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMaximizeEventFunction) & func, (wxObject *) NULL ),
#define EVT_ICONIZE(func) wxEventTableEntry( wxEVT_ICONIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIconizeEventFunction) & func, (wxObject *) NULL ), #define EVT_ICONIZE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_ICONIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIconizeEventFunction) & func, (wxObject *) NULL ),
#define EVT_NAVIGATION_KEY(func) wxEventTableEntry( wxEVT_NAVIGATION_KEY, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNavigationKeyEventFunction) & func, (wxObject *) NULL ), #define EVT_NAVIGATION_KEY(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_NAVIGATION_KEY, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNavigationKeyEventFunction) & func, (wxObject *) NULL ),
#define EVT_PALETTE_CHANGED(func) wxEventTableEntry( wxEVT_PALETTE_CHANGED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxPaletteChangedEventFunction) & func, (wxObject *) NULL ), #define EVT_PALETTE_CHANGED(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PALETTE_CHANGED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxPaletteChangedEventFunction) & func, (wxObject *) NULL ),
#define EVT_QUERY_NEW_PALETTE(func) wxEventTableEntry( wxEVT_QUERY_NEW_PALETTE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxQueryNewPaletteEventFunction) & func, (wxObject *) NULL ), #define EVT_QUERY_NEW_PALETTE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_QUERY_NEW_PALETTE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxQueryNewPaletteEventFunction) & func, (wxObject *) NULL ),
#define EVT_WINDOW_CREATE(func) wxEventTableEntry( wxEVT_CREATE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxWindowCreateEventFunction) & func, (wxObject *) NULL ), #define EVT_WINDOW_CREATE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CREATE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxWindowCreateEventFunction) & func, (wxObject *) NULL ),
#define EVT_WINDOW_DESTROY(func) wxEventTableEntry( wxEVT_DESTROY, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxWindowDestroyEventFunction) & func, (wxObject *) NULL ), #define EVT_WINDOW_DESTROY(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_DESTROY, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxWindowDestroyEventFunction) & func, (wxObject *) NULL ),
#define EVT_SET_CURSOR(func) wxEventTableEntry( wxEVT_SET_CURSOR, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSetCursorEventFunction) & func, (wxObject *) NULL ), #define EVT_SET_CURSOR(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SET_CURSOR, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSetCursorEventFunction) & func, (wxObject *) NULL ),
// Mouse events // Mouse events
#define EVT_LEFT_DOWN(func) wxEventTableEntry( wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_LEFT_DOWN(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
#define EVT_LEFT_UP(func) wxEventTableEntry( wxEVT_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_LEFT_UP(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
#define EVT_MIDDLE_DOWN(func) wxEventTableEntry( wxEVT_MIDDLE_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_MIDDLE_DOWN(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MIDDLE_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
#define EVT_MIDDLE_UP(func) wxEventTableEntry( wxEVT_MIDDLE_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_MIDDLE_UP(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MIDDLE_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
#define EVT_RIGHT_DOWN(func) wxEventTableEntry( wxEVT_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_RIGHT_DOWN(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
#define EVT_RIGHT_UP(func) wxEventTableEntry( wxEVT_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_RIGHT_UP(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
#define EVT_MOTION(func) wxEventTableEntry( wxEVT_MOTION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_MOTION(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOTION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
#define EVT_LEFT_DCLICK(func) wxEventTableEntry( wxEVT_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_LEFT_DCLICK(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
#define EVT_MIDDLE_DCLICK(func) wxEventTableEntry( wxEVT_MIDDLE_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_MIDDLE_DCLICK(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MIDDLE_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
#define EVT_RIGHT_DCLICK(func) wxEventTableEntry( wxEVT_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_RIGHT_DCLICK(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
#define EVT_LEAVE_WINDOW(func) wxEventTableEntry( wxEVT_LEAVE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_LEAVE_WINDOW(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_LEAVE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
#define EVT_ENTER_WINDOW(func) wxEventTableEntry( wxEVT_ENTER_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), #define EVT_ENTER_WINDOW(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_ENTER_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
// All mouse events // All mouse events
#define EVT_MOUSE_EVENTS(func) \ #define EVT_MOUSE_EVENTS(func) \
wxEventTableEntry( wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_MIDDLE_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_MIDDLE_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_MIDDLE_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_MIDDLE_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_MOTION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOTION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_MIDDLE_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_MIDDLE_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_ENTER_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_ENTER_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_LEAVE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_LEAVE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
// EVT_COMMAND // EVT_COMMAND
#define EVT_COMMAND(id, event, fn) wxEventTableEntry( event, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_COMMAND(id, event, fn) DECLARE_EVENT_TABLE_ENTRY( event, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_RANGE(id1, id2, event, fn) wxEventTableEntry( event, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_COMMAND_RANGE(id1, id2, event, fn) DECLARE_EVENT_TABLE_ENTRY( event, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
// Scrolling from wxWindow (sent to wxScrolledWindow) // Scrolling from wxWindow (sent to wxScrolledWindow)
#define EVT_SCROLLWIN(func) \ #define EVT_SCROLLWIN(func) \
wxEventTableEntry( wxEVT_SCROLLWIN_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLLWIN_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLLWIN_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLLWIN_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLLWIN_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLLWIN_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLLWIN_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLLWIN_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLLWIN_TOP(func) wxEventTableEntry( wxEVT_SCROLLWIN_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLLWIN_TOP(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLLWIN_BOTTOM(func) wxEventTableEntry( wxEVT_SCROLLWIN_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLLWIN_BOTTOM(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLLWIN_LINEUP(func) wxEventTableEntry( wxEVT_SCROLLWIN_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLLWIN_LINEUP(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLLWIN_LINEDOWN(func) wxEventTableEntry( wxEVT_SCROLLWIN_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLLWIN_LINEDOWN(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLLWIN_PAGEUP(func) wxEventTableEntry( wxEVT_SCROLLWIN_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLLWIN_PAGEUP(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLLWIN_PAGEDOWN(func) wxEventTableEntry( wxEVT_SCROLLWIN_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLLWIN_PAGEDOWN(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLLWIN_THUMBTRACK(func) wxEventTableEntry( wxEVT_SCROLLWIN_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLLWIN_THUMBTRACK(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLLWIN_THUMBRELEASE(func) wxEventTableEntry( wxEVT_SCROLLWIN_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLLWIN_THUMBRELEASE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLLWIN_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL ),
// Scrolling from wxSlider and wxScrollBar // Scrolling from wxSlider and wxScrollBar
#define EVT_SCROLL(func) \ #define EVT_SCROLL(func) \
wxEventTableEntry( wxEVT_SCROLL_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLL_TOP(func) wxEventTableEntry( wxEVT_SCROLL_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLL_TOP(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLL_BOTTOM(func) wxEventTableEntry( wxEVT_SCROLL_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLL_BOTTOM(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLL_LINEUP(func) wxEventTableEntry( wxEVT_SCROLL_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLL_LINEUP(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLL_LINEDOWN(func) wxEventTableEntry( wxEVT_SCROLL_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLL_LINEDOWN(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLL_PAGEUP(func) wxEventTableEntry( wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLL_PAGEUP(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLL_PAGEDOWN(func) wxEventTableEntry( wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLL_PAGEDOWN(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLL_THUMBTRACK(func) wxEventTableEntry( wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLL_THUMBTRACK(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_SCROLL_THUMBRELEASE(func) wxEventTableEntry( wxEVT_SCROLL_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_SCROLL_THUMBRELEASE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
// Scrolling from wxSlider and wxScrollBar, with an id // Scrolling from wxSlider and wxScrollBar, with an id
#define EVT_COMMAND_SCROLL(id, func) \ #define EVT_COMMAND_SCROLL(id, func) \
wxEventTableEntry( wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_SCROLL_THUMBRELEASE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBRELEASE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_TOP(id, func) wxEventTableEntry( wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_COMMAND_SCROLL_TOP(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_BOTTOM(id, func) wxEventTableEntry( wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_COMMAND_SCROLL_BOTTOM(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_LINEUP(id, func) wxEventTableEntry( wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_COMMAND_SCROLL_LINEUP(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_LINEDOWN(id, func) wxEventTableEntry( wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_COMMAND_SCROLL_LINEDOWN(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_PAGEUP(id, func) wxEventTableEntry( wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_COMMAND_SCROLL_PAGEUP(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_PAGEDOWN(id, func) wxEventTableEntry( wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_COMMAND_SCROLL_PAGEDOWN(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_THUMBTRACK(id, func) wxEventTableEntry( wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_COMMAND_SCROLL_THUMBTRACK(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_THUMBRELEASE(id, func) wxEventTableEntry( wxEVT_SCROLL_THUMBRELEASE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), #define EVT_COMMAND_SCROLL_THUMBRELEASE(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBRELEASE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
// Convenience macros for commonly-used commands // Convenience macros for commonly-used commands
#define EVT_BUTTON(id, fn) wxEventTableEntry( wxEVT_COMMAND_BUTTON_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_BUTTON(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_BUTTON_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_CHECKBOX(id, fn) wxEventTableEntry( wxEVT_COMMAND_CHECKBOX_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_CHECKBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_CHECKBOX_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_CHOICE(id, fn) wxEventTableEntry( wxEVT_COMMAND_CHOICE_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_CHOICE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_CHOICE_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_LISTBOX(id, fn) wxEventTableEntry( wxEVT_COMMAND_LISTBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_LISTBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LISTBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_LISTBOX_DCLICK(id, fn) wxEventTableEntry( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_LISTBOX_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TEXT(id, fn) wxEventTableEntry( wxEVT_COMMAND_TEXT_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_TEXT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TEXT_ENTER(id, fn) wxEventTableEntry( wxEVT_COMMAND_TEXT_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_TEXT_ENTER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_MENU(id, fn) wxEventTableEntry( wxEVT_COMMAND_MENU_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_MENU(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_MENU_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_MENU_RANGE(id1, id2, fn) wxEventTableEntry( wxEVT_COMMAND_MENU_SELECTED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_MENU_RANGE(id1, id2, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_MENU_SELECTED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_SLIDER(id, fn) wxEventTableEntry( wxEVT_COMMAND_SLIDER_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_SLIDER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SLIDER_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_RADIOBOX(id, fn) wxEventTableEntry( wxEVT_COMMAND_RADIOBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_RADIOBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RADIOBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_RADIOBUTTON(id, fn) wxEventTableEntry( wxEVT_COMMAND_RADIOBUTTON_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_RADIOBUTTON(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RADIOBUTTON_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
// EVT_SCROLLBAR is now obsolete since we use EVT_COMMAND_SCROLL... events // EVT_SCROLLBAR is now obsolete since we use EVT_COMMAND_SCROLL... events
#define EVT_SCROLLBAR(id, fn) wxEventTableEntry( wxEVT_COMMAND_SCROLLBAR_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_SCROLLBAR(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SCROLLBAR_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_VLBOX(id, fn) wxEventTableEntry( wxEVT_COMMAND_VLBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_VLBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_VLBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMBOBOX(id, fn) wxEventTableEntry( wxEVT_COMMAND_COMBOBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_COMBOBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_COMBOBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL(id, fn) wxEventTableEntry( wxEVT_COMMAND_TOOL_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_TOOL(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL_RANGE(id1, id2, fn) wxEventTableEntry( wxEVT_COMMAND_TOOL_CLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_TOOL_RANGE(id1, id2, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_CLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL_RCLICKED(id, fn) wxEventTableEntry( wxEVT_COMMAND_TOOL_RCLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_TOOL_RCLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_RCLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL_RCLICKED_RANGE(id1, id2, fn) wxEventTableEntry( wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_TOOL_RCLICKED_RANGE(id1, id2, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL_ENTER(id, fn) wxEventTableEntry( wxEVT_COMMAND_TOOL_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_TOOL_ENTER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_CHECKLISTBOX(id, fn) wxEventTableEntry( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_CHECKLISTBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
// Generic command events // Generic command events
#define EVT_COMMAND_LEFT_CLICK(id, fn) wxEventTableEntry( wxEVT_COMMAND_LEFT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_COMMAND_LEFT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LEFT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_LEFT_DCLICK(id, fn) wxEventTableEntry( wxEVT_COMMAND_LEFT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_COMMAND_LEFT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LEFT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_RIGHT_CLICK(id, fn) wxEventTableEntry( wxEVT_COMMAND_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_COMMAND_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_RIGHT_DCLICK(id, fn) wxEventTableEntry( wxEVT_COMMAND_RIGHT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_COMMAND_RIGHT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RIGHT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_SET_FOCUS(id, fn) wxEventTableEntry( wxEVT_COMMAND_SET_FOCUS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_COMMAND_SET_FOCUS(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SET_FOCUS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_KILL_FOCUS(id, fn) wxEventTableEntry( wxEVT_COMMAND_KILL_FOCUS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_COMMAND_KILL_FOCUS(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_KILL_FOCUS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_ENTER(id, fn) wxEventTableEntry( wxEVT_COMMAND_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_COMMAND_ENTER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
// Joystick events // Joystick events
#define EVT_JOY_DOWN(func) \ #define EVT_JOY_DOWN(func) \
wxEventTableEntry( wxEVT_JOY_BUTTON_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_JOY_BUTTON_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ),
#define EVT_JOY_UP(func) \ #define EVT_JOY_UP(func) \
wxEventTableEntry( wxEVT_JOY_BUTTON_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_JOY_BUTTON_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ),
#define EVT_JOY_MOVE(func) \ #define EVT_JOY_MOVE(func) \
wxEventTableEntry( wxEVT_JOY_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_JOY_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ),
#define EVT_JOY_ZMOVE(func) \ #define EVT_JOY_ZMOVE(func) \
wxEventTableEntry( wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ),
// All joystick events // All joystick events
#define EVT_JOYSTICK_EVENTS(func) \ #define EVT_JOYSTICK_EVENTS(func) \
wxEventTableEntry( wxEVT_JOY_BUTTON_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_JOY_BUTTON_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_JOY_BUTTON_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_JOY_BUTTON_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_JOY_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ),\ DECLARE_EVENT_TABLE_ENTRY( wxEVT_JOY_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ),\
wxEventTableEntry( wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL ),
// Idle event // Idle event
#define EVT_IDLE(func) \ #define EVT_IDLE(func) \
wxEventTableEntry( wxEVT_IDLE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_IDLE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) & func, (wxObject *) NULL ),
// Update UI event // Update UI event
#define EVT_UPDATE_UI(id, func) \ #define EVT_UPDATE_UI(id, func) \
wxEventTableEntry( wxEVT_UPDATE_UI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxUpdateUIEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_UPDATE_UI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxUpdateUIEventFunction) & func, (wxObject *) NULL ),
#define EVT_UPDATE_UI_RANGE(id1, id2, func) \ #define EVT_UPDATE_UI_RANGE(id1, id2, func) \
wxEventTableEntry( wxEVT_UPDATE_UI, id1, id2, (wxObjectEventFunction)(wxEventFunction)(wxUpdateUIEventFunction)&func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_UPDATE_UI, id1, id2, (wxObjectEventFunction)(wxEventFunction)(wxUpdateUIEventFunction)&func, (wxObject *) NULL ),
// Help events // Help events
#define EVT_HELP(id, func) \ #define EVT_HELP(id, func) \
wxEventTableEntry( wxEVT_HELP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_HELP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ),
#define EVT_HELP_RANGE(id1, id2, func) \ #define EVT_HELP_RANGE(id1, id2, func) \
wxEventTableEntry( wxEVT_HELP, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_HELP, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ),
#define EVT_DETAILED_HELP(id, func) \ #define EVT_DETAILED_HELP(id, func) \
wxEventTableEntry( wxEVT_DETAILED_HELP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_DETAILED_HELP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ),
#define EVT_DETAILED_HELP_RANGE(id1, id2, func) \ #define EVT_DETAILED_HELP_RANGE(id1, id2, func) \
wxEventTableEntry( wxEVT_DETAILED_HELP, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_DETAILED_HELP, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ),
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Global data // Global data

View File

@@ -1875,43 +1875,44 @@ protected:
DECLARE_DYNAMIC_CLASS(wxGridRangeSelectEvent) DECLARE_DYNAMIC_CLASS(wxGridRangeSelectEvent)
}; };
// TODO move to wx/event.h BEGIN_DECLARE_EVENT_TYPES()
extern const int wxEVT_GRID_CELL_LEFT_CLICK; DECLARE_EVENT_TYPE(wxEVT_GRID_CELL_LEFT_CLICK, 1580)
extern const int wxEVT_GRID_CELL_RIGHT_CLICK; DECLARE_EVENT_TYPE(wxEVT_GRID_CELL_RIGHT_CLICK, 1581)
extern const int wxEVT_GRID_CELL_LEFT_DCLICK; DECLARE_EVENT_TYPE(wxEVT_GRID_CELL_LEFT_DCLICK, 1582)
extern const int wxEVT_GRID_CELL_RIGHT_DCLICK; DECLARE_EVENT_TYPE(wxEVT_GRID_CELL_RIGHT_DCLICK, 1583)
extern const int wxEVT_GRID_LABEL_LEFT_CLICK; DECLARE_EVENT_TYPE(wxEVT_GRID_LABEL_LEFT_CLICK, 1584)
extern const int wxEVT_GRID_LABEL_RIGHT_CLICK; DECLARE_EVENT_TYPE(wxEVT_GRID_LABEL_RIGHT_CLICK, 1585)
extern const int wxEVT_GRID_LABEL_LEFT_DCLICK; DECLARE_EVENT_TYPE(wxEVT_GRID_LABEL_LEFT_DCLICK, 1586)
extern const int wxEVT_GRID_LABEL_RIGHT_DCLICK; DECLARE_EVENT_TYPE(wxEVT_GRID_LABEL_RIGHT_DCLICK, 1587)
extern const int wxEVT_GRID_ROW_SIZE; DECLARE_EVENT_TYPE(wxEVT_GRID_ROW_SIZE, 1588)
extern const int wxEVT_GRID_COL_SIZE; DECLARE_EVENT_TYPE(wxEVT_GRID_COL_SIZE, 1589)
extern const int wxEVT_GRID_RANGE_SELECT; DECLARE_EVENT_TYPE(wxEVT_GRID_RANGE_SELECT, 1590)
extern const int wxEVT_GRID_CELL_CHANGE; DECLARE_EVENT_TYPE(wxEVT_GRID_CELL_CHANGE, 1591)
extern const int wxEVT_GRID_SELECT_CELL; DECLARE_EVENT_TYPE(wxEVT_GRID_SELECT_CELL, 1592)
extern const int wxEVT_GRID_EDITOR_SHOWN; DECLARE_EVENT_TYPE(wxEVT_GRID_EDITOR_SHOWN, 1593)
extern const int wxEVT_GRID_EDITOR_HIDDEN; DECLARE_EVENT_TYPE(wxEVT_GRID_EDITOR_HIDDEN, 1594)
END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&); typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&);
typedef void (wxEvtHandler::*wxGridSizeEventFunction)(wxGridSizeEvent&); typedef void (wxEvtHandler::*wxGridSizeEventFunction)(wxGridSizeEvent&);
typedef void (wxEvtHandler::*wxGridRangeSelectEventFunction)(wxGridRangeSelectEvent&); typedef void (wxEvtHandler::*wxGridRangeSelectEventFunction)(wxGridRangeSelectEvent&);
#define EVT_GRID_CELL_LEFT_CLICK(fn) wxEventTableEntry( wxEVT_GRID_CELL_LEFT_CLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_CELL_LEFT_CLICK(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CELL_LEFT_CLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_CELL_RIGHT_CLICK(fn) wxEventTableEntry( wxEVT_GRID_CELL_RIGHT_CLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_CELL_RIGHT_CLICK(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CELL_RIGHT_CLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_CELL_LEFT_DCLICK(fn) wxEventTableEntry( wxEVT_GRID_CELL_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_CELL_LEFT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CELL_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_CELL_RIGHT_DCLICK(fn) wxEventTableEntry( wxEVT_GRID_CELL_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_CELL_RIGHT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CELL_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_LABEL_LEFT_CLICK(fn) wxEventTableEntry( wxEVT_GRID_LABEL_LEFT_CLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_LABEL_LEFT_CLICK(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_LABEL_LEFT_CLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_LABEL_RIGHT_CLICK(fn) wxEventTableEntry( wxEVT_GRID_LABEL_RIGHT_CLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_LABEL_RIGHT_CLICK(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_LABEL_RIGHT_CLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_LABEL_LEFT_DCLICK(fn) wxEventTableEntry( wxEVT_GRID_LABEL_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_LABEL_LEFT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_LABEL_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_LABEL_RIGHT_DCLICK(fn) wxEventTableEntry( wxEVT_GRID_LABEL_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_LABEL_RIGHT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_LABEL_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_ROW_SIZE(fn) wxEventTableEntry( wxEVT_GRID_ROW_SIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridSizeEventFunction) &fn, NULL ), #define EVT_GRID_ROW_SIZE(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_ROW_SIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridSizeEventFunction) &fn, NULL ),
#define EVT_GRID_COL_SIZE(fn) wxEventTableEntry( wxEVT_GRID_COL_SIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridSizeEventFunction) &fn, NULL ), #define EVT_GRID_COL_SIZE(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_COL_SIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridSizeEventFunction) &fn, NULL ),
#define EVT_GRID_RANGE_SELECT(fn) wxEventTableEntry( wxEVT_GRID_RANGE_SELECT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridRangeSelectEventFunction) &fn, NULL ), #define EVT_GRID_RANGE_SELECT(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_RANGE_SELECT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridRangeSelectEventFunction) &fn, NULL ),
#define EVT_GRID_CELL_CHANGE(fn) wxEventTableEntry( wxEVT_GRID_CELL_CHANGE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_CELL_CHANGE(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CELL_CHANGE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_SELECT_CELL(fn) wxEventTableEntry( wxEVT_GRID_SELECT_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_SELECT_CELL(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_SELECT_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_EDITOR_SHOWN(fn) wxEventTableEntry( wxEVT_GRID_EDITOR_SHOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_EDITOR_SHOWN(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_EDITOR_SHOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_EDITOR_HIDDEN(fn) wxEventTableEntry( wxEVT_GRID_EDITOR_HIDDEN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_EDITOR_HIDDEN(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_EDITOR_HIDDEN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#if 0 // TODO: implement these ? others ? #if 0 // TODO: implement these ? others ?
@@ -1920,9 +1921,9 @@ extern const int wxEVT_GRID_CREATE_CELL;
extern const int wxEVT_GRID_CHANGE_LABELS; extern const int wxEVT_GRID_CHANGE_LABELS;
extern const int wxEVT_GRID_CHANGE_SEL_LABEL; extern const int wxEVT_GRID_CHANGE_SEL_LABEL;
#define EVT_GRID_CREATE_CELL(fn) wxEventTableEntry( wxEVT_GRID_CREATE_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_CREATE_CELL(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CREATE_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_CHANGE_LABELS(fn) wxEventTableEntry( wxEVT_GRID_CHANGE_LABELS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_CHANGE_LABELS(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_LABELS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#define EVT_GRID_CHANGE_SEL_LABEL(fn) wxEventTableEntry( wxEVT_GRID_CHANGE_SEL_LABEL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ), #define EVT_GRID_CHANGE_SEL_LABEL(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_SEL_LABEL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
#endif #endif

View File

@@ -410,15 +410,15 @@ const wxEventType wxEVT_GRID_LABEL_RCLICK = wxEVT_FIRST + 1583;
typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&); typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&);
#define EVT_GRID_SELECT_CELL(fn) wxEventTableEntry(wxEVT_GRID_SELECT_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL), #define EVT_GRID_SELECT_CELL(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_SELECT_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
#define EVT_GRID_CREATE_CELL(fn) wxEventTableEntry(wxEVT_GRID_CREATE_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL), #define EVT_GRID_CREATE_CELL(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CREATE_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
#define EVT_GRID_CHANGE_LABELS(fn) wxEventTableEntry(wxEVT_GRID_CHANGE_LABELS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL), #define EVT_GRID_CHANGE_LABELS(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CHANGE_LABELS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
#define EVT_GRID_CHANGE_SEL_LABEL(fn) wxEventTableEntry(wxEVT_GRID_CHANGE_SEL_LABEL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL), #define EVT_GRID_CHANGE_SEL_LABEL(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CHANGE_SEL_LABEL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
#define EVT_GRID_CELL_CHANGE(fn) wxEventTableEntry(wxEVT_GRID_CELL_CHANGE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL), #define EVT_GRID_CELL_CHANGE(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CELL_CHANGE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
#define EVT_GRID_CELL_LCLICK(fn) wxEventTableEntry(wxEVT_GRID_CELL_LCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL), #define EVT_GRID_CELL_LCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CELL_LCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
#define EVT_GRID_CELL_RCLICK(fn) wxEventTableEntry(wxEVT_GRID_CELL_RCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL), #define EVT_GRID_CELL_RCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CELL_RCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
#define EVT_GRID_LABEL_LCLICK(fn) wxEventTableEntry(wxEVT_GRID_LABEL_LCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL), #define EVT_GRID_LABEL_LCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_LABEL_LCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
#define EVT_GRID_LABEL_RCLICK(fn) wxEventTableEntry(wxEVT_GRID_LABEL_RCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL), #define EVT_GRID_LABEL_RCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_LABEL_RCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
#endif // __GRIDH_G__ #endif // __GRIDH_G__

View File

@@ -23,8 +23,10 @@
#include "wx/sashwin.h" #include "wx/sashwin.h"
#endif // wxUSE_SASH #endif // wxUSE_SASH
extern const int wxEVT_QUERY_LAYOUT_INFO; BEGIN_DECLARE_EVENT_TYPES()
extern const int wxEVT_CALCULATE_LAYOUT; DECLARE_EVENT_TYPE(wxEVT_QUERY_LAYOUT_INFO, 1500)
DECLARE_EVENT_TYPE(wxEVT_CALCULATE_LAYOUT, 1501)
END_DECLARE_EVENT_TYPES()
enum wxLayoutOrientation enum wxLayoutOrientation
{ {
@@ -101,7 +103,7 @@ protected:
typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEvent&); typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEvent&);
#define EVT_QUERY_LAYOUT_INFO(func) \ #define EVT_QUERY_LAYOUT_INFO(func) \
wxEventTableEntry( wxEVT_QUERY_LAYOUT_INFO, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxQueryLayoutInfoEventFunction) & func, NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_QUERY_LAYOUT_INFO, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxQueryLayoutInfoEventFunction) & func, NULL ),
/* /*
* This event is used to take a bite out of the available client area. * This event is used to take a bite out of the available client area.
@@ -132,7 +134,7 @@ protected:
typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEvent&); typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEvent&);
#define EVT_CALCULATE_LAYOUT(func) \ #define EVT_CALCULATE_LAYOUT(func) \
wxEventTableEntry( wxEVT_CALCULATE_LAYOUT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCalculateLayoutEventFunction) & func, NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_CALCULATE_LAYOUT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCalculateLayoutEventFunction) & func, NULL ),
#if wxUSE_SASH #if wxUSE_SASH

View File

@@ -229,9 +229,9 @@ class WXDLLEXPORT wxSashEvent: public wxCommandEvent
typedef void (wxEvtHandler::*wxSashEventFunction)(wxSashEvent&); typedef void (wxEvtHandler::*wxSashEventFunction)(wxSashEvent&);
#define EVT_SASH_DRAGGED(id, fn) \ #define EVT_SASH_DRAGGED(id, fn) \
wxEventTableEntry( wxEVT_SASH_DRAGGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSashEventFunction) & fn, NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_SASH_DRAGGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSashEventFunction) & fn, NULL ),
#define EVT_SASH_DRAGGED_RANGE(id1, id2, fn) \ #define EVT_SASH_DRAGGED_RANGE(id1, id2, fn) \
wxEventTableEntry( wxEVT_SASH_DRAGGED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxSashEventFunction) & fn, NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_SASH_DRAGGED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxSashEventFunction) & fn, NULL ),
#endif // wxUSE_SASH #endif // wxUSE_SASH

View File

@@ -323,7 +323,7 @@ private:
typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&); typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&);
#define EVT_SPLITTER_SASH_POS_CHANGED(id, fn) \ #define EVT_SPLITTER_SASH_POS_CHANGED(id, fn) \
wxEventTableEntry( \ DECLARE_EVENT_TABLE_ENTRY( \
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, \ wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, \
id, \ id, \
-1, \ -1, \
@@ -332,7 +332,7 @@ typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&);
), ),
#define EVT_SPLITTER_SASH_POS_CHANGING(id, fn) \ #define EVT_SPLITTER_SASH_POS_CHANGING(id, fn) \
wxEventTableEntry( \ DECLARE_EVENT_TABLE_ENTRY( \
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, \ wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, \
id, \ id, \
-1, \ -1, \
@@ -341,7 +341,7 @@ typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&);
), ),
#define EVT_SPLITTER_DCLICK(id, fn) \ #define EVT_SPLITTER_DCLICK(id, fn) \
wxEventTableEntry( \ DECLARE_EVENT_TABLE_ENTRY( \
wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, \ wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, \
id, \ id, \
-1, \ -1, \
@@ -350,7 +350,7 @@ typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&);
), ),
#define EVT_SPLITTER_UNSPLIT(id, fn) \ #define EVT_SPLITTER_UNSPLIT(id, fn) \
wxEventTableEntry( \ DECLARE_EVENT_TABLE_ENTRY( \
wxEVT_COMMAND_SPLITTER_UNSPLIT, \ wxEVT_COMMAND_SPLITTER_UNSPLIT, \
id, \ id, \
-1, \ -1, \

View File

@@ -297,24 +297,47 @@ private:
DECLARE_DYNAMIC_CLASS(wxListEvent) DECLARE_DYNAMIC_CLASS(wxListEvent)
}; };
// ----------------------------------------------------------------------------
// wxListCtrl event macros
// ----------------------------------------------------------------------------
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_DRAG, 700)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_RDRAG, 701)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, 702)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT, 703)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM, 704)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, 705)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_GET_INFO, 706)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_SET_INFO, 707)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED, 708)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED, 709)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN, 710)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_INSERT_ITEM, 711)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_CLICK, 712)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, 713)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, 714)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, 715)
END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
#define EVT_LIST_BEGIN_DRAG(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_BEGIN_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_BEGIN_RDRAG(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_BEGIN_RDRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_END_LABEL_EDIT(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_END_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_DELETE_ITEM(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_DELETE_ITEM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_DELETE_ALL_ITEMS(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_GET_INFO(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_GET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_SET_INFO(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_SET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_ITEM_SELECTED(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_ITEM_SELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_ITEM_DESELECTED(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_ITEM_DESELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_KEY_DOWN(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_KEY_DOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_INSERT_ITEM(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_INSERT_ITEM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_COL_CLICK(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ), #define EVT_LIST_COL_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
#define EVT_LIST_ITEM_RIGHT_CLICK(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL ), #define EVT_LIST_ITEM_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL ),
#define EVT_LIST_ITEM_MIDDLE_CLICK(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL ), #define EVT_LIST_ITEM_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL ),
#define EVT_LIST_ITEM_ACTIVATED(id, fn) wxEventTableEntry( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL ), #define EVT_LIST_ITEM_ACTIVATED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL ),
#endif #endif
// _WX_LISTCTRL_H_BASE_ // _WX_LISTCTRL_H_BASE_

View File

@@ -129,9 +129,9 @@ class WXDLLEXPORT wxTabEvent: public wxCommandEvent
typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&); typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
#define EVT_TAB_SEL_CHANGED(id, fn) wxEventTableEntry(wxEVT_COMMAND_TAB_SEL_CHANGED, \ #define EVT_TAB_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGED, \
id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL ), id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL ),
#define EVT_TAB_SEL_CHANGING(id, fn) wxEventTableEntry(wxEVT_COMMAND_TAB_SEL_CHANGING, \ #define EVT_TAB_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGING, \
id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL ), id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL ),
#endif #endif

View File

@@ -136,9 +136,9 @@ class WXDLLEXPORT wxTabEvent: public wxCommandEvent
typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&); typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
#define EVT_TAB_SEL_CHANGED(id, fn) wxEventTableEntry(wxEVT_COMMAND_TAB_SEL_CHANGED, \ #define EVT_TAB_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGED, \
id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL), id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL),
#define EVT_TAB_SEL_CHANGING(id, fn) wxEventTableEntry(wxEVT_COMMAND_TAB_SEL_CHANGING, \ #define EVT_TAB_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGING, \
id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL), id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL),
#endif #endif

View File

@@ -86,13 +86,13 @@ const wxEventType wxEVT_TASKBAR_LEFT_DCLICK = wxEVT_FIRST + 1555;
const wxEventType wxEVT_TASKBAR_RIGHT_DCLICK = wxEVT_FIRST + 1556; const wxEventType wxEVT_TASKBAR_RIGHT_DCLICK = wxEVT_FIRST + 1556;
#define EVT_TASKBAR_MOVE(fn) wxEventTableEntry(wxEVT_TASKBAR_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), #define EVT_TASKBAR_MOVE(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL),
#define EVT_TASKBAR_LEFT_DOWN(fn) wxEventTableEntry(wxEVT_TASKBAR_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), #define EVT_TASKBAR_LEFT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL),
#define EVT_TASKBAR_LEFT_UP(fn) wxEventTableEntry(wxEVT_TASKBAR_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), #define EVT_TASKBAR_LEFT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL),
#define EVT_TASKBAR_RIGHT_DOWN(fn) wxEventTableEntry(wxEVT_TASKBAR_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), #define EVT_TASKBAR_RIGHT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL),
#define EVT_TASKBAR_RIGHT_UP(fn) wxEventTableEntry(wxEVT_TASKBAR_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), #define EVT_TASKBAR_RIGHT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL),
#define EVT_TASKBAR_LEFT_DCLICK(fn) wxEventTableEntry(wxEVT_TASKBAR_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), #define EVT_TASKBAR_LEFT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL),
#define EVT_TASKBAR_RIGHT_DCLICK(fn) wxEventTableEntry(wxEVT_TASKBAR_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), #define EVT_TASKBAR_RIGHT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL),
#endif #endif

View File

@@ -38,15 +38,26 @@ private:
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// event macros // event types and macros for them
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__BORLANDC__) && defined(__WIN16__)
// For 16-bit BC++, these 2 would be identical otherwise (truncated)
#define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED wxEVT_COMMAND_NB_PAGE_CHANGED
#define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING wxEVT_COMMAND_NB_PAGE_CHANGING
#endif
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, 802)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, 803)
END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&); typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
// Truncation in 16-bit BC++ means we need to define these differently // Truncation in 16-bit BC++ means we need to define these differently
#if defined(__BORLANDC__) && defined(__WIN16__) #if defined(__BORLANDC__) && defined(__WIN16__)
#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \ #define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \
wxEventTableEntry( \ DECLARE_EVENT_TABLE_ENTRY( \
wxEVT_COMMAND_NB_PAGE_CHANGED, \ wxEVT_COMMAND_NB_PAGE_CHANGED, \
id, \ id, \
-1, \ -1, \
@@ -55,7 +66,7 @@ typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
), ),
#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \ #define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \
wxEventTableEntry( \ DECLARE_EVENT_TABLE_ENTRY( \
wxEVT_COMMAND_NB_PAGE_CHANGING, \ wxEVT_COMMAND_NB_PAGE_CHANGING, \
id, \ id, \
-1, \ -1, \
@@ -66,7 +77,7 @@ typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
#else #else
#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \ #define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \
wxEventTableEntry( \ DECLARE_EVENT_TABLE_ENTRY( \
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \ wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \
id, \ id, \
-1, \ -1, \
@@ -75,7 +86,7 @@ typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
), ),
#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \ #define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \
wxEventTableEntry( \ DECLARE_EVENT_TABLE_ENTRY( \
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \ wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \
id, \ id, \
-1, \ -1, \

View File

@@ -24,7 +24,10 @@
#include "wx/stream.h" #include "wx/stream.h"
#endif #endif
// Process Event handling // ----------------------------------------------------------------------------
// wxProcessEvent: event used with wxProcess
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxProcessEvent : public wxEvent class WXDLLEXPORT wxProcessEvent : public wxEvent
{ {
DECLARE_DYNAMIC_CLASS(wxProcessEvent) DECLARE_DYNAMIC_CLASS(wxProcessEvent)
@@ -48,8 +51,11 @@ public:
int m_pid, m_exitcode; int m_pid, m_exitcode;
}; };
// ----------------------------------------------------------------------------
// A wxProcess object should be passed to wxExecute - than its OnTerminate() // A wxProcess object should be passed to wxExecute - than its OnTerminate()
// function will be called when the process terminates. // function will be called when the process terminates.
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxProcess : public wxEvtHandler class WXDLLEXPORT wxProcess : public wxEvtHandler
{ {
DECLARE_DYNAMIC_CLASS(wxProcess) DECLARE_DYNAMIC_CLASS(wxProcess)
@@ -104,10 +110,18 @@ protected:
bool m_redirect; bool m_redirect;
}; };
// ----------------------------------------------------------------------------
// wxProcess events
// ----------------------------------------------------------------------------
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_END_PROCESS, 440)
END_DECLARE_EVENT_TYPES()
typedef void (wxObject::*wxProcessEventFunction)(wxProcessEvent&); typedef void (wxObject::*wxProcessEventFunction)(wxProcessEvent&);
#define EVT_END_PROCESS(id, func) \ #define EVT_END_PROCESS(id, func) \
wxEventTableEntry( wxEVT_END_PROCESS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxProcessEventFunction) & func, NULL), DECLARE_EVENT_TABLE_ENTRY( wxEVT_END_PROCESS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxProcessEventFunction) & func, NULL),
#endif #endif
// _WX_PROCESSH__ // _WX_PROCESSH__

View File

@@ -348,8 +348,11 @@ public:
typedef void (wxEvtHandler::*wxSocketEventFunction)(wxSocketEvent&); typedef void (wxEvtHandler::*wxSocketEventFunction)(wxSocketEvent&);
#define EVT_SOCKET(id, func) wxEventTableEntry( wxEVT_SOCKET, id, -1, \ #define EVT_SOCKET(id, func) \
(wxObjectEventFunction) (wxEventFunction) (wxSocketEventFunction) & func, \ DECLARE_EVENT_TABLE_ENTRY( wxEVT_SOCKET, id, -1, \
(wxObjectEventFunction) \
(wxEventFunction) \
(wxSocketEventFunction) & func, \
(wxObject *) NULL ), (wxObject *) NULL ),

View File

@@ -114,11 +114,11 @@ typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&);
// macros for handling spin events // macros for handling spin events
#define EVT_SPIN_UP(id, func) \ #define EVT_SPIN_UP(id, func) \
wxEventTableEntry( wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func, NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func, NULL ),
#define EVT_SPIN_DOWN(id, func) \ #define EVT_SPIN_DOWN(id, func) \
wxEventTableEntry( wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func, NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func, NULL ),
#define EVT_SPIN(id, func) \ #define EVT_SPIN(id, func) \
wxEventTableEntry( wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func, NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func, NULL ),
#endif // wxUSE_SPINBTN #endif // wxUSE_SPINBTN

View File

@@ -62,7 +62,7 @@ protected:
// Macro must be defined here, not event.h, since it must reference wxSpinEventFunction // Macro must be defined here, not event.h, since it must reference wxSpinEventFunction
#define EVT_SPINCTRL(id, fn) \ #define EVT_SPINCTRL(id, fn) \
wxEventTableEntry( wxEVT_COMMAND_SPINCTRL_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & fn, (wxObject *) NULL ), DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SPINCTRL_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & fn, (wxObject *) NULL ),
#endif // _WX_SPINCTRL_H_ #endif // _WX_SPINCTRL_H_

View File

@@ -1,6 +1,13 @@
#ifndef _WX_SPLITTER_H_BASE_ #ifndef _WX_SPLITTER_H_BASE_
#define _WX_SPLITTER_H_BASE_ #define _WX_SPLITTER_H_BASE_
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, 850)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, 851)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, 852)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_UNSPLIT, 853)
END_DECLARE_EVENT_TYPES()
#include "wx/generic/splitter.h" #include "wx/generic/splitter.h"
#endif #endif

View File

@@ -1,6 +1,11 @@
#ifndef _WX_TABCTRL_H_BASE_ #ifndef _WX_TABCTRL_H_BASE_
#define _WX_TABCTRL_H_BASE_ #define _WX_TABCTRL_H_BASE_
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED, 800)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING, 801)
END_DECLARE_EVENT_TYPES()
#if defined(__WXMSW__) #if defined(__WXMSW__)
#include "wx/msw/tabctrl.h" #include "wx/msw/tabctrl.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)

View File

@@ -172,7 +172,7 @@ private:
typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&); typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
#define EVT_TIMER(id, func) \ #define EVT_TIMER(id, func) \
wxEventTableEntry( wxEVT_TIMER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTimerEventFunction) & func, NULL), DECLARE_EVENT_TABLE_ENTRY( wxEVT_TIMER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTimerEventFunction) & func, NULL),
#endif // wxUSE_GUI #endif // wxUSE_GUI

View File

@@ -230,58 +230,79 @@ private:
typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// macros for handling tree control events // tree control events and macros for handling them
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_DRAG, 600)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_RDRAG, 601)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, 602)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_LABEL_EDIT, 603)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_DELETE_ITEM, 604)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_GET_INFO, 605)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_SET_INFO, 606)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDED, 607)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDING, 608)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSED, 609)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSING, 610)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGED, 611)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGING, 612)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_KEY_DOWN, 613)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, 614)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, 615)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, 616)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_DRAG, 617)
END_DECLARE_EVENT_TYPES()
// GetItem() returns the item being dragged, GetPoint() the mouse coords // GetItem() returns the item being dragged, GetPoint() the mouse coords
// //
// if you call event.Allow(), the drag operation will start and a // if you call event.Allow(), the drag operation will start and a
// EVT_TREE_END_DRAG event will be sent when the drag is over. // EVT_TREE_END_DRAG event will be sent when the drag is over.
#define EVT_TREE_BEGIN_DRAG(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ), #define EVT_TREE_BEGIN_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TREE_BEGIN_RDRAG(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ), #define EVT_TREE_BEGIN_RDRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ),
// GetItem() is the item on which the drop occured (if any) and GetPoint() the // GetItem() is the item on which the drop occured (if any) and GetPoint() the
// current mouse coords // current mouse coords
#define EVT_TREE_END_DRAG(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_END_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ), #define EVT_TREE_END_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_END_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ),
// GetItem() returns the itme whose label is being edited, GetLabel() returns // GetItem() returns the itme whose label is being edited, GetLabel() returns
// the current item label for BEGIN and the would be new one for END. // the current item label for BEGIN and the would be new one for END.
// //
// Vetoing BEGIN event means that label editing won't happen at all, // Vetoing BEGIN event means that label editing won't happen at all,
// vetoing END means that the new value is discarded and the old one kept // vetoing END means that the new value is discarded and the old one kept
#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ), #define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TREE_END_LABEL_EDIT(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ), #define EVT_TREE_END_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ),
// provide/update information about GetItem() item // provide/update information about GetItem() item
#define EVT_TREE_GET_INFO(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ), #define EVT_TREE_GET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TREE_SET_INFO(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ), #define EVT_TREE_SET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ),
// GetItem() is the item being expanded/collapsed, the "ING" versions can use // GetItem() is the item being expanded/collapsed, the "ING" versions can use
#define EVT_TREE_ITEM_EXPANDED(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ), #define EVT_TREE_ITEM_EXPANDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TREE_ITEM_EXPANDING(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ), #define EVT_TREE_ITEM_EXPANDING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TREE_ITEM_COLLAPSED(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ), #define EVT_TREE_ITEM_COLLAPSED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TREE_ITEM_COLLAPSING(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ), #define EVT_TREE_ITEM_COLLAPSING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ),
// GetOldItem() is the item which had the selection previously, GetItem() is // GetOldItem() is the item which had the selection previously, GetItem() is
// the item which acquires selection // the item which acquires selection
#define EVT_TREE_SEL_CHANGED(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ), #define EVT_TREE_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ),
#define EVT_TREE_SEL_CHANGING(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ), #define EVT_TREE_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ),
// GetCode() returns the key code // GetCode() returns the key code
// NB: this is the only message for which GetItem() is invalid (you may get the // NB: this is the only message for which GetItem() is invalid (you may get the
// item from GetSelection()) // item from GetSelection())
#define EVT_TREE_KEY_DOWN(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ), #define EVT_TREE_KEY_DOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ),
// GetItem() returns the item being deleted, the associated data (if any) will // GetItem() returns the item being deleted, the associated data (if any) will
// be deleted just after the return of this event handler (if any) // be deleted just after the return of this event handler (if any)
#define EVT_TREE_DELETE_ITEM(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ), #define EVT_TREE_DELETE_ITEM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL ),
// GetItem() returns the item that was activated (double click, enter, space) // GetItem() returns the item that was activated (double click, enter, space)
#define EVT_TREE_ITEM_ACTIVATED(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ), #define EVT_TREE_ITEM_ACTIVATED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ),
// GetItem() returns the item that was clicked on // GetItem() returns the item that was clicked on
#define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ), #define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ),
#define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) wxEventTableEntry( wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ), #define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL ),
// #endif // wxUSE_TREECTRL // #endif // wxUSE_TREECTRL

View File

@@ -175,17 +175,23 @@ private:
// macros for handling wxWizardEvents // macros for handling wxWizardEvents
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGED, 900)
DECLARE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGING, 901)
DECLARE_EVENT_TYPE(wxEVT_WIZARD_CANCEL, 902)
END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxWizardEventFunction)(wxWizardEvent&); typedef void (wxEvtHandler::*wxWizardEventFunction)(wxWizardEvent&);
// notifies that the page has just been changed (can't be vetoed) // notifies that the page has just been changed (can't be vetoed)
#define EVT_WIZARD_PAGE_CHANGED(id, fn) wxEventTableEntry(wxEVT_WIZARD_PAGE_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxWizardEventFunction) & fn, (wxObject *)NULL), #define EVT_WIZARD_PAGE_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_PAGE_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxWizardEventFunction) & fn, (wxObject *)NULL),
// the user pressed "<Back" or "Next>" button and the page is going to be // the user pressed "<Back" or "Next>" button and the page is going to be
// changed - unless the event handler vetoes the event // changed - unless the event handler vetoes the event
#define EVT_WIZARD_PAGE_CHANGING(id, fn) wxEventTableEntry(wxEVT_WIZARD_PAGE_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxWizardEventFunction) & fn, (wxObject *)NULL), #define EVT_WIZARD_PAGE_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_PAGE_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxWizardEventFunction) & fn, (wxObject *)NULL),
// the user pressed "Cancel" button and the wizard is going to be dismissed - // the user pressed "Cancel" button and the wizard is going to be dismissed -
// unless the event handler vetoes the event // unless the event handler vetoes the event
#define EVT_WIZARD_CANCEL(id, fn) wxEventTableEntry(wxEVT_WIZARD_CANCEL, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxWizardEventFunction) & fn, (wxObject *)NULL), #define EVT_WIZARD_CANCEL(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_CANCEL, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxWizardEventFunction) & fn, (wxObject *)NULL),
#endif // _WX_WIZARD_H_ #endif // _WX_WIZARD_H_

View File

@@ -108,212 +108,145 @@ wxList *wxPendingEvents = (wxList *)NULL;
#if !WXWIN_COMPATIBILITY_EVENT_TYPES #if !WXWIN_COMPATIBILITY_EVENT_TYPES
wxEventType wxEVT_COMMAND_BUTTON_CLICKED = wxNewEventType(); // common event types are defined here, other event types are defined by the
wxEventType wxEVT_COMMAND_CHECKBOX_CLICKED = wxNewEventType(); // components which use them
wxEventType wxEVT_COMMAND_CHOICE_SELECTED = wxNewEventType();
wxEventType wxEVT_COMMAND_LISTBOX_SELECTED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_BUTTON_CLICKED)
wxEventType wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_CHECKBOX_CLICKED)
wxEventType wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_CHOICE_SELECTED)
wxEventType wxEVT_COMMAND_TEXT_UPDATED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_LISTBOX_SELECTED)
wxEventType wxEVT_COMMAND_TEXT_ENTER = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED)
wxEventType wxEVT_COMMAND_MENU_SELECTED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED)
wxEventType wxEVT_COMMAND_SLIDER_UPDATED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_TEXT_UPDATED)
wxEventType wxEVT_COMMAND_RADIOBOX_SELECTED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_TEXT_ENTER)
wxEventType wxEVT_COMMAND_RADIOBUTTON_SELECTED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_MENU_SELECTED)
wxEventType wxEVT_COMMAND_SCROLLBAR_UPDATED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_SLIDER_UPDATED)
wxEventType wxEVT_COMMAND_VLBOX_SELECTED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_RADIOBOX_SELECTED)
wxEventType wxEVT_COMMAND_COMBOBOX_SELECTED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_RADIOBUTTON_SELECTED)
wxEventType wxEVT_COMMAND_TOOL_RCLICKED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_SCROLLBAR_UPDATED)
wxEventType wxEVT_COMMAND_TOOL_ENTER = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_VLBOX_SELECTED)
wxEventType wxEVT_COMMAND_SPINCTRL_UPDATED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_COMBOBOX_SELECTED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TOOL_RCLICKED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TOOL_ENTER)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPINCTRL_UPDATED)
// Sockets and timers send events, too // Sockets and timers send events, too
wxEventType wxEVT_SOCKET = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SOCKET)
wxEventType wxEVT_TIMER = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_TIMER)
// Mouse event types // Mouse event types
wxEventType wxEVT_LEFT_DOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_LEFT_DOWN)
wxEventType wxEVT_LEFT_UP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_LEFT_UP)
wxEventType wxEVT_MIDDLE_DOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_MIDDLE_DOWN)
wxEventType wxEVT_MIDDLE_UP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_MIDDLE_UP)
wxEventType wxEVT_RIGHT_DOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_RIGHT_DOWN)
wxEventType wxEVT_RIGHT_UP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_RIGHT_UP)
wxEventType wxEVT_MOTION = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_MOTION)
wxEventType wxEVT_ENTER_WINDOW = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_ENTER_WINDOW)
wxEventType wxEVT_LEAVE_WINDOW = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_LEAVE_WINDOW)
wxEventType wxEVT_LEFT_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_LEFT_DCLICK)
wxEventType wxEVT_MIDDLE_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_MIDDLE_DCLICK)
wxEventType wxEVT_RIGHT_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_RIGHT_DCLICK)
wxEventType wxEVT_SET_FOCUS = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SET_FOCUS)
wxEventType wxEVT_KILL_FOCUS = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_KILL_FOCUS)
// Non-client mouse events // Non-client mouse events
wxEventType wxEVT_NC_LEFT_DOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_LEFT_DOWN)
wxEventType wxEVT_NC_LEFT_UP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_LEFT_UP)
wxEventType wxEVT_NC_MIDDLE_DOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_MIDDLE_DOWN)
wxEventType wxEVT_NC_MIDDLE_UP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_MIDDLE_UP)
wxEventType wxEVT_NC_RIGHT_DOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_RIGHT_DOWN)
wxEventType wxEVT_NC_RIGHT_UP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_RIGHT_UP)
wxEventType wxEVT_NC_MOTION = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_MOTION)
wxEventType wxEVT_NC_ENTER_WINDOW = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_ENTER_WINDOW)
wxEventType wxEVT_NC_LEAVE_WINDOW = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_LEAVE_WINDOW)
wxEventType wxEVT_NC_LEFT_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_LEFT_DCLICK)
wxEventType wxEVT_NC_MIDDLE_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_MIDDLE_DCLICK)
wxEventType wxEVT_NC_RIGHT_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_RIGHT_DCLICK)
// Character input event type // Character input event type
wxEventType wxEVT_CHAR = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_CHAR)
wxEventType wxEVT_CHAR_HOOK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_CHAR_HOOK)
wxEventType wxEVT_NAVIGATION_KEY = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NAVIGATION_KEY)
wxEventType wxEVT_KEY_DOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_KEY_DOWN)
wxEventType wxEVT_KEY_UP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_KEY_UP)
// Set cursor event // Set cursor event
wxEventType wxEVT_SET_CURSOR = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SET_CURSOR)
// wxScrollbar and wxSlider event identifiers // wxScrollbar and wxSlider event identifiers
wxEventType wxEVT_SCROLL_TOP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLL_TOP)
wxEventType wxEVT_SCROLL_BOTTOM = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLL_BOTTOM)
wxEventType wxEVT_SCROLL_LINEUP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLL_LINEUP)
wxEventType wxEVT_SCROLL_LINEDOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLL_LINEDOWN)
wxEventType wxEVT_SCROLL_PAGEUP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLL_PAGEUP)
wxEventType wxEVT_SCROLL_PAGEDOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLL_PAGEDOWN)
wxEventType wxEVT_SCROLL_THUMBTRACK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLL_THUMBTRACK)
wxEventType wxEVT_SCROLL_THUMBRELEASE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLL_THUMBRELEASE)
// Scroll events from wxWindow // Scroll events from wxWindow
wxEventType wxEVT_SCROLLWIN_TOP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLLWIN_TOP)
wxEventType wxEVT_SCROLLWIN_BOTTOM = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLLWIN_BOTTOM)
wxEventType wxEVT_SCROLLWIN_LINEUP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLLWIN_LINEUP)
wxEventType wxEVT_SCROLLWIN_LINEDOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLLWIN_LINEDOWN)
wxEventType wxEVT_SCROLLWIN_PAGEUP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLLWIN_PAGEUP)
wxEventType wxEVT_SCROLLWIN_PAGEDOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLLWIN_PAGEDOWN)
wxEventType wxEVT_SCROLLWIN_THUMBTRACK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLLWIN_THUMBTRACK)
wxEventType wxEVT_SCROLLWIN_THUMBRELEASE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SCROLLWIN_THUMBRELEASE)
// System events // System events
wxEventType wxEVT_SIZE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SIZE)
wxEventType wxEVT_MOVE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_MOVE)
wxEventType wxEVT_CLOSE_WINDOW = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_CLOSE_WINDOW)
wxEventType wxEVT_END_SESSION = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_END_SESSION)
wxEventType wxEVT_QUERY_END_SESSION = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_QUERY_END_SESSION)
wxEventType wxEVT_ACTIVATE_APP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_ACTIVATE_APP)
wxEventType wxEVT_POWER = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_POWER)
wxEventType wxEVT_ACTIVATE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_ACTIVATE)
wxEventType wxEVT_CREATE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_CREATE)
wxEventType wxEVT_DESTROY = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_DESTROY)
wxEventType wxEVT_SHOW = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SHOW)
wxEventType wxEVT_ICONIZE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_ICONIZE)
wxEventType wxEVT_MAXIMIZE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_MAXIMIZE)
wxEventType wxEVT_MOUSE_CAPTURE_CHANGED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_MOUSE_CAPTURE_CHANGED)
wxEventType wxEVT_PAINT = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_PAINT)
wxEventType wxEVT_ERASE_BACKGROUND = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_ERASE_BACKGROUND)
wxEventType wxEVT_NC_PAINT = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_NC_PAINT)
wxEventType wxEVT_PAINT_ICON = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_PAINT_ICON)
wxEventType wxEVT_MENU_CHAR = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_MENU_CHAR)
wxEventType wxEVT_MENU_INIT = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_MENU_INIT)
wxEventType wxEVT_MENU_HIGHLIGHT = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_MENU_HIGHLIGHT)
wxEventType wxEVT_POPUP_MENU_INIT = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_POPUP_MENU_INIT)
wxEventType wxEVT_CONTEXT_MENU = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_CONTEXT_MENU)
wxEventType wxEVT_SYS_COLOUR_CHANGED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SYS_COLOUR_CHANGED)
wxEventType wxEVT_SETTING_CHANGED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_SETTING_CHANGED)
wxEventType wxEVT_QUERY_NEW_PALETTE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_QUERY_NEW_PALETTE)
wxEventType wxEVT_PALETTE_CHANGED = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_PALETTE_CHANGED)
wxEventType wxEVT_JOY_BUTTON_DOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_JOY_BUTTON_DOWN)
wxEventType wxEVT_JOY_BUTTON_UP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_JOY_BUTTON_UP)
wxEventType wxEVT_JOY_MOVE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_JOY_MOVE)
wxEventType wxEVT_JOY_ZMOVE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_JOY_ZMOVE)
wxEventType wxEVT_DROP_FILES = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_DROP_FILES)
wxEventType wxEVT_DRAW_ITEM = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_DRAW_ITEM)
wxEventType wxEVT_MEASURE_ITEM = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_MEASURE_ITEM)
wxEventType wxEVT_COMPARE_ITEM = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMPARE_ITEM)
wxEventType wxEVT_INIT_DIALOG = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_INIT_DIALOG)
wxEventType wxEVT_IDLE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_IDLE)
wxEventType wxEVT_UPDATE_UI = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_UPDATE_UI)
// System misc.
wxEventType wxEVT_END_PROCESS = wxNewEventType();
// Dial up events
wxEventType wxEVT_DIALUP_CONNECTED = wxNewEventType();
wxEventType wxEVT_DIALUP_DISCONNECTED = wxNewEventType();
// Generic command events // Generic command events
// Note: a click is a higher-level event than button down/up // Note: a click is a higher-level event than button down/up
wxEventType wxEVT_COMMAND_LEFT_CLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_LEFT_CLICK)
wxEventType wxEVT_COMMAND_LEFT_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_LEFT_DCLICK)
wxEventType wxEVT_COMMAND_RIGHT_CLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_RIGHT_CLICK)
wxEventType wxEVT_COMMAND_RIGHT_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_RIGHT_DCLICK)
wxEventType wxEVT_COMMAND_SET_FOCUS = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_SET_FOCUS)
wxEventType wxEVT_COMMAND_KILL_FOCUS = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_KILL_FOCUS)
wxEventType wxEVT_COMMAND_ENTER = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_COMMAND_ENTER)
// Tree control event types
wxEventType wxEVT_COMMAND_TREE_BEGIN_DRAG = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_BEGIN_RDRAG = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_END_LABEL_EDIT = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_DELETE_ITEM = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_GET_INFO = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_SET_INFO = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDED = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDING = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSED = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSING = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_SEL_CHANGED = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_SEL_CHANGING = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_KEY_DOWN = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_ITEM_ACTIVATED = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK = wxNewEventType();
wxEventType wxEVT_COMMAND_TREE_END_DRAG = wxNewEventType();
// List control event types
wxEventType wxEVT_COMMAND_LIST_BEGIN_DRAG = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_BEGIN_RDRAG = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_END_LABEL_EDIT = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_DELETE_ITEM = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_GET_INFO = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_SET_INFO = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_ITEM_SELECTED = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_ITEM_DESELECTED = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_KEY_DOWN = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_INSERT_ITEM = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_COL_CLICK = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK = wxNewEventType();
wxEventType wxEVT_COMMAND_LIST_ITEM_ACTIVATED = wxNewEventType();
// Tab and notebook control event types
wxEventType wxEVT_COMMAND_TAB_SEL_CHANGED = wxNewEventType();
wxEventType wxEVT_COMMAND_TAB_SEL_CHANGING = wxNewEventType();
wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = wxNewEventType();
wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = wxNewEventType();
// Splitter events
wxEventType wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED = wxNewEventType();
wxEventType wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING = wxNewEventType();
wxEventType wxEVT_COMMAND_SPLITTER_DOUBLECLICKED = wxNewEventType();
wxEventType wxEVT_COMMAND_SPLITTER_UNSPLIT = wxNewEventType();
// Wizard events
wxEventType wxEVT_WIZARD_PAGE_CHANGED = wxNewEventType();
wxEventType wxEVT_WIZARD_PAGE_CHANGING = wxNewEventType();
wxEventType wxEVT_WIZARD_CANCEL = wxNewEventType();
// Calendar events
wxEventType wxEVT_CALENDAR_SEL_CHANGED = wxNewEventType();
wxEventType wxEVT_CALENDAR_DAY_CHANGED = wxNewEventType();
wxEventType wxEVT_CALENDAR_MONTH_CHANGED = wxNewEventType();
wxEventType wxEVT_CALENDAR_YEAR_CHANGED = wxNewEventType();
wxEventType wxEVT_CALENDAR_DOUBLECLICKED = wxNewEventType();
wxEventType wxEVT_CALENDAR_WEEKDAY_CLICKED = wxNewEventType();
// Help events // Help events
wxEventType wxEVT_HELP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_HELP)
wxEventType wxEVT_DETAILED_HELP = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_DETAILED_HELP)
#endif // !WXWIN_COMPATIBILITY_EVENT_TYPES #endif // !WXWIN_COMPATIBILITY_EVENT_TYPES
@@ -811,8 +744,14 @@ wxEvtHandler::~wxEvtHandler()
wxNode *node = m_dynamicEvents->First(); wxNode *node = m_dynamicEvents->First();
while (node) while (node)
{ {
#if WXWIN_COMPATIBILITY_EVENT_TYPES
wxEventTableEntry *entry = (wxEventTableEntry*)node->Data();
#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->Data(); wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->Data();
if (entry->m_callbackUserData) delete entry->m_callbackUserData; #endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
if (entry->m_callbackUserData)
delete entry->m_callbackUserData;
delete entry; delete entry;
node = node->Next(); node = node->Next();
} }
@@ -1076,7 +1015,7 @@ void wxEvtHandler::Connect( int id, int lastId,
wxObject *userData ) wxObject *userData )
{ {
#if WXWIN_COMPATIBILITY_EVENT_TYPES #if WXWIN_COMPATIBILITY_EVENT_TYPES
wxDynamicEventTableEntry *entry = new wxDynamicEventTableEntry; wxEventTableEntry *entry = new wxEventTableEntry;
entry->m_eventType = eventType; entry->m_eventType = eventType;
entry->m_id = id; entry->m_id = id;
entry->m_lastId = lastId; entry->m_lastId = lastId;
@@ -1103,14 +1042,20 @@ bool wxEvtHandler::Disconnect( int id, int lastId, wxEventType eventType,
wxNode *node = m_dynamicEvents->First(); wxNode *node = m_dynamicEvents->First();
while (node) while (node)
{ {
#if WXWIN_COMPATIBILITY_EVENT_TYPES
wxEventTableEntry *entry = (wxEventTableEntry*)node->Data();
#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->Data(); wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->Data();
#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
if ((entry->m_id == id) && if ((entry->m_id == id) &&
((entry->m_lastId == lastId) || (lastId == -1)) && ((entry->m_lastId == lastId) || (lastId == -1)) &&
((entry->m_eventType == eventType) || (eventType == wxEVT_NULL)) && ((entry->m_eventType == eventType) || (eventType == wxEVT_NULL)) &&
((entry->m_fn == func) || (func == (wxObjectEventFunction)NULL)) && ((entry->m_fn == func) || (func == (wxObjectEventFunction)NULL)) &&
((entry->m_callbackUserData == userData) || (userData == (wxObject*)NULL))) ((entry->m_callbackUserData == userData) || (userData == (wxObject*)NULL)))
{ {
if (entry->m_callbackUserData) delete entry->m_callbackUserData; if (entry->m_callbackUserData)
delete entry->m_callbackUserData;
m_dynamicEvents->DeleteNode( node ); m_dynamicEvents->DeleteNode( node );
delete entry; delete entry;
return TRUE; return TRUE;
@@ -1130,7 +1075,11 @@ bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event )
wxNode *node = m_dynamicEvents->First(); wxNode *node = m_dynamicEvents->First();
while (node) while (node)
{ {
#if WXWIN_COMPATIBILITY_EVENT_TYPES
wxEventTableEntry *entry = (wxEventTableEntry*)node->Data();
#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->Data(); wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->Data();
#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
if (entry->m_fn) if (entry->m_fn)
{ {

View File

@@ -26,6 +26,8 @@
#include "wx/process.h" #include "wx/process.h"
DEFINE_EVENT_TYPE(wxEVT_END_PROCESS)
IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler)
IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent) IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent)

View File

@@ -97,6 +97,17 @@ END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrl, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrl, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxCalendarEvent, wxCommandEvent) IMPLEMENT_DYNAMIC_CLASS(wxCalendarEvent, wxCommandEvent)
// ----------------------------------------------------------------------------
// events
// ----------------------------------------------------------------------------
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_SEL_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_DAY_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_MONTH_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_YEAR_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_DOUBLECLICKED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_WEEKDAY_CLICKED)
// ============================================================================ // ============================================================================
// implementation // implementation
// ============================================================================ // ============================================================================

View File

@@ -100,21 +100,21 @@ WX_DEFINE_OBJARRAY(wxGridCellWithAttrArray)
// events // events
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
const int wxEVT_GRID_CELL_LEFT_CLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_CELL_LEFT_CLICK)
const int wxEVT_GRID_CELL_RIGHT_CLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_CELL_RIGHT_CLICK)
const int wxEVT_GRID_CELL_LEFT_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_CELL_LEFT_DCLICK)
const int wxEVT_GRID_CELL_RIGHT_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_CELL_RIGHT_DCLICK)
const int wxEVT_GRID_LABEL_LEFT_CLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_LABEL_LEFT_CLICK)
const int wxEVT_GRID_LABEL_RIGHT_CLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_LABEL_RIGHT_CLICK)
const int wxEVT_GRID_LABEL_LEFT_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_LABEL_LEFT_DCLICK)
const int wxEVT_GRID_LABEL_RIGHT_DCLICK = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_LABEL_RIGHT_DCLICK)
const int wxEVT_GRID_ROW_SIZE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_ROW_SIZE)
const int wxEVT_GRID_COL_SIZE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_COL_SIZE)
const int wxEVT_GRID_RANGE_SELECT = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_RANGE_SELECT)
const int wxEVT_GRID_CELL_CHANGE = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_CELL_CHANGE)
const int wxEVT_GRID_SELECT_CELL = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_SELECT_CELL)
const int wxEVT_GRID_EDITOR_SHOWN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_EDITOR_SHOWN)
const int wxEVT_GRID_EDITOR_HIDDEN = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_GRID_EDITOR_HIDDEN)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// private classes // private classes

View File

@@ -33,8 +33,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxQueryLayoutInfoEvent, wxEvent) IMPLEMENT_DYNAMIC_CLASS(wxQueryLayoutInfoEvent, wxEvent)
IMPLEMENT_DYNAMIC_CLASS(wxCalculateLayoutEvent, wxEvent) IMPLEMENT_DYNAMIC_CLASS(wxCalculateLayoutEvent, wxEvent)
const int wxEVT_QUERY_LAYOUT_INFO = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_QUERY_LAYOUT_INFO)
const int wxEVT_CALCULATE_LAYOUT = wxNewEventType(); DEFINE_EVENT_TYPE(wxEVT_CALCULATE_LAYOUT)
#if wxUSE_SASH #if wxUSE_SASH
IMPLEMENT_CLASS(wxSashLayoutWindow, wxSashWindow) IMPLEMENT_CLASS(wxSashLayoutWindow, wxSashWindow)

View File

@@ -34,6 +34,27 @@
#define wxUSE_GENERIC_LIST_EXTENSIONS 1 #define wxUSE_GENERIC_LIST_EXTENSIONS 1
#endif #endif
// ----------------------------------------------------------------------------
// events
// ----------------------------------------------------------------------------
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_DRAG)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_RDRAG)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_GET_INFO)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_SET_INFO)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_INSERT_ITEM)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_ACTIVATED)
// ============================================================================ // ============================================================================
// private classes // private classes
// ============================================================================ // ============================================================================

View File

@@ -45,6 +45,9 @@
// event table // event table
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
BEGIN_EVENT_TABLE(wxNotebook, wxControl) BEGIN_EVENT_TABLE(wxNotebook, wxControl)
EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange)
EVT_SIZE(wxNotebook::OnSize) EVT_SIZE(wxNotebook::OnSize)
@@ -656,12 +659,7 @@ void wxNotebookTabView::OnTabActivate(int activateId, int deactivateId)
if (!m_notebook) if (!m_notebook)
return; return;
// Because of name truncation!
#if defined(__BORLANDC__) && defined(__WIN16__)
wxNotebookEvent event(wxEVT_COMMAND_NB_PAGE_CHANGED, m_notebook->GetId());
#else
wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId()); wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId());
#endif
#if defined (__WIN16__) #if defined (__WIN16__)
int activatePos = activateId; int activatePos = activateId;

View File

@@ -34,6 +34,11 @@
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h" #include "wx/log.h"
DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_DOUBLECLICKED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_UNSPLIT)
IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindow, wxWindow) IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindow, wxWindow)
IMPLEMENT_DYNAMIC_CLASS(wxSplitterEvent, wxCommandEvent) IMPLEMENT_DYNAMIC_CLASS(wxSplitterEvent, wxCommandEvent)

View File

@@ -38,6 +38,29 @@
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
// ----------------------------------------------------------------------------
// events
// ----------------------------------------------------------------------------
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_DRAG)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_RDRAG)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_LABEL_EDIT)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_DELETE_ITEM)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_GET_INFO)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SET_INFO)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDING)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSING)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGING)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_KEY_DOWN)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_ACTIVATED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_DRAG)
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// array types // array types
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@@ -49,6 +49,10 @@ WX_DEFINE_ARRAY(wxPanel *, wxArrayPages);
// event tables and such // event tables and such
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
DEFINE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGING)
DEFINE_EVENT_TYPE(wxEVT_WIZARD_CANCEL)
BEGIN_EVENT_TABLE(wxWizard, wxDialog) BEGIN_EVENT_TABLE(wxWizard, wxDialog)
EVT_BUTTON(wxID_CANCEL, wxWizard::OnCancel) EVT_BUTTON(wxID_CANCEL, wxWizard::OnCancel)
EVT_BUTTON(-1, wxWizard::OnBackOrNext) EVT_BUTTON(-1, wxWizard::OnBackOrNext)

View File

@@ -26,6 +26,13 @@
#include "wx/gtk/win_gtk.h" #include "wx/gtk/win_gtk.h"
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>
// ----------------------------------------------------------------------------
// events
// ----------------------------------------------------------------------------
DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// idle system // idle system
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -26,6 +26,13 @@
#include "wx/gtk/win_gtk.h" #include "wx/gtk/win_gtk.h"
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>
// ----------------------------------------------------------------------------
// events
// ----------------------------------------------------------------------------
DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// idle system // idle system
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -52,6 +52,9 @@
#include "wx/dialup.h" #include "wx/dialup.h"
DEFINE_EVENT_TYPE(wxEVT_DIALUP_CONNECTED)
DEFINE_EVENT_TYPE(wxEVT_DIALUP_DISCONNECTED)
// Doesn't yet compile under VC++ 4, BC++, mingw, Watcom C++: no wininet.h // Doesn't yet compile under VC++ 4, BC++, mingw, Watcom C++: no wininet.h
#if !defined(__BORLANDC__) && !defined(__GNUWIN32_OLD__) && !defined(__GNUWIN32__) && !defined(__WATCOMC__) && ! (defined(__VISUALC__) && (__VISUALC__ < 1020)) #if !defined(__BORLANDC__) && !defined(__GNUWIN32_OLD__) && !defined(__GNUWIN32__) && !defined(__WATCOMC__) && ! (defined(__VISUALC__) && (__VISUALC__ < 1020))

View File

@@ -72,9 +72,26 @@ static void wxConvertToMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_
static void wxConvertFromMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_ITEM& tvItem, HWND getFullInfo = 0); static void wxConvertFromMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_ITEM& tvItem, HWND getFullInfo = 0);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// macros // events
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_DRAG)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_RDRAG)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_GET_INFO)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_SET_INFO)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_INSERT_ITEM)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_ACTIVATED)
IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject)

View File

@@ -81,6 +81,9 @@
// event table // event table
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
BEGIN_EVENT_TABLE(wxNotebook, wxControl) BEGIN_EVENT_TABLE(wxNotebook, wxControl)
EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange)

View File

@@ -46,6 +46,9 @@
IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING)
BEGIN_EVENT_TABLE(wxTabCtrl, wxControl) BEGIN_EVENT_TABLE(wxTabCtrl, wxControl)
EVT_SYS_COLOUR_CHANGED(wxTabCtrl::OnSysColourChanged) EVT_SYS_COLOUR_CHANGED(wxTabCtrl::OnSysColourChanged)
END_EVENT_TABLE() END_EVENT_TABLE()

View File

@@ -88,6 +88,29 @@
// looks quite ugly. // looks quite ugly.
#define wxUSE_CHECKBOXES_IN_MULTI_SEL_TREE 0 #define wxUSE_CHECKBOXES_IN_MULTI_SEL_TREE 0
// ----------------------------------------------------------------------------
// events
// ----------------------------------------------------------------------------
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_DRAG)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_RDRAG)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_LABEL_EDIT)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_DELETE_ITEM)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_GET_INFO)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SET_INFO)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDING)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSING)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGING)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_KEY_DOWN)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_ACTIVATED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_DRAG)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// private functions // private functions
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -46,6 +46,9 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <errno.h> #include <errno.h>
DEFINE_EVENT_TYPE(wxEVT_DIALUP_CONNECTED)
DEFINE_EVENT_TYPE(wxEVT_DIALUP_DISCONNECTED)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// A class which groups functions dealing with connecting to the network from a // A class which groups functions dealing with connecting to the network from a
// workstation using dial-up access to the net. There is at most one instance // workstation using dial-up access to the net. There is at most one instance