X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ecece7e042ddd7a8968ddccdf6dd4e982b5a15a..fe45b493dcc42fea4ad4f781a4fb7844d2e95fd0:/wxPython/src/_event.i?ds=sidebyside diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index 0632593d0e..6a2333ddfe 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -37,6 +37,7 @@ enum Propagation_state wxEventType wxNewEventType(); +%constant wxEventType wxEVT_ANY; %constant wxEventType wxEVT_NULL; %constant wxEventType wxEVT_FIRST; @@ -60,6 +61,7 @@ wxEventType wxNewEventType(); %constant wxEventType wxEVT_COMMAND_COMBOBOX_SELECTED; %constant wxEventType wxEVT_COMMAND_TOOL_RCLICKED; %constant wxEventType wxEVT_COMMAND_TOOL_ENTER; +%constant wxEventType wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED; // Mouse event types %constant wxEventType wxEVT_LEFT_DOWN; @@ -353,6 +355,7 @@ EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2) EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1) EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2) EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1) +EVT_TOOL_DROPDOWN = wx.PyEventBinder( wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, 1) EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1) @@ -662,7 +665,7 @@ false otherwise (if it was).", ""); DocStr(wxScrollEvent, "A scroll event holds information about events sent from stand-alone scrollbars and sliders. Note that scrolled windows do not send -instnaces of this event class, but send the `wx.ScrollWinEvent` +instances of this event class, but send the `wx.ScrollWinEvent` instead.", " Events @@ -1086,6 +1089,12 @@ have been accumulated before scrolling.", ""); taken, and one such action (for example, scrolling one increment) should occur for each delta.", ""); + DocDeclStr( + int , GetWheelAxis() const, + "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.", ""); + DocDeclStr( int , GetLinesPerAction() const, @@ -2675,5 +2684,20 @@ internally.", ""); } +//--------------------------------------------------------------------------- + +DocStr(wxEventBlocker, +"Helper class to temporarily disable event handling for a window.", ""); + +class wxEventBlocker : public wxEvtHandler +{ +public: + wxEventBlocker(wxWindow *win, wxEventType type = wxEVT_ANY); + virtual ~wxEventBlocker(); + + void Block(wxEventType type); +}; + + //--------------------------------------------------------------------------- //---------------------------------------------------------------------------