*/
wxSize GetMinSize() const;
+ /**
+ Sets the minimum size to be allocated for this item.
+
+ If this item is a window, the @a size is also passed to
+ wxWindow::SetMinSize().
+ */
+ void SetMinSize(const wxSize& size);
+
+ /**
+ @overload
+ */
+ void SetMinSize(int x, int y);
+
/**
What is the current position of the item, as set in the last Layout.
*/
wxSizerFlags(int proportion = 0);
/**
- Sets the alignment of this wxSizerFlags to @e align.
- Note that if this method is not called, the wxSizerFlags has no specified
- alignment.
+ Sets the alignment of this wxSizerFlags to @e align. Note that if this
+ method is not called, the wxSizerFlags has no specified alignment.
- @see Top(), Left(), Right(),
- Bottom(), Centre()
+ @see Top(), Left(), Right(), Bottom(), Centre()
*/
- wxSizerFlags Align(int align = 0);
+ wxSizerFlags& Align(int align = 0);
- //@{
/**
- Sets the wxSizerFlags to have a border of a number of pixels specified by
- @a borderinpixels with the directions specified by @e direction.
- In the overloaded version without @a borderinpixels parameter, the border of
- default size, as returned by GetDefaultBorder(),
- is used.
+ Sets the wxSizerFlags to have a border of a number of pixels specified
+ by @a borderinpixels with the directions specified by @e direction.
*/
- wxSizerFlags Border(int direction, int borderinpixels);
- wxSizerFlags Border(int direction = wxALL);
- //@}
+ wxSizerFlags& Border(int direction, int borderinpixels);
/**
- Aligns the object to the bottom, shortcut for @c Align(wxALIGN_BOTTOM)
+ Sets the wxSizerFlags to have a border with size as returned by
+ GetDefaultBorder().
+
+ @param direction Direction(s) to apply the border in.
+ */
+ wxSizerFlags& Border(int direction = wxALL);
+
+ /**
+ Aligns the object to the bottom, shortcut for @c Align(wxALIGN_BOTTOM).
@see Align()
*/
- wxSizerFlags Bottom();
+ wxSizerFlags& Bottom();
/**
- Sets the object of the wxSizerFlags to center itself in the area it is given.
+ Sets the object of the wxSizerFlags to center itself in the area it is
+ given.
*/
- wxSizerFlags Center();
+ wxSizerFlags& Center();
/**
- Center() for people with the other dialect of english.
+ Center() for people with the other dialect of English.
*/
- wxSizerFlags Centre();
+ wxSizerFlags& Centre();
/**
- Sets the border in the given @a direction having twice the default border
- size.
+ Sets the border in the given @a direction having twice the default
+ border size.
*/
- wxSizerFlags DoubleBorder(int direction = wxALL);
+ wxSizerFlags& DoubleBorder(int direction = wxALL);
/**
- Sets the border in left and right directions having twice the default border
- size.
+ Sets the border in left and right directions having twice the default
+ border size.
*/
- wxSizerFlags DoubleHorzBorder();
+ wxSizerFlags& DoubleHorzBorder();
/**
- Sets the object of the wxSizerFlags to expand to fill as much area as it can.
+ Sets the object of the wxSizerFlags to expand to fill as much area as
+ it can.
*/
- wxSizerFlags Expand();
+ wxSizerFlags& Expand();
/**
- Set the @c wxFIXED_MINSIZE flag which indicates that the initial size of
- the window should be also set as its minimal size.
+ Set the @c wxFIXED_MINSIZE flag which indicates that the initial size
+ of the window should be also set as its minimal size.
*/
- wxSizerFlags FixedMinSize();
+ wxSizerFlags& FixedMinSize();
/**
Set the @c wxRESERVE_SPACE_EVEN_IF_HIDDEN flag. Normally wxSizers
@see Align()
*/
- wxSizerFlags Left();
+ wxSizerFlags& Left();
/**
Sets the proportion of this wxSizerFlags to @e proportion
*/
- wxSizerFlags Proportion(int proportion = 0);
+ wxSizerFlags& Proportion(int proportion = 0);
/**
Aligns the object to the right, shortcut for @c Align(wxALIGN_RIGHT)
@see Align()
*/
- wxSizerFlags Right();
+ wxSizerFlags& Right();
/**
Set the @c wx_SHAPED flag which indicates that the elements should
always keep the fixed width to height ratio equal to its original value.
*/
- wxSizerFlags Shaped();
+ wxSizerFlags& Shaped();
/**
Aligns the object to the top, shortcut for @c Align(wxALIGN_TOP)
@see Align()
*/
- wxSizerFlags Top();
+ wxSizerFlags& Top();
/**
- Sets the border in the given @a direction having thrice the default border
- size.
+ Sets the border in the given @a direction having thrice the default
+ border size.
*/
- wxSizerFlags TripleBorder(int direction = wxALL);
+ wxSizerFlags& TripleBorder(int direction = wxALL);
};
Returns a wxOrientation value that specifies whether the sizer flexibly
resizes its columns, rows, or both (default).
- @returns One of the following values:
+ @return One of the following values:
@see SetFlexibleDirection()
*/
Returns the value that specifies how the sizer grows in the "non-flexible"
direction if there is one.
- @returns One of the following values:
+ @return One of the following values:
@see SetFlexibleDirection(),
SetNonFlexibleGrowMode()
*/
~wxSizer();
+ /** @name Item Management */
+ //@{
+
/**
Appends a child to the sizer.
*/
wxSizerItem* AddStretchSpacer(int prop = 1);
+ //@}
+
/**
This method is abstract and has to be overwritten by any derived class.
Here, the sizer will do the actual calculation of its children's minimal sizes.
in
windows which manage it.
- @see wxScrolledWindow::SetScrollbars, SetVirtualSizeHints()
+ @see wxScrolled::SetScrollbars(), SetVirtualSizeHints()
*/
void FitInside(wxWindow* window);
rules defined by the parameter in the Add() and Prepend() methods.
*/
void SetDimension(int x, int y, int width, int height);
+ void SetDimension(const wxPoint& pos, const wxSize& size);
//@{
/**
- Set an item's minimum size by window, sizer, or position. The item will be
- found recursively
- in the sizer's descendants. This function enables an application to set the
- size of an item
- after initial creation.
+ Set an item's minimum size by window, sizer, or position.
+
+ The item will be found recursively in the sizer's descendants. This
+ function enables an application to set the size of an item after
+ initial creation.
+
+ @see wxSizerItem::SetMinSize()
*/
void SetItemMinSize(wxWindow* window, int width, int height);
void SetItemMinSize(wxSizer* sizer, int width, int height);
minimal size. For windows with managed scrollbars this will set them
appropriately.
- @see wxScrolledWindow::SetScrollbars
+ @see wxScrolled::SetScrollbars()
*/
void SetVirtualSizeHints(wxWindow* window);