X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/994453b843b007de6367fedbf4a49ac9d920c63c..9ac884500ce30c58e24b0a6af1288b576d2e03e4:/wxPython/src/_window.i?ds=sidebyside diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index 1fdba3305f..c7b21a2a74 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -259,7 +259,7 @@ instead."); - %pythonAppend Destroy "args[0].thisown = 0" + %pythonPrepend Destroy "args[0].this.own(False)" DocDeclStr( virtual bool , Destroy(), "Destroys the window safely. Frames and dialogs are not destroyed @@ -1035,42 +1035,48 @@ its own event handler.", ""); DocDeclStr( void , SetEventHandler( wxEvtHandler *handler ), "Sets the event handler for this window. An event handler is an object -that is capable of processing the events sent to a window. By default, -the window is its own event handler, but an application may wish to -substitute another, for example to allow central implementation of -event-handling for a variety of different window classes. +that is capable of processing the events sent to a window. (In other +words, is able to dispatch the events to handler function.) By +default, the window is its own event handler, but an application may +wish to substitute another, for example to allow central +implementation of event-handling for a variety of different window +classes. It is usually better to use `wx.Window.PushEventHandler` since this sets up a chain of event handlers, where an event not handled by one event -handler is handed to the next one in the chain.", ""); +handler is handed off to the next one in the chain.", ""); DocDeclStr( void , PushEventHandler( wxEvtHandler *handler ), "Pushes this event handler onto the event handler stack for the window. An event handler is an object that is capable of processing the events -sent to a window. By default, the window is its own event handler, but -an application may wish to substitute another, for example to allow -central implementation of event-handling for a variety of different -window classes. +sent to a window. (In other words, is able to dispatch the events to +handler function.) By default, the window is its own event handler, +but an application may wish to substitute another, for example to +allow central implementation of event-handling for a variety of +different window classes. wx.Window.PushEventHandler allows an application to set up a chain of event handlers, where an event not handled by one event handler is -handed to the next one in the chain. Use `wx.Window.PopEventHandler` to -remove the event handler.", ""); +handed to the next one in the chain. Use `wx.Window.PopEventHandler` +to remove the event handler. Ownership of the handler is *not* given +to the window, so you should be sure to pop the handler before the +window is destroyed and either let PopEventHandler destroy it, or call +its Destroy method yourself.", ""); DocDeclStr( wxEvtHandler *, PopEventHandler( bool deleteHandler = false ), "Removes and returns the top-most event handler on the event handler stack. If deleteHandler is True then the wx.EvtHandler object will be -destroyed after it is popped.", ""); +destroyed after it is popped, and ``None`` will be returned instead.", ""); DocDeclStr( bool , RemoveEventHandler(wxEvtHandler *handler), "Find the given handler in the event handler chain and remove (but not -delete) it from the event handler chain, return True if it was found +delete) it from the event handler chain, returns True if it was found and False otherwise (this also results in an assert failure so this function should only be called when the handler is supposed to be there.)", ""); @@ -1271,7 +1277,7 @@ be repainted. This is the same as Refresh but has a nicer syntax.", ""); window instead of waiting for the EVT_PAINT event to happen, (normally this would usually only happen when the flow of control returns to the event loop.) Notice that this function doesn't refresh the window and -does nothing if the window has been already repainted. Use Refresh +does nothing if the window has been already repainted. Use `Refresh` first if you want to immediately redraw the window (or some portion of it) unconditionally.", ""); @@ -1318,6 +1324,13 @@ times that Freeze was before the window will be updated.", ""); "Call this function to prepare the device context for drawing a scrolled image. It sets the device origin according to the current scroll position.", ""); + + DocDeclStr( + virtual bool , IsDoubleBuffered() const, + "Returns ``True`` if the window contents is double-buffered by the +system, i.e. if any drawing done on the window is really done on a +temporary backing surface and transferred to the screen all at once +later.", ""); DocDeclStr(