+ %disownarg( wxSizerItem *item );
+
+ DocDeclAStrName(
+ wxSizerItem* , Add( wxSizerItem *item ),
+ "AddItem(self, SizerItem item)",
+ "Adds a `wx.SizerItem` to the sizer.", "",
+ AddItem);
+
+ DocDeclAStrName(
+ wxSizerItem* , Insert( size_t index, wxSizerItem *item ),
+ "InsertItem(self, int index, SizerItem item)",
+ "Inserts a `wx.SizerItem` to the sizer at the position given by *index*.", "",
+ InsertItem);
+
+ DocDeclAStrName(
+ wxSizerItem* , Prepend( wxSizerItem *item ),
+ "PrependItem(self, SizerItem item)",
+ "Prepends a `wx.SizerItem` to the sizer.", "",
+ PrependItem);
+
+ %cleardisown( wxSizerItem *item );
+
+
+ %pythoncode {
+ def AddMany(self, items):
+ """
+ AddMany is a convenience method for adding several items
+ to a sizer at one time. Simply pass it a list of tuples,
+ where each tuple consists of the parameters that you
+ would normally pass to the `Add` method.
+ """
+ for item in items:
+ if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
+ item = (item, )
+ self.Add(*item)
+
+ %# for backwards compatibility only, please do not use in new code
+ def AddWindow(self, *args, **kw):
+ """Compatibility alias for `Add`."""
+ return self.Add(*args, **kw)
+ 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`."""
+ return self.Prepend(*args, **kw)
+ 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`."""
+ return self.Insert(*args, **kw)
+ 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`."""
+ return self.Remove(*args, **kw)
+ def RemoveSizer(self, *args, **kw):
+ """Compatibility alias for `Remove`."""
+ return self.Remove(*args, **kw)
+ def RemovePos(self, *args, **kw):
+ """Compatibility alias for `Remove`."""
+ return self.Remove(*args, **kw)
+
+ }
+
+
+ DocDeclStr(
+ void , SetDimension( int x, int y, int width, int height ),
+ "Call this to force the sizer to take the given dimension and thus
+force the items owned by the sizer to resize themselves according to
+the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
+methods.", "");
+
+ DocDeclStr(
+ void , SetMinSize( const wxSize &size ),
+ "Call this to give the sizer a minimal size. Normally, the sizer will
+calculate its minimal size based purely on how much space its children
+need. After calling this method `GetMinSize` will return either the
+minimal size as requested by its children or the minimal size set
+here, depending on which is bigger.", "");
+
+
+ DocDeclStr(
+ wxSize , GetSize(),
+ "Returns the current size of the space managed by the sizer.", "");
+
+ DocDeclStr(
+ wxPoint , GetPosition(),
+ "Returns the current position of the sizer's managed space.", "");
+
+ DocDeclStr(
+ wxSize , GetMinSize(),
+ "Returns the minimal size of the sizer. This is either the combined
+minimal size of all the children and their borders or the minimal size
+set by SetMinSize, depending on which is bigger.", "");