wxStdDialogButtonSizer();
/**
- Adds a button to the wxStdDialogButtonSizer. The @a button must have
+ Adds a button to the wxStdDialogButtonSizer. The @a button must have
one of the following identifiers:
wxID_OK
wxID_YES
/**
Deletes the user data and subsizer, if any.
*/
- ~wxSizerItem();
+ virtual ~wxSizerItem();
/**
Calculates the minimum desired size for the item, including any space
needed by borders.
*/
- wxSize CalcMin();
+ virtual wxSize CalcMin();
/**
Destroy the window or the windows in a subsizer, depending on the type
of item.
*/
- void DeleteWindows();
+ virtual void DeleteWindows();
/**
Enable deleting the SizerItem without destroying the contained sizer.
/**
Get the rectangle of the item on the parent window, excluding borders.
*/
- wxRect GetRect();
+ virtual wxRect GetRect();
/**
Get the current size of the item, as set in the last Layout.
*/
- wxSize GetSize() const;
+ virtual wxSize GetSize() const;
/**
If this item is tracking a sizer, return it. @NULL otherwise.
adjust the position and size of the item to be within that space
taking alignment and borders into account.
*/
- void SetDimension(const wxPoint& pos, const wxSize& size);
+ virtual void SetDimension(const wxPoint& pos, const wxSize& size);
/**
Set the flag item attribute.
/**
Set the sizer tracked by this item.
+ @deprecated @todo provide deprecation description
*/
void SetSizer(wxSizer* sizer);
/**
Set the size of the spacer tracked by this item.
+ @deprecated @todo provide deprecation description
*/
void SetSpacer(const wxSize& size);
/**
- Set the window to be tracked by thsi item.
+ Set the window to be tracked by this item.
+ @deprecated @todo provide deprecation description
*/
void SetWindow(wxWindow* window);
you can now write
@code
- sizer->Add(ctrl, wxSizerFlags().Expand().Border(10));
+ sizer->Add(ctrl, wxSizerFlags().Expand().Border(wxALL, 10));
@endcode
This is more readable and also allows you to create wxSizerFlags objects which
@code
wxSizerFlags flagsExpand(1);
- flagsExpand.Expand().Border(10);
+ flagsExpand.Expand().Border(wxALL, 10);
sizer->Add(ctrl1, flagsExpand);
sizer->Add(ctrl2, flagsExpand);
/**
Specifies that column @a idx (starting from zero) should be grown if
there is extra space available to the sizer.
- The @a proportion parameter has the same meaning as the stretch factor for
- the sizers() except that if all proportions are 0,
- then all columns are resized equally (instead of not being resized at all).
+
+ The @a proportion parameter has the same meaning as the stretch factor
+ for the sizers() except that if all proportions are 0, then all columns
+ are resized equally (instead of not being resized at all).
+
+ Notice that the row must not be already growable, if you need to change
+ the proportion you must call RemoveGrowableCol() first and then make it
+ growable (with a different proportion) again. You can use IsColGrowable()
+ to check whether a column is already growable.
*/
void AddGrowableCol(size_t idx, int proportion = 0);
/**
Specifies that row idx (starting from zero) should be grown if there
is extra space available to the sizer.
- See AddGrowableCol() for the description
- of @a proportion parameter.
+
+ This is identical to AddGrowableCol() except that it works with rows
+ and not columns.
*/
void AddGrowableRow(size_t idx, int proportion = 0);
*/
int GetNonFlexibleGrowMode() const;
+ /**
+ Returns @true if column @a idx is growable.
+
+ @since 2.9.0
+ */
+ bool IsColGrowable(size_t idx);
+
+ /**
+ Returns @true if row @a idx is growable.
+
+ @since 2.9.0
+ */
+ bool IsRowGrowable(size_t idx);
+
/**
Specifies that column idx is no longer growable.
*/
/**
The destructor.
*/
- ~wxSizer();
+ virtual ~wxSizer();
/**
Appends a child to the sizer.
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.
*/
- wxSize CalcMin();
+ virtual wxSize CalcMin();
/**
Detaches all children from the sizer. If @a delete_windows is @true then
child windows will also be deleted.
*/
- void Clear(bool delete_windows = false);
+ virtual void Clear(bool delete_windows = false);
/**
Computes client area size for @a window so that it matches the sizer's
/**
Detach the child @a window from the sizer without destroying it.
-
+
This method does not cause any layout or resizing to take place, call Layout()
to update the layout "on screen" after detaching a child from the sizer.
-
+
Returns @true if the child item was found and detached, @false otherwise.
@see Remove()
*/
- bool Detach(wxWindow* window);
+ virtual bool Detach(wxWindow* window);
/**
Detach the child @a sizer from the sizer without destroying it.
-
+
This method does not cause any layout or resizing to take place, call Layout()
to update the layout "on screen" after detaching a child from the sizer.
-
+
Returns @true if the child item was found and detached, @false otherwise.
-
+
@see Remove()
*/
- bool Detach(wxSizer* sizer);
+ virtual bool Detach(wxSizer* sizer);
/**
Detach a item at position @a index from the sizer without destroying it.
-
+
This method does not cause any layout or resizing to take place, call Layout()
to update the layout "on screen" after detaching a child from the sizer.
Returns @true if the child item was found and detached, @false otherwise.
@ref wxSizerItem "wxSizerItem".
*/
wxSizerItemList& GetChildren();
-
+
/**
Returns the list of the items in this sizer. The elements of type-safe
wxList @a wxSizerItemList are pointers to objects of type
Returns pointer to item or @NULL.
*/
wxSizerItem* GetItem(wxWindow* window, bool recursive = false);
-
+
/**
Finds wxSizerItem which holds the given @a sizer
Use parameter @a recursive to search in subsizers too.
Returns pointer to item or @NULL.
*/
-
+
wxSizerItem* GetItem(wxSizer* sizer, bool recursive = false);
/**
Finds wxSizerItem which is located in the sizer at position
/**
Returns the current position of the sizer.
*/
- wxPoint GetPosition();
+ wxPoint GetPosition() const;
/**
Returns the current size of the sizer.
*/
- wxSize GetSize();
+ wxSize GetSize() const;
/**
Hides the child @a window.
-
+
To make a sizer item disappear, use Hide() followed by Layout().
-
+
Use parameter @a recursive to hide elements found in subsizers.
Returns @true if the child item was found, @false otherwise.
/**
Hides the child @a sizer.
-
+
To make a sizer item disappear, use Hide() followed by Layout().
-
+
Use parameter @a recursive to hide elements found in subsizers.
Returns @true if the child item was found, @false otherwise.
/**
Hides the item at position @a index.
-
+
To make a sizer item disappear, use Hide() followed by Layout().
-
+
Use parameter @a recursive to hide elements found in subsizers.
Returns @true if the child item was found, @false otherwise.
bool Hide(size_t index);
/**
- Insert a child into the sizer before any existing item at
+ Insert a child into the sizer before any existing item at @a index.
See Add() for the meaning of the other parameters.
*/
const wxSizerFlags& flags);
/**
- Insert a child into the sizer before any existing item at
+ Insert a child into the sizer before any existing item at @a index.
See Add() for the meaning of the other parameters.
*/
wxObject* userData = NULL);
/**
- Insert a child into the sizer before any existing item at
+ Insert a child into the sizer before any existing item at @a index.
See Add() for the meaning of the other parameters.
*/
const wxSizerFlags& flags);
/**
- Insert a child into the sizer before any existing item at
+ Insert a child into the sizer before any existing item at @a index.
See Add() for the meaning of the other parameters.
*/
wxObject* userData = NULL);
/**
- Insert a child into the sizer before any existing item at
+ Insert a child into the sizer before any existing item at @a index.
See Add() for the meaning of the other parameters.
*/
keeping
the current dimension.
*/
- void Layout();
+ virtual void Layout();
/**
Same as Add(), but prepends the items to the beginning of the
Here, the sizer will do the actual calculation of its children's
positions and sizes.
*/
- void RecalcSizes();
+ virtual void RecalcSizes();
/**
Removes a child window from the sizer, but does @b not destroy it
@return @true if the child item was found and removed, @false otherwise.
*/
- bool Remove(wxSizer* sizer);
+ virtual bool Remove(wxSizer* sizer);
/**
Removes a child from the sizer and destroys it if it is a sizer or a
replaces it with the given @a newwin. The detached
child window is @b not deleted (because windows are
owned by their parent window, not the sizer).
-
+
Use parameter @a recursive to search the given element recursively in subsizers.
This method does not cause any layout or resizing to take place,
call Layout() to update the layout "on screen" after replacing a
child from the sizer.
-
+
Returns @true if the child item was found and removed, @false otherwise.
*/
bool Replace(wxWindow* oldwin, wxWindow* newwin,
bool recursive = false);
-
+
/**
Detaches the given @a oldsz from the sizer and
replaces it with the given @a newsz. The detached
- child sizer is deleted.
-
+ child sizer is deleted.
+
Use parameter @a recursive to search the given element recursively in subsizers.
This method does not cause any layout or resizing to take place,
call Layout() to update the layout "on screen" after replacing a
child from the sizer.
-
+
Returns @true if the child item was found and removed, @false otherwise.
*/
bool Replace(wxSizer* oldsz, wxSizer* newsz,
bool recursive = false);
-
+
/**
Detaches the given item at position @a index from the sizer and
replaces it with the given wxSizerItem @a newitem.
-
+
The detached child is deleted @b only if it is a sizer or a spacer
(but not if it is a wxWindow because windows are owned by their
parent window, not the sizer).
-
+
This method does not cause any layout or resizing to take place,
call Layout() to update the layout "on screen" after replacing a
child from the sizer.
-
+
Returns @true if the child item was found and removed, @false otherwise.
*/
- bool Replace(size_t index, wxSizerItem* newitem);
+ virtual bool Replace(size_t index, wxSizerItem* newitem);
/**
Call this to force the sizer to take the given dimension and thus force
rules defined by the parameter in the Add() and Prepend() methods.
*/
void SetDimension(int x, int y, int width, int height);
-
+
/**
@overload
*/
appropriately.
@see wxScrolled::SetScrollbars()
+ @deprecated @todo provide deprecation description
*/
void SetVirtualSizeHints(wxWindow* window);
/**
Shows or hides the @a window.
To make a sizer item disappear or reappear, use Show() followed by Layout().
-
+
Use parameter @a recursive to show or hide elements found in subsizers.
-
+
Returns @true if the child item was found, @false otherwise.
@see Hide(), IsShown()
/**
Shows or hides @a sizer.
To make a sizer item disappear or reappear, use Show() followed by Layout().
-
+
Use parameter @a recursive to show or hide elements found in subsizers.
-
+
Returns @true if the child item was found, @false otherwise.
@see Hide(), IsShown()
/**
Shows the item at @a index.
To make a sizer item disappear or reappear, use Show() followed by Layout().
-
+
Returns @true if the child item was found, @false otherwise.
@see Hide(), IsShown()
/**
Returns the number of columns in the sizer.
*/
- int GetCols();
+ int GetCols() const;
/**
Returns the horizontal gap (in pixels) between cells in the sizer.
*/
- int GetHGap();
+ int GetHGap() const;
/**
Returns the number of rows in the sizer.
*/
- int GetRows();
+ int GetRows() const;
/**
Returns the vertical gap (in pixels) between the cells in the sizer.
*/
- int GetVGap();
+ int GetVGap() const;
/**
Sets the number of columns in the sizer.
@library{wxcore}
@category{winlayout}
- @see wxSizer, wxStaticBox, wxBoxSizer, @ref overview_sizer
+ @see wxSizer, wxStaticBox, wxBoxSizer, @ref overview_sizer
"Sizer Overview"
*/
class wxStaticBoxSizer : public wxBoxSizer
/**
Returns the static box associated with the sizer.
*/
- wxStaticBox* GetStaticBox();
+ wxStaticBox* GetStaticBox() const;
};
simple basic geometry, typically in a row or a column or several hierarchies of
either.
- For more information, please see @ref overview_sizer_box
+ For more information, please see @ref overview_sizer_box
"Programming with wxBoxSizer".
@library{wxcore}
Implements the calculation of a box sizer's minimal. It is used internally
only and must not be called by the user. Documented for information.
*/
- wxSize CalcMin();
+ virtual wxSize CalcMin();
/**
Returns the orientation of the box sizer, either wxVERTICAL
or wxHORIZONTAL.
*/
- int GetOrientation();
+ int GetOrientation() const;
/**
Implements the calculation of a box sizer's dimensions and then sets