X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c86b22b7ee1470917dde2e4eaaf0f878f39c828..88f67c2242209b8a752b515fdec30fd6ef858a18:/wxPython/src/_event.i?ds=sidebyside diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index 62437e014b..553f0e1cf6 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; @@ -842,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: @@ -860,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, @@ -1081,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, @@ -2670,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); +}; + + //--------------------------------------------------------------------------- //---------------------------------------------------------------------------