This method replaces the previously set alignment with the specified one.
- @param align
+ @param alignment
Combination of @c wxALIGN_XXX bit masks.
@see Top(), Left(), Right(), Bottom(), Centre()
-/**
- @class wxNotebookSizer
-
- @deprecated
- This class is deprecated and should not be used in new code! It is no
- longer needed, wxNotebook control can be inserted
- into any sizer class and its minimal size will be determined correctly.
-
- wxNotebookSizer is a specialized sizer to make sizers work in connection
- with using notebooks. This sizer is different from any other sizer as you
- must not add any children to it - instead, it queries the notebook class
- itself. The only thing this sizer does is to determine the size of the
- biggest page of the notebook and report an adjusted minimal size to a more
- toplevel sizer.
-
- @library{wxbase}
- @category{winlayout}
-
- @see wxSizer, wxNotebook,
- @ref overview_sizer "Sizers overview"
-*/
-class wxNotebookSizer : public wxSizer
-{
-public:
- /**
- Constructor. It takes an associated notebook as its only parameter.
- */
- wxNotebookSizer(wxNotebook* notebook);
-
- /**
- Returns the notebook associated with the sizer.
- */
- wxNotebook* GetNotebook();
-};
-
-
-
/**
@class wxFlexGridSizer
Returns the value that specifies how the sizer grows in the "non-flexible"
direction if there is one.
+ The behaviour of the elements in the flexible direction (i.e. both rows
+ and columns by default, or rows only if GetFlexibleDirection() is @c
+ wxVERTICAL or columns only if it is @c wxHORIZONTAL) is always governed
+ by their proportion as specified in the call to AddGrowableRow() or
+ AddGrowableCol(). What happens in the other direction depends on the
+ value of returned by this function as described below.
+
@return
One of the following values:
- - wxFLEX_GROWMODE_NONE: Sizer doesn't grow in the non-flexible direction.
- - wxFLEX_GROWMODE_SPECIFIED: Sizer honors growable columns/rows set with
- AddGrowableCol() and AddGrowableRow(). In this case equal sizing applies
- to minimum sizes of columns or rows (this is the default value).
+ - wxFLEX_GROWMODE_NONE: Sizer doesn't grow its elements at all in
+ the non-flexible direction.
+ - wxFLEX_GROWMODE_SPECIFIED: Sizer honors growable columns/rows set
+ with AddGrowableCol() and AddGrowableRow() in the non-flexible
+ direction as well. In this case equal sizing applies to minimum
+ sizes of columns or rows (this is the default value).
- wxFLEX_GROWMODE_ALL: Sizer equally stretches all columns or rows in
- the non-flexible direction, whether they are growable or not in the
- flexible direction.
+ the non-flexible direction, independently of the proportions
+ applied in the flexible direction.
@see SetFlexibleDirection(), SetNonFlexibleGrowMode()
*/
@see Remove()
*/
- bool Detach(size_t index);
+ virtual bool Detach(int index);
/**
Tell the sizer to resize the @a window so that its client area matches the
*/
wxWindow* GetContainingWindow() const;
+ /**
+ Returns the number of items in the sizer.
+
+ If you just need to test whether the sizer is empty or not you can also
+ use IsEmpty() function.
+ */
+ size_t GetItemCount() const;
+
/**
Finds wxSizerItem which holds the given @a window.
Use parameter @a recursive to search in subsizers too.
*/
wxSizerItem* InsertStretchSpacer(size_t index, int prop = 1);
+ /**
+ Return @true if the sizer has no elements.
+
+ @see GetItemCount()
+ */
+ bool IsEmpty() const;
+
/**
Returns @true if the @a window is shown.
@return @true if the child item was found and removed, @false otherwise.
*/
- bool Remove(wxWindow* window);
+ virtual bool Remove(wxWindow* window);
/**
Removes a sizer child from the sizer and destroys it.
@return @true if the child item was found and removed, @false otherwise.
*/
- bool Remove(size_t index);
+ virtual bool Remove(int index);
/**
Detaches the given @a oldwin from the sizer and replaces it with the
@see wxSizerItem::SetMinSize()
*/
- void SetItemMinSize(wxWindow* window, int width, int height);
+ bool SetItemMinSize(wxWindow* window, int width, int height);
/**
Set an item's minimum size by window, sizer, or position.
@see wxSizerItem::SetMinSize()
*/
- void SetItemMinSize(wxSizer* sizer, int width, int height);
+ bool SetItemMinSize(wxSizer* sizer, int width, int height);
/**
Set an item's minimum size by window, sizer, or position.
@see wxSizerItem::SetMinSize()
*/
- void SetItemMinSize(size_t index, int width, int height);
+ bool SetItemMinSize(size_t index, int width, int height);
/**
Call this to give the sizer a minimal size.
/**
This constructor creates a new static box with the given label and parent window.
*/
- wxStaticBoxSizer(int orient, wxWindow parent,
+ wxStaticBoxSizer(int orient, wxWindow *parent,
const wxString& label = wxEmptyString);
/**