X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76b8fa1d2077661a6710f532eb141468ab36c1c8..a69276900cfae8bf48b5ba5af6811fb89675ba33:/wxPython/src/_event.i diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index 6d06bd26e9..0632593d0e 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -433,14 +433,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, @@ -678,8 +677,8 @@ Events EVT_SCROLL_PAGEDOWN page down events EVT_SCROLL_THUMBTRACK thumbtrack events (frequent events sent as the user drags the 'thumb') - EVT_SCROLL_THUMBRELEASE thumb release events. - EVT_SCROLL_ENDSCROLL End of scrolling + EVT_SCROLL_THUMBRELEASE thumb release events + EVT_SCROLL_CHANGED End of scrolling ======================= ========================================== Note @@ -687,17 +686,17 @@ Note The EVT_SCROLL_THUMBRELEASE event is only emitted when actually dragging the thumb using the mouse and releasing it (This EVT_SCROLL_THUMBRELEASE event is also followed by an - EVT_SCROLL_ENDSCROLL event). + EVT_SCROLL_CHANGED event). - The EVT_SCROLL_ENDSCROLL event also occurs when using the keyboard + The EVT_SCROLL_CHANGED event also occurs when using the keyboard to change the thumb position, and when clicking next to the thumb (In all these cases the EVT_SCROLL_THUMBRELEASE event does not happen). - In short, the EVT_SCROLL_ENDSCROLL event is triggered when + In short, the EVT_SCROLL_CHANGED event is triggered when scrolling/ moving has finished. The only exception (unfortunately) is that changing the thumb position using the mousewheel does give - a EVT_SCROLL_THUMBRELEASE event but NOT an EVT_SCROLL_ENDSCROLL + a EVT_SCROLL_THUMBRELEASE event but NOT an EVT_SCROLL_CHANGED event. "); @@ -720,6 +719,9 @@ the scrollbar.", ""); void SetOrientation(int orient); void SetPosition(int pos); + + %property(Orientation, GetOrientation, SetOrientation, doc="See `GetOrientation` and `SetOrientation`"); + %property(Position, GetPosition, SetPosition, doc="See `GetPosition` and `SetPosition`"); }; @@ -742,8 +744,8 @@ Events EVT_SCROLLWIN_PAGEDOWN page down events EVT_SCROLLWIN_THUMBTRACK thumbtrack events (frequent events sent as the user drags the 'thumb') - EVT_SCROLLWIN_THUMBRELEASE thumb release events. - EVT_SCROLLWIN_ENDSCROLL End of scrolling + EVT_SCROLLWIN_THUMBRELEASE thumb release events + EVT_SCROLLWIN_CHANGED End of scrolling ========================== ========================================== :see: `wx.ScrollEvent` @@ -768,6 +770,9 @@ need to query the window itself for the current position in that case.", ""); void SetOrientation(int orient); void SetPosition(int pos); + + %property(Orientation, GetOrientation, SetOrientation, doc="See `GetOrientation` and `SetOrientation`"); + %property(Position, GetPosition, SetPosition, doc="See `GetPosition` and `SetPosition`"); }; //--------------------------------------------------------------------------- @@ -837,6 +842,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: @@ -855,6 +863,8 @@ public: * wxEVT_MOTION * wxEVT_MOUSEWHEEL ", ""); + // Turn it back on again + %typemap(out) wxMouseEvent* { $result = wxPyMake_wxObject($1, $owner); } DocDeclStr( bool , IsButton() const, @@ -1104,6 +1114,15 @@ public: int m_wheelRotation; int m_wheelDelta; int m_linesPerAction; + + %property(Button, GetButton, doc="See `GetButton`"); + %property(LinesPerAction, GetLinesPerAction, doc="See `GetLinesPerAction`"); + %property(LogicalPosition, GetLogicalPosition, doc="See `GetLogicalPosition`"); + %property(Position, GetPosition, doc="See `GetPosition`"); + %property(WheelDelta, GetWheelDelta, doc="See `GetWheelDelta`"); + %property(WheelRotation, GetWheelRotation, doc="See `GetWheelRotation`"); + %property(X, GetX, doc="See `GetX`"); + %property(Y, GetY, doc="See `GetY`"); }; //--------------------------------------------------------------------------- @@ -1146,6 +1165,9 @@ public: bool , HasCursor() const, "Returns true if the cursor specified by this event is a valid cursor.", ""); + %property(Cursor, GetCursor, SetCursor, doc="See `GetCursor` and `SetCursor`"); + %property(X, GetX, doc="See `GetX`"); + %property(Y, GetY, doc="See `GetY`"); }; //--------------------------------------------------------------------------- @@ -1463,9 +1485,11 @@ event.", ""); } } -public: wxSize m_size; wxRect m_rect; + + %property(Rect, GetRect, SetRect, doc="See `GetRect` and `SetRect`"); + %property(Size, GetSize, SetSize, doc="See `GetSize` and `SetSize`"); }; @@ -1495,6 +1519,10 @@ public: m_pos = property(GetPosition, SetPosition) m_rect = property(GetRect, SetRect) } + + %property(Position, GetPosition, SetPosition, doc="See `GetPosition` and `SetPosition`"); + %property(Rect, GetRect, SetRect, doc="See `GetRect` and `SetRect`"); + }; //--------------------------------------------------------------------------- @@ -1598,9 +1626,14 @@ Warning: the window returned may be None!", ""); %newgroup; DocStr(wxChildFocusEvent, -"wx.ChildFocusEvent notifies the parent that a child has received the -focus. Unlike `wx.FocusEvent` it is propagated up the window -heirarchy.", ""); +"A child focus event is sent to a (parent-)window when one of its child +windows gains focus, so that the window could restore the focus back +to its corresponding child if it loses it now and regains later. + +Notice that child window is the direct child of the window receiving +the event, and so may not be the actual widget recieving focus if it +is further down the containment heirarchy. Use `wx.Window.FindFocus` +to get the widget that is actually receiving focus.", ""); class wxChildFocusEvent : public wxCommandEvent @@ -1612,7 +1645,8 @@ public: DocDeclStr( wxWindow *, GetWindow() const, - "The window which has just received the focus.", ""); + "The window, or (grand)parent of the window which has just received the +focus.", ""); %property(Window, GetWindow, doc="See `GetWindow`"); }; @@ -1740,6 +1774,8 @@ be used with the OPEN and CLOSE events.", ""); "Returns the menu which is being opened or closed. This method should only be used with the OPEN and CLOSE events.", ""); + %property(Menu, GetMenu, doc="See `GetMenu`"); + %property(MenuId, GetMenuId, doc="See `GetMenuId`"); }; //--------------------------------------------------------------------------- @@ -1838,6 +1874,7 @@ public: void SetShow(bool show); bool GetShow() const; + %property(Show, GetShow, SetShow, doc="See `GetShow` and `SetShow`"); }; @@ -2131,6 +2168,10 @@ The mode may be one of the following values: all windows, or only to those which specify that they will process the events.", ""); + %property(Checked, GetChecked, Check, doc="See `GetChecked`"); + %property(Enabled, GetEnabled, Enable, doc="See `GetEnabled`"); + %property(Shown, GetShown, Show, doc="See `GetShown`"); + %property(Text, GetText, SetText, doc="See `GetText` and `SetText`"); }; //--------------------------------------------------------------------------- @@ -2180,6 +2221,7 @@ public: "Returns the window that gained the capture, or ``None`` if it was a non-wxWidgets window.", ""); + %property(CapturedWindow, GetCapturedWindow, doc="See `GetCapturedWindow`"); }; //--------------------------------------------------------------------------- @@ -2241,6 +2283,7 @@ public: void SetChangedWindow(wxWindow* win); wxWindow* GetChangedWindow(); + %property(ChangedWindow, GetChangedWindow, SetChangedWindow, doc="See `GetChangedWindow` and `SetChangedWindow`"); }; //--------------------------------------------------------------------------- @@ -2264,6 +2307,8 @@ public: "App should set this if it changes the palette.", ""); bool GetPaletteRealized() const; + + %property(PaletteRealized, GetPaletteRealized, SetPaletteRealized, doc="See `GetPaletteRealized` and `SetPaletteRealized`"); }; //--------------------------------------------------------------------------- @@ -2346,6 +2391,10 @@ This is required for proper navogation over radio buttons.", ""); WinChange, FromTab }; + + %property(CurrentFocus, GetCurrentFocus, SetCurrentFocus, doc="See `GetCurrentFocus` and `SetCurrentFocus`"); + %property(Direction, GetDirection, SetDirection, doc="See `GetDirection` and `SetDirection`"); + }; //--------------------------------------------------------------------------- @@ -2365,6 +2414,7 @@ public: wxWindow *, GetWindow() const, "Returns the window that this event refers to.", ""); + %property(Window, GetWindow, doc="See `GetWindow`"); }; @@ -2386,6 +2436,8 @@ public: DocDeclStr( wxWindow *, GetWindow() const, "Returns the window that this event refers to.", ""); + + %property(Window, GetWindow, doc="See `GetWindow`"); };