// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef _WX_EVENT_H__
-#define _WX_EVENT_H__
+#ifndef _WX_EVENT_H_
+#define _WX_EVENT_H_
#include "wx/defs.h"
#include "wx/cpp.h"
#include "wx/cursor.h"
#endif
-#include "wx/thread.h"
-
#include "wx/dynarray.h"
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_BASE wxList;
-
+class WXDLLIMPEXP_FWD_BASE wxList;
+#if wxUSE_THREADS
+ class WXDLLIMPEXP_FWD_BASE wxCriticalSection;
+#endif
#if wxUSE_GUI
- class WXDLLIMPEXP_CORE wxDC;
- class WXDLLIMPEXP_CORE wxMenu;
- class WXDLLIMPEXP_CORE wxWindow;
- class WXDLLIMPEXP_CORE wxWindowBase;
+ class WXDLLIMPEXP_FWD_CORE wxDC;
+ class WXDLLIMPEXP_FWD_CORE wxMenu;
+ class WXDLLIMPEXP_FWD_CORE wxWindow;
+ class WXDLLIMPEXP_FWD_CORE wxWindowBase;
#endif // wxUSE_GUI
-class WXDLLIMPEXP_BASE wxEvtHandler;
+class WXDLLIMPEXP_FWD_BASE wxEvtHandler;
// ----------------------------------------------------------------------------
// Event types
typedef int wxEventType;
+#define wxEVT_ANY ((wxEventType)-1)
+
// this is used to make the event table entry type safe, so that for an event
// handler only a function with proper parameter list can be given.
#define wxStaticCastEvent(type, val) wx_static_cast(type, val)
-// in previous versions of wxWidgets the event types used to be constants
-// which created difficulties with custom/user event types definition
-//
-// starting from wxWidgets 2.4 the event types are now dynamically assigned
-// using wxNewEventType() which solves this problem, however at price of
-// several incompatibilities:
-//
-// a) event table macros declaration changed, it now uses wxEventTableEntry
-// ctor instead of initialisation from an agregate - the macro
-// DECLARE_EVENT_TABLE_ENTRY may be used to write code which can compile
-// with all versions of wxWidgets
-//
-// b) event types can't be used as switch() cases as they're not really
-// constant any more - there is no magic solution here, you just have to
-// change the switch()es to if()s
-//
-// if these are real problems for you, define WXWIN_COMPATIBILITY_EVENT_TYPES
-// as 1 to get 100% old behaviour, however you won't be able to use the
-// libraries using the new dynamic event type allocation in such case, so avoid
-// it if possible.
-#ifndef WXWIN_COMPATIBILITY_EVENT_TYPES
- #define WXWIN_COMPATIBILITY_EVENT_TYPES 0
-#endif
-
-#if WXWIN_COMPATIBILITY_EVENT_TYPES
-
-#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
- { type, winid, 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_LOCAL_EVENT_TYPE(name, value) name = wxEVT_USER_FIRST + value,
-#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \
- DECLARE_LOCAL_EVENT_TYPE(name, value)
-#define DEFINE_EVENT_TYPE(name)
-#define DEFINE_LOCAL_EVENT_TYPE(name)
-
-
-#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
-
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
wxEventTableEntry(type, winid, idLast, fn, obj)
// generate a new unique event type
extern WXDLLIMPEXP_BASE wxEventType wxNewEventType();
-#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
-
BEGIN_DECLARE_EVENT_TYPES()
-
-#if WXWIN_COMPATIBILITY_EVENT_TYPES
- wxEVT_NULL = 0,
- wxEVT_FIRST = 10000,
- wxEVT_USER_FIRST = wxEVT_FIRST + 2000,
-#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
// it is important to still have these as constants to avoid
// initialization order related problems
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_NULL, 0)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_FIRST, 10000)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_USER_FIRST, wxEVT_FIRST + 2000)
-#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
DECLARE_EVENT_TYPE(wxEVT_COMMAND_BUTTON_CLICKED, 1)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_CHECKBOX_CLICKED, 2)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LISTBOX_SELECTED, 4)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 5)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 6)
- // now they are in wx/textctrl.h
-#if WXWIN_COMPATIBILITY_EVENT_TYPES
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_UPDATED, 7)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_ENTER, 8)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_URL, 13)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_MAXLEN, 14)
-#endif // WXWIN_COMPATIBILITY_EVENT_TYPES
DECLARE_EVENT_TYPE(wxEVT_COMMAND_MENU_SELECTED, 9)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_SLIDER_UPDATED, 10)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_RADIOBOX_SELECTED, 11)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TOOL_ENTER, 17)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPINCTRL_UPDATED, 18)
+ // Toolbar dropdown arrows
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, 19)
+
// Sockets and timers send events, too
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_SOCKET, 50)
- DECLARE_EVENT_TYPE(wxEVT_TIMER , 80)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_TIMER , 80)
// Mouse event types
DECLARE_EVENT_TYPE(wxEVT_LEFT_DOWN, 100)
DECLARE_EVENT_TYPE(wxEVT_KILL_FOCUS, 113)
DECLARE_EVENT_TYPE(wxEVT_CHILD_FOCUS, 114)
DECLARE_EVENT_TYPE(wxEVT_MOUSEWHEEL, 115)
+ DECLARE_EVENT_TYPE(wxEVT_AUX1_DOWN, 116)
+ DECLARE_EVENT_TYPE(wxEVT_AUX1_UP, 117)
+ DECLARE_EVENT_TYPE(wxEVT_AUX1_DCLICK, 118)
+ DECLARE_EVENT_TYPE(wxEVT_AUX2_DOWN, 119)
+ DECLARE_EVENT_TYPE(wxEVT_AUX2_UP, 120)
+ DECLARE_EVENT_TYPE(wxEVT_AUX2_DCLICK, 121)
// Non-client mouse events
DECLARE_EVENT_TYPE(wxEVT_NC_LEFT_DOWN, 200)
DECLARE_EVENT_TYPE(wxEVT_UPDATE_UI, 440)
DECLARE_EVENT_TYPE(wxEVT_SIZING, 441)
DECLARE_EVENT_TYPE(wxEVT_MOVING, 442)
- DECLARE_EVENT_TYPE(wxEVT_HIBERNATE, 443)
+ DECLARE_EVENT_TYPE(wxEVT_MOVE_START, 443)
+ DECLARE_EVENT_TYPE(wxEVT_MOVE_END, 444)
+ DECLARE_EVENT_TYPE(wxEVT_HIBERNATE, 445)
// more power events follow -- see wx/power.h
// Clipboard events
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_COPY, 444)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_CUT, 445)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_PASTE, 446)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_COPY, 446)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_CUT, 447)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_PASTE, 448)
// Generic command events
// Note: a click is a higher-level event than button down/up
// wx/textctrl.h in all ports [yet], so declare it here as well
//
// still, any new code using it should include wx/textctrl.h explicitly
-#if !WXWIN_COMPATIBILITY_EVENT_TYPES
- extern const wxEventType WXDLLIMPEXP_CORE wxEVT_COMMAND_TEXT_UPDATED;
-#endif
+extern const wxEventType WXDLLIMPEXP_CORE wxEVT_COMMAND_TEXT_UPDATED;
// the predefined constants for the number of times we propagate event
// upwards window child-parent chain
// to allow the event processing by the base classes (calling event.Skip()
// is the analog of calling the base class version of a virtual function)
void Skip(bool skip = true) { m_skipped = skip; }
- bool GetSkipped() const { return m_skipped; };
+ bool GetSkipped() const { return m_skipped; }
// this function is used to create a copy of the event polymorphically and
// all derived classes must implement it because otherwise wxPostEvent()
m_propagationLevel = propagationLevel;
}
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
protected:
-#endif
wxObject* m_eventObject;
wxEventType m_eventType;
long m_timeStamp;
// backwards compatibility as it is new
int m_propagationLevel;
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
protected:
-#endif
bool m_skipped;
bool m_isCommandEvent;
private:
// it needs to access our m_propagationLevel
- friend class WXDLLIMPEXP_BASE wxPropagateOnce;
+ friend class WXDLLIMPEXP_FWD_BASE wxPropagateOnce;
DECLARE_ABSTRACT_CLASS(wxEvent)
};
DECLARE_NO_COPY_CLASS(wxPropagateOnce)
};
+
#if wxUSE_GUI
wxEVT_COMMAND_TOGGLEBUTTON_CLICKED
*/
-#if WXWIN_COMPATIBILITY_2_4
-// Backwards compatibility for wxCommandEvent::m_commandString, will lead to compilation errors in some cases of usage
-class WXDLLIMPEXP_CORE wxCommandEvent;
-
-class WXDLLIMPEXP_CORE wxCommandEventStringHelper
-{
-public:
- wxCommandEventStringHelper(wxCommandEvent * evt)
- : m_evt(evt)
- { }
-
- void operator=(const wxString &str);
- operator wxString();
- const wxChar* c_str() const;
-
-private:
- wxCommandEvent* m_evt;
-};
-#endif
-
class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent
{
public:
wxCommandEvent(const wxCommandEvent& event)
: wxEvent(event),
-#if WXWIN_COMPATIBILITY_2_4
- m_commandString(this),
-#endif
m_cmdString(event.m_cmdString),
m_commandInt(event.m_commandInt),
m_extraLong(event.m_extraLong),
virtual wxEvent *Clone() const { return new wxCommandEvent(*this); }
-#if WXWIN_COMPATIBILITY_2_4
-public:
- wxCommandEventStringHelper m_commandString;
-#else
protected:
-#endif
wxString m_cmdString; // String event argument
int m_commandInt;
long m_extraLong; // Additional information (e.g. select/deselect)
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCommandEvent)
};
-#if WXWIN_COMPATIBILITY_2_4
-inline void wxCommandEventStringHelper::operator=(const wxString &str)
-{
- m_evt->SetString(str);
-}
-
-inline wxCommandEventStringHelper::operator wxString()
-{
- return m_evt->GetString();
-}
-
-inline const wxChar* wxCommandEventStringHelper::c_str() const
-{
- return m_evt->GetString().c_str();
-}
-#endif
-
// this class adds a possibility to react (from the user) code to a control
// notification: allow or veto the operation being reported.
class WXDLLIMPEXP_CORE wxNotifyEvent : public wxCommandEvent
virtual wxEvent *Clone() const { return new wxScrollWinEvent(*this); }
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
protected:
-#endif
int m_commandInt;
long m_extraLong;
wxMOUSE_BTN_NONE = 0,
wxMOUSE_BTN_LEFT = 1,
wxMOUSE_BTN_MIDDLE = 2,
- wxMOUSE_BTN_RIGHT = 3
+ wxMOUSE_BTN_RIGHT = 3,
+ wxMOUSE_BTN_AUX1 = 4,
+ wxMOUSE_BTN_AUX2 = 5,
+ wxMOUSE_BTN_MAX
};
class WXDLLIMPEXP_CORE wxMouseEvent : public wxEvent
{
public:
wxMouseEvent(wxEventType mouseType = wxEVT_NULL);
- wxMouseEvent(const wxMouseEvent& event) : wxEvent(event)
+ wxMouseEvent(const wxMouseEvent& event) : wxEvent(event)
{ Assign(event); }
// Was it a button event? (*doesn't* mean: is any button *down*?)
bool LeftDown() const { return (m_eventType == wxEVT_LEFT_DOWN); }
bool MiddleDown() const { return (m_eventType == wxEVT_MIDDLE_DOWN); }
bool RightDown() const { return (m_eventType == wxEVT_RIGHT_DOWN); }
+ bool Aux1Down() const { return (m_eventType == wxEVT_AUX1_DOWN); }
+ bool Aux2Down() const { return (m_eventType == wxEVT_AUX2_DOWN); }
bool LeftUp() const { return (m_eventType == wxEVT_LEFT_UP); }
bool MiddleUp() const { return (m_eventType == wxEVT_MIDDLE_UP); }
bool RightUp() const { return (m_eventType == wxEVT_RIGHT_UP); }
+ bool Aux1Up() const { return (m_eventType == wxEVT_AUX1_UP); }
+ bool Aux2Up() const { return (m_eventType == wxEVT_AUX2_UP); }
bool LeftDClick() const { return (m_eventType == wxEVT_LEFT_DCLICK); }
bool MiddleDClick() const { return (m_eventType == wxEVT_MIDDLE_DCLICK); }
bool RightDClick() const { return (m_eventType == wxEVT_RIGHT_DCLICK); }
+ bool Aux1DClick() const { return (m_eventType == wxEVT_AUX1_UP); }
+ bool Aux2DClick() const { return (m_eventType == wxEVT_AUX2_UP); }
// Find the current state of the mouse buttons (regardless
// of current event type)
bool LeftIsDown() const { return m_leftDown; }
bool MiddleIsDown() const { return m_middleDown; }
bool RightIsDown() const { return m_rightDown; }
+ bool Aux1IsDown() const { return m_aux1Down; }
+ bool Aux2IsDown() const { return m_aux2Down; }
// True if a button is down and the mouse is moving
bool Dragging() const
// True if the mouse is just leaving the window
bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); }
+ // Returns the number of mouse clicks associated with this event.
+ int GetClickCount() const { return m_clickCount; }
+
+
// Find the position of the event
void GetPosition(wxCoord *xpos, wxCoord *ypos) const
{
// should occur for each delta.
int GetWheelDelta() const { return m_wheelDelta; }
+ // Gets the axis the wheel operation concerns, 0 being the y axis as on
+ // most mouse wheels, 1 is the x axis for things like MightyMouse scrolls
+ // or horizontal trackpad scrolling
+ int GetWheelAxis() const { return m_wheelAxis; }
+
// Returns the configured number of lines (or whatever) to be scrolled per
// wheel action. Defaults to one.
int GetLinesPerAction() const { return m_linesPerAction; }
bool m_leftDown;
bool m_middleDown;
bool m_rightDown;
+ bool m_aux1Down;
+ bool m_aux2Down;
bool m_controlDown;
bool m_shiftDown;
bool m_altDown;
bool m_metaDown;
+ int m_clickCount;
+
+ int m_wheelAxis;
int m_wheelRotation;
int m_wheelDelta;
int m_linesPerAction;
// Get Y position
wxCoord GetY() const { return m_y; }
-#if WXWIN_COMPATIBILITY_2_6
- // deprecated, Use GetKeyCode instead.
- wxDEPRECATED( long KeyCode() const );
-#endif // WXWIN_COMPATIBILITY_2_6
-
virtual wxEvent *Clone() const { return new wxKeyEvent(*this); }
// we do need to copy wxKeyEvent sometimes (in wxTreeCtrl code, for
virtual wxEvent *Clone() const { return new wxMoveEvent(*this); }
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
protected:
-#endif
wxPoint m_pos;
wxRect m_rect;
virtual wxEvent *Clone() const { return new wxEraseEvent(*this); }
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
protected:
-#endif
wxDC *m_dc;
private:
class WXDLLIMPEXP_CORE wxJoystickEvent : public wxEvent
{
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
protected:
-#endif
wxPoint m_pos;
int m_zPosition;
int m_buttonChange; // Which button changed?
virtual wxEvent *Clone() const { return new wxMouseCaptureChangedEvent(*this); }
- wxWindow* GetCapturedWindow() const { return m_gainedCapture; };
+ wxWindow* GetCapturedWindow() const { return m_gainedCapture; }
private:
wxWindow* m_gainedCapture;
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxContextMenuEvent)
};
+#endif // wxUSE_GUI
+
// Idle event
/*
wxEVT_IDLE
wxIDLE_PROCESS_SPECIFIED
};
-class WXDLLIMPEXP_CORE wxIdleEvent : public wxEvent
+class WXDLLIMPEXP_BASE wxIdleEvent : public wxEvent
{
public:
wxIdleEvent()
// Returns the idle event mode
static wxIdleMode GetMode() { return sm_idleMode; }
- // Can we send an idle event?
- static bool CanSend(wxWindow* win);
-
protected:
bool m_requestMore;
static wxIdleMode sm_idleMode;
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIdleEvent)
};
-#endif // wxUSE_GUI
-
/* TODO
wxEVT_MOUSE_CAPTURE_CHANGED,
wxEVT_SETTING_CHANGED, // WM_WININICHANGE (NT) / WM_SETTINGCHANGE (Win95)
// as a wxObject method even though it can only be a wxEvtHandler one
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 WXDLLIMPEXP_BASE 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
// entries
struct WXDLLIMPEXP_BASE wxEventTableEntryBase
DECLARE_NO_COPY_CLASS(wxDynamicEventTableEntry)
};
-#endif // !WXWIN_COMPATIBILITY_EVENT_TYPES
-
// ----------------------------------------------------------------------------
// wxEventTable: an array of event entries terminated with {0, 0, 0, 0, 0}
// ----------------------------------------------------------------------------
// Clear table
void Clear();
+#if defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING
// Clear all tables
static void ClearAll();
+#endif // __WXDEBUG__ && wxUSE_MEMORY_TRACING
protected:
// Init the hash table with the entries of the static event table.
// process an event right now
virtual bool ProcessEvent(wxEvent& event);
+ // Process an event by calling ProcessEvent and handling any exceptions
+ // thrown by event handlers. It's mostly useful when processing wx events
+ // when called from C code (e.g. in GTK+ callback) when the exception
+ // wouldn't correctly propagate to wxEventLoop.
+ bool SafelyProcessEvent(wxEvent& event);
+
// add an event to be processed later
- void AddPendingEvent(wxEvent& event);
+ virtual void AddPendingEvent(const wxEvent& event);
void ProcessPendingEvents();
#if wxUSE_THREADS
- bool ProcessThreadEvent(wxEvent& event);
+ bool ProcessThreadEvent(const wxEvent& event);
#endif
// Dynamic association of a member function handler with the event handler,
// Post a message to the given eventhandler which will be processed during the
// next event loop iteration
-inline void wxPostEvent(wxEvtHandler *dest, wxEvent& event)
+inline void wxPostEvent(wxEvtHandler *dest, const wxEvent& event)
{
wxCHECK_RET( dest, wxT("need an object to post event to in wxPostEvent") );
#if wxUSE_GUI
+// ----------------------------------------------------------------------------
+// wxEventBlocker: helper class to temporarily disable event handling for a window
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxEventBlocker : public wxEvtHandler
+{
+public:
+ wxEventBlocker(wxWindow *win, wxEventType type = wxEVT_ANY);
+ virtual ~wxEventBlocker();
+
+ void Block(wxEventType type)
+ {
+ m_eventsToBlock.push_back(type);
+ }
+
+ virtual bool ProcessEvent(wxEvent& event);
+
+protected:
+ wxArrayInt m_eventsToBlock;
+ wxWindow *m_window;
+
+ DECLARE_NO_COPY_CLASS(wxEventBlocker)
+};
+
typedef void (wxEvtHandler::*wxCommandEventFunction)(wxCommandEvent&);
typedef void (wxEvtHandler::*wxScrollEventFunction)(wxScrollEvent&);
typedef void (wxEvtHandler::*wxScrollWinEventFunction)(wxScrollWinEvent&);
typedef void (wxEvtHandler::*wxMouseCaptureLostEventFunction)(wxMouseCaptureLostEvent&);
typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&);
-// these typedefs don't have the same name structure as the others, keep for
-// backwards compatibility only
-#if WXWIN_COMPATIBILITY_2_4
- typedef wxSysColourChangedEventFunction wxSysColourChangedFunction;
- typedef wxDisplayChangedEventFunction wxDisplayChangedFunction;
-#endif // WXWIN_COMPATIBILITY_2_4
-
#define wxCommandEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCommandEventFunction, &func)
#define EVT_SIZING(func) wx__DECLARE_EVT0(wxEVT_SIZING, wxSizeEventHandler(func))
#define EVT_MOVE(func) wx__DECLARE_EVT0(wxEVT_MOVE, wxMoveEventHandler(func))
#define EVT_MOVING(func) wx__DECLARE_EVT0(wxEVT_MOVING, wxMoveEventHandler(func))
+#define EVT_MOVE_START(func) wx__DECLARE_EVT0(wxEVT_MOVE_START, wxMoveEventHandler(func))
+#define EVT_MOVE_END(func) wx__DECLARE_EVT0(wxEVT_MOVE_END, wxMoveEventHandler(func))
#define EVT_CLOSE(func) wx__DECLARE_EVT0(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(func))
#define EVT_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_END_SESSION, wxCloseEventHandler(func))
#define EVT_QUERY_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_QUERY_END_SESSION, wxCloseEventHandler(func))
#define EVT_LEAVE_WINDOW(func) wx__DECLARE_EVT0(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(func))
#define EVT_ENTER_WINDOW(func) wx__DECLARE_EVT0(wxEVT_ENTER_WINDOW, wxMouseEventHandler(func))
#define EVT_MOUSEWHEEL(func) wx__DECLARE_EVT0(wxEVT_MOUSEWHEEL, wxMouseEventHandler(func))
+#define EVT_MOUSE_AUX1_DOWN(func) wx__DECLARE_EVT0(wxEVT_AUX1_DOWN, wxMouseEventHandler(func))
+#define EVT_MOUSE_AUX1_UP(func) wx__DECLARE_EVT0(wxEVT_AUX1_UP, wxMouseEventHandler(func))
+#define EVT_MOUSE_AUX1_DCLICK(func) wx__DECLARE_EVT0(wxEVT_AUX1_DCLICK, wxMouseEventHandler(func))
+#define EVT_MOUSE_AUX2_DOWN(func) wx__DECLARE_EVT0(wxEVT_AUX2_DOWN, wxMouseEventHandler(func))
+#define EVT_MOUSE_AUX2_UP(func) wx__DECLARE_EVT0(wxEVT_AUX2_UP, wxMouseEventHandler(func))
+#define EVT_MOUSE_AUX2_DCLICK(func) wx__DECLARE_EVT0(wxEVT_AUX2_DCLICK, wxMouseEventHandler(func))
// All mouse events
#define EVT_MOUSE_EVENTS(func) \
EVT_LEFT_DOWN(func) \
EVT_LEFT_UP(func) \
+ EVT_LEFT_DCLICK(func) \
EVT_MIDDLE_DOWN(func) \
EVT_MIDDLE_UP(func) \
+ EVT_MIDDLE_DCLICK(func) \
EVT_RIGHT_DOWN(func) \
EVT_RIGHT_UP(func) \
- EVT_MOTION(func) \
- EVT_LEFT_DCLICK(func) \
- EVT_MIDDLE_DCLICK(func) \
EVT_RIGHT_DCLICK(func) \
+ EVT_MOUSE_AUX1_DOWN(func) \
+ EVT_MOUSE_AUX1_UP(func) \
+ EVT_MOUSE_AUX1_DCLICK(func) \
+ EVT_MOUSE_AUX2_DOWN(func) \
+ EVT_MOUSE_AUX2_UP(func) \
+ EVT_MOUSE_AUX2_DCLICK(func) \
+ EVT_MOTION(func) \
EVT_LEAVE_WINDOW(func) \
EVT_ENTER_WINDOW(func) \
EVT_MOUSEWHEEL(func)
#define EVT_VLBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_VLBOX_SELECTED, winid, wxCommandEventHandler(func))
#define EVT_COMBOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_COMBOBOX_SELECTED, winid, wxCommandEventHandler(func))
#define EVT_TOOL(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_CLICKED, winid, wxCommandEventHandler(func))
+#define EVT_TOOL_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, winid, wxCommandEventHandler(func))
#define EVT_TOOL_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_CLICKED, id1, id2, wxCommandEventHandler(func))
#define EVT_TOOL_RCLICKED(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_RCLICKED, winid, wxCommandEventHandler(func))
#define EVT_TOOL_RCLICKED_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, wxCommandEventHandler(func))
#define EVT_JOY_MOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_MOVE, wxJoystickEventHandler(func))
#define EVT_JOY_ZMOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_ZMOVE, wxJoystickEventHandler(func))
-// These are obsolete, see _BUTTON_ events
-#if WXWIN_COMPATIBILITY_2_4
- #define EVT_JOY_DOWN(func) EVT_JOY_BUTTON_DOWN(func)
- #define EVT_JOY_UP(func) EVT_JOY_BUTTON_UP(func)
-#endif // WXWIN_COMPATIBILITY_2_4
-
// All joystick events
#define EVT_JOYSTICK_EVENTS(func) \
EVT_JOY_BUTTON_DOWN(func) \
#endif // wxUSE_GUI
-#endif // _WX_EVENT_H__
+#endif // _WX_EVENT_H_