X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e81b607b4322af54190484aa7ee34112337a344e..9ac884500ce30c58e24b0a6af1288b576d2e03e4:/wxPython/src/_sizers.i?ds=sidebyside diff --git a/wxPython/src/_sizers.i b/wxPython/src/_sizers.i index a009cad8f1..fed0baca61 100644 --- a/wxPython/src/_sizers.i +++ b/wxPython/src/_sizers.i @@ -229,7 +229,7 @@ added, if needed.", ""); DocDeclStr( - const wxSize& , GetSpacer(), + wxSize , GetSpacer(), "Get the size of the spacer managed by this sizer item.", ""); DocDeclStr( @@ -283,6 +283,20 @@ isn't any.", ""); self->SetUserData(data); } } + + %property(Border, GetBorder, SetBorder, doc="See `GetBorder` and `SetBorder`"); + %property(Flag, GetFlag, SetFlag, doc="See `GetFlag` and `SetFlag`"); + %property(MinSize, GetMinSize, doc="See `GetMinSize`"); + %property(MinSizeWithBorder, GetMinSizeWithBorder, doc="See `GetMinSizeWithBorder`"); + %property(Position, GetPosition, doc="See `GetPosition`"); + %property(Proportion, GetProportion, SetProportion, doc="See `GetProportion` and `SetProportion`"); + %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(UserData, GetUserData, SetUserData, doc="See `GetUserData` and `SetUserData`"); + %property(Window, GetWindow, SetWindow, doc="See `GetWindow` and `SetWindow`"); }; @@ -789,6 +803,50 @@ the item to be found.", ""); item = (item, ) self.Add(*item) + def AddSpacer(self, *args, **kw): + """AddSpacer(int size) --> SizerItem + + Add a spacer that is (size,size) pixels. + """ + if args and type(args[0]) == int: + return self.Add( (args[0],args[0] ), 0) + else: %# otherwise stay compatible with old AddSpacer + return self.Add(*args, **kw) + def PrependSpacer(self, *args, **kw): + """PrependSpacer(int size) --> SizerItem + + Prepend a spacer that is (size, size) pixels.""" + if args and type(args[0]) == int: + return self.Prepend( (args[0],args[0] ), 0) + else: %# otherwise stay compatible with old PrependSpacer + return self.Prepend(*args, **kw) + def InsertSpacer(self, index, *args, **kw): + """InsertSpacer(int index, int size) --> SizerItem + + Insert a spacer at position index that is (size, size) pixels.""" + if args and type(args[0]) == int: + return self.Insert( index, (args[0],args[0] ), 0) + else: %# otherwise stay compatible with old InsertSpacer + return self.Insert(index, *args, **kw) + + + def AddStretchSpacer(self, prop=1): + """AddStretchSpacer(int prop=1) --> SizerItem + + Add a stretchable spacer.""" + return self.Add((0,0), prop) + def PrependStretchSpacer(self, prop=1): + """PrependStretchSpacer(int prop=1) --> SizerItem + + Prepend a stretchable spacer.""" + return self.Prepend((0,0), prop) + def InsertStretchSpacer(self, index, prop=1): + """InsertStretchSpacer(int index, int prop=1) --> SizerItem + + Insert a stretchable spacer.""" + return self.Insert(index, (0,0), prop) + + %# for backwards compatibility only, please do not use in new code def AddWindow(self, *args, **kw): """Compatibility alias for `Add`.""" @@ -796,9 +854,6 @@ the item to be found.", ""); def AddSizer(self, *args, **kw): """Compatibility alias for `Add`.""" return self.Add(*args, **kw) - def AddSpacer(self, *args, **kw): - """Compatibility alias for `Add`.""" - return self.Add(*args, **kw) def PrependWindow(self, *args, **kw): """Compatibility alias for `Prepend`.""" @@ -806,9 +861,6 @@ the item to be found.", ""); def PrependSizer(self, *args, **kw): """Compatibility alias for `Prepend`.""" return self.Prepend(*args, **kw) - def PrependSpacer(self, *args, **kw): - """Compatibility alias for `Prepend`.""" - return self.Prepend(*args, **kw) def InsertWindow(self, *args, **kw): """Compatibility alias for `Insert`.""" @@ -816,9 +868,6 @@ the item to be found.", ""); def InsertSizer(self, *args, **kw): """Compatibility alias for `Insert`.""" return self.Insert(*args, **kw) - def InsertSpacer(self, *args, **kw): - """Compatibility alias for `Insert`.""" - return self.Insert(*args, **kw) def RemoveWindow(self, *args, **kw): """Compatibility alias for `Remove`.""" @@ -1017,6 +1066,11 @@ the item.", ""); void , ShowItems(bool show), "Recursively call `wx.SizerItem.Show` on all sizer items.", ""); + %property(Children, GetChildren, doc="See `GetChildren`"); + %property(ContainingWindow, GetContainingWindow, SetContainingWindow, doc="See `GetContainingWindow` and `SetContainingWindow`"); + %property(MinSize, GetMinSize, SetMinSize, doc="See `GetMinSize` and `SetMinSize`"); + %property(Position, GetPosition, doc="See `GetPosition`"); + %property(Size, GetSize, doc="See `GetSize`"); }; @@ -1159,6 +1213,7 @@ public: wxStaticBox *, GetStaticBox(), "Returns the static box associated with this sizer.", ""); + %property(StaticBox, GetStaticBox, doc="See `GetStaticBox`"); }; //--------------------------------------------------------------------------- @@ -1245,6 +1300,11 @@ define extra space between all children.", ""); cols = (nitems + rows - 1) / rows return (rows, cols) } + + %property(Cols, GetCols, SetCols, doc="See `GetCols` and `SetCols`"); + %property(HGap, GetHGap, SetHGap, doc="See `GetHGap` and `SetHGap`"); + %property(Rows, GetRows, SetRows, doc="See `GetRows` and `SetRows`"); + %property(VGap, GetVGap, SetVGap, doc="See `GetVGap` and `SetVGap`"); }; //--------------------------------------------------------------------------- @@ -1365,9 +1425,7 @@ previously). Argument *mode* can be one of the following values: growable or not in the flexbile direction. ========================== ================================================= -Note that this method does not trigger relayout. - -", ""); +Note that this method does not trigger relayout.", ""); DocDeclStr( wxFlexSizerGrowMode , GetNonFlexibleGrowMode(), @@ -1390,6 +1448,12 @@ rows in the sizer.", ""); "Returns a list of integers representing the widths of each of the columns in the sizer.", ""); + + %property(ColWidths, GetColWidths, doc="See `GetColWidths`"); + %property(FlexibleDirection, GetFlexibleDirection, SetFlexibleDirection, doc="See `GetFlexibleDirection` and `SetFlexibleDirection`"); + %property(NonFlexibleGrowMode, GetNonFlexibleGrowMode, SetNonFlexibleGrowMode, doc="See `GetNonFlexibleGrowMode` and `SetNonFlexibleGrowMode`"); + %property(RowHeights, GetRowHeights, doc="See `GetRowHeights`"); + }; //--------------------------------------------------------------------------- @@ -1429,6 +1493,12 @@ specifc manner.", ""); wxButton* GetNegativeButton() const; wxButton* GetCancelButton() const; wxButton* GetHelpButton() const; + + %property(AffirmativeButton, GetAffirmativeButton, SetAffirmativeButton, doc="See `GetAffirmativeButton` and `SetAffirmativeButton`"); + %property(ApplyButton, GetApplyButton, doc="See `GetApplyButton`"); + %property(CancelButton, GetCancelButton, SetCancelButton, doc="See `GetCancelButton` and `SetCancelButton`"); + %property(HelpButton, GetHelpButton, doc="See `GetHelpButton`"); + %property(NegativeButton, GetNegativeButton, SetNegativeButton, doc="See `GetNegativeButton` and `SetNegativeButton`"); };