From: Robin Dunn Date: Mon, 2 Apr 2007 21:25:19 +0000 (+0000) Subject: Add wx.SizerItem.Assign* methods, deprecate coresponding wx.SizerItem.Set* methods X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/10f9d5a25b323b89bac76904728a82e41cd36236?ds=sidebyside Add wx.SizerItem.Assign* methods, deprecate coresponding wx.SizerItem.Set* methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/src/_sizers.i b/wxPython/src/_sizers.i index ef1ab445c2..bdf9e9641a 100644 --- a/wxPython/src/_sizers.i +++ b/wxPython/src/_sizers.i @@ -361,30 +361,54 @@ added, if needed.", ""); wxWindow *, GetWindow(), "Get the window (if any) that is managed by this sizer item.", ""); - DocDeclStr( - void , SetWindow( wxWindow *window ), - "Set the window to be managed by this sizer item.", ""); - DocDeclStr( wxSizer *, GetSizer(), "Get the subsizer (if any) that is managed by this sizer item.", ""); + DocDeclStr( + wxSize , GetSpacer(), + "Get the size of the spacer managed by this sizer item.", ""); + + + + + DocDeclStr( + void , SetWindow( wxWindow *window ), + "Set the window to be managed by this sizer item.", ""); + %disownarg( wxSizer *sizer ); DocDeclStr( void , SetSizer( wxSizer *sizer ), "Set the subsizer to be managed by this sizer item.", ""); %cleardisown( wxSizer *sizer ); - DocDeclStr( - wxSize , GetSpacer(), - "Get the size of the spacer managed by this sizer item.", ""); + void , SetSpacer( const wxSize &size ), + "Set the size of the spacer to be managed by this sizer item.", ""); + %pythoncode { + SetWindow = wx._deprecated(SetWindow, "Use `AssignWindow` instead.") + SetSizer = wx._deprecated(SetSizer, "Use `AssignSizer` instead.") + SetSpacer = wx._deprecated(SetSpacer, "Use `AssignSpacer` instead.") + } + + + DocDeclStr( - void , SetSpacer( const wxSize &size ), + void , AssignWindow(wxWindow *window), + "Set the window to be managed by this sizer item.", ""); + + DocDeclStr( + void , AssignSizer(wxSizer *sizer), + "Set the subsizer to be managed by this sizer item.", ""); + + DocDeclStr( + void , AssignSpacer(const wxSize& size), "Set the size of the spacer to be managed by this sizer item.", ""); + + DocDeclStr( void , Show( bool show ), @@ -442,10 +466,10 @@ isn't any.", ""); %property(Ratio, GetRatio, SetRatio, doc="See `GetRatio` and `SetRatio`"); %property(Rect, GetRect, doc="See `GetRect`"); %property(Size, GetSize, doc="See `GetSize`"); - %property(Sizer, GetSizer, SetSizer, doc="See `GetSizer` and `SetSizer`"); - %property(Spacer, GetSpacer, SetSpacer, doc="See `GetSpacer` and `SetSpacer`"); + %property(Sizer, GetSizer, AssignSizer, doc="See `GetSizer` and `AssignSizer`"); + %property(Spacer, GetSpacer, AssignSpacer, doc="See `GetSpacer` and `AssignSpacer`"); %property(UserData, GetUserData, SetUserData, doc="See `GetUserData` and `SetUserData`"); - %property(Window, GetWindow, SetWindow, doc="See `GetWindow` and `SetWindow`"); + %property(Window, GetWindow, AssignWindow, doc="See `GetWindow` and `AssignWindow`"); };