X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b5a79cf542413329210bda962798a269c2091dd..30e24d9dd5a5abf1c9a375ea259eb239b122b7f7:/wxPython/src/_window.i?ds=inline diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index b59bf49633..b10681fce7 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -448,10 +448,10 @@ equal to -1. MoveXY); DocDeclStr( - void , SetBestFittingSize(const wxSize& size=wxDefaultSize), + void , SetInitialSize(const wxSize& size=wxDefaultSize), "A 'Smart' SetSize that will fill in default size components with the window's *best size* values. Also set's the minsize for use with sizers.", ""); - + %pythoncode { SetBestFittingSize = wx._deprecated(SetInitialSize, 'Use `SetInitialSize`') } DocDeclStr( @@ -571,25 +571,23 @@ some properties of the window change.)", ""); DocDeclStr( - wxSize , GetBestFittingSize() const, + wxSize , GetEffectiveMinSize() const, "This function will merge the window's best size into the window's minimum size, giving priority to the min size components, and returns the results. ", ""); - + %pythoncode { GetBestFittingSize = wx._deprecated(GetEffectiveMinSize, 'Use `GetEffectiveMinSize` instead.') } - DocDeclStr( - wxSize , GetAdjustedBestSize() const, - "This method is similar to GetBestSize, except in one -thing. GetBestSize should return the minimum untruncated size of the -window, while this method will return the largest of BestSize and any -user specified minimum size. ie. it is the minimum size the window -should currently be drawn at, not the minimal size it can possibly -tolerate.", ""); + %pythoncode { + def GetAdjustedBestSize(self): + s = self.GetBestSize() + return wx.Size(max(s.width, self.GetMinWidth()), + max(s.height, self.GetMinHeight())) + GetAdjustedBestSize = wx._deprecated(GetAdjustedBestSize, 'Use `GetEffectiveMinSize` instead.') + } - DocDeclStr( void , Center( int direction = wxBOTH ), "Centers the window. The parameter specifies the direction for @@ -670,12 +668,12 @@ the virtual area of the window outside the given bounds.", ""); "", ""); DocDeclStr( - void , SetMinSize(const wxSize& minSize), + virtual void , SetMinSize(const wxSize& minSize), "A more convenient method than `SetSizeHints` for setting just the min size.", ""); DocDeclStr( - void , SetMaxSize(const wxSize& maxSize), + virtual void , SetMaxSize(const wxSize& maxSize), "A more convenient method than `SetSizeHints` for setting just the max size.", ""); @@ -718,6 +716,11 @@ windows it is more or less independent of the screen window size.", ""); GetVirtualSizeTuple); + DocDeclStr( + virtual wxSize , GetWindowBorderSize() const, + "Return the size of the left/right and top/bottom borders.", ""); + + // TODO: using directors? // // Override these methods for windows that have a virtual size // // independent of their client size. eg. the virtual area of a @@ -809,6 +812,12 @@ method.", ""); windows are only available on X platforms.", ""); + DocDeclStr( + bool , ToggleWindowStyle(int flag), + "Turn the flag on if it had been turned off before and vice versa, +returns True if the flag is turned on by this function call.", ""); + + DocDeclStr( virtual void , SetExtraStyle(long exStyle), @@ -1277,7 +1286,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.", ""); @@ -2065,7 +2074,7 @@ opaque.", ""); if hasattr(self, '_setOORInfo'): self._setOORInfo(self) if hasattr(self, '_setCallbackInfo'): - self._setCallbackInfo(self, self.__class__) + self._setCallbackInfo(self, pre.__class__) } %pythoncode { @@ -2079,7 +2088,7 @@ opaque.", ""); %property(AutoLayout, GetAutoLayout, SetAutoLayout, doc="See `GetAutoLayout` and `SetAutoLayout`"); %property(BackgroundColour, GetBackgroundColour, SetBackgroundColour, doc="See `GetBackgroundColour` and `SetBackgroundColour`"); %property(BackgroundStyle, GetBackgroundStyle, SetBackgroundStyle, doc="See `GetBackgroundStyle` and `SetBackgroundStyle`"); - %property(BestFittingSize, GetBestFittingSize, SetBestFittingSize, doc="See `GetBestFittingSize` and `SetBestFittingSize`"); + %property(EffectiveMinSize, GetEffectiveMinSize, doc="See `GetEffectiveMinSize`"); %property(BestSize, GetBestSize, doc="See `GetBestSize`"); %property(BestVirtualSize, GetBestVirtualSize, doc="See `GetBestVirtualSize`"); %property(Border, GetBorder, doc="See `GetBorder`");