X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6a223074d30c2ec81b688f2c0f14845fdaa4da81..56ba0394113fe3eba49632c7ad567db9e085ce12:/wxPython/src/_event.i diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index 33f832615a..5f7c7140b4 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; @@ -433,14 +434,13 @@ it returns false. Note: Exists only for optimization purposes.", ""); DocDeclStr( void , Skip(bool skip = true), - "Called by an event handler, it controls whether additional event -handlers bound to this event will be called after the current event -handler returns. Skip(false) (the default setting) will prevent -additional event handlers from being called and control will be -returned to the sender of the event immediately after the current -handler has finished. Skip(True) will cause the event processing -system to continue searching for a handler function for this event. -", ""); + "This method can be used inside an event handler to control whether +further event handlers bound to this event will be called after the +current one returns. Without Skip() (or equivalently if Skip(False) is +used), the event will not be processed any more. If Skip(True) is +called, the event processing system continues searching for a further +handler function for this event, even though it has been processed +already in the current handler.", ""); DocDeclStr( bool , GetSkipped() const, @@ -663,7 +663,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 @@ -843,6 +843,9 @@ enum class wxMouseEvent : public wxEvent { public: + // turn off this typemap + %typemap(out) wxMouseEvent*; + DocCtorStr( wxMouseEvent(wxEventType mouseType = wxEVT_NULL), "Constructs a wx.MouseEvent. Valid event types are: @@ -861,6 +864,8 @@ public: * wxEVT_MOTION * wxEVT_MOUSEWHEEL ", ""); + // Turn it back on again + %typemap(out) wxMouseEvent* { $result = wxPyMake_wxObject($1, $owner); } DocDeclStr( bool , IsButton() const, @@ -1082,6 +1087,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, @@ -2671,5 +2682,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); +}; + + //--------------------------------------------------------------------------- //---------------------------------------------------------------------------