X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ea82506581c04483388166f7ef99260d45d756a7..232b2162776e08c0b16d5280b90f5c075f38c667:/interface/wx/sizer.h diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index 00b252905e..86269f643f 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -606,15 +606,24 @@ public: 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() */ @@ -1082,6 +1091,14 @@ public: */ 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. @@ -1232,6 +1249,13 @@ public: */ 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.