X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/788194ff7356ce276fad49ab40d2e63cb311e9de..97d13342cc2ac77e21c38115cc6ebecac930f92a:/interface/wx/sizer.h diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index b0a4426808..9fbb06d67b 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -1394,6 +1394,21 @@ public: }; +/** + Values which define the behaviour for resizing wxFlexGridSizer cells in the + "non-flexible" direction. +*/ +enum wxFlexSizerGrowMode +{ + /// Don't resize the cells in non-flexible direction at all. + wxFLEX_GROWMODE_NONE, + + /// Uniformly resize only the specified ones (default). + wxFLEX_GROWMODE_SPECIFIED, + + /// Uniformly resize all cells. + wxFLEX_GROWMODE_ALL +}; /** @class wxFlexGridSizer @@ -1438,10 +1453,10 @@ public: 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). + for the sizers (see wxBoxSizer) 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 + Notice that the column 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. @@ -1458,7 +1473,7 @@ public: void AddGrowableRow(size_t idx, int proportion = 0); /** - Returns a wxOrientation value that specifies whether the sizer flexibly + Returns a ::wxOrientation value that specifies whether the sizer flexibly resizes its columns, rows, or both (default). @return @@ -1476,8 +1491,8 @@ public: 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 + 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. @@ -1513,12 +1528,12 @@ public: bool IsRowGrowable(size_t idx); /** - Specifies that column idx is no longer growable. + Specifies that the @a idx column index is no longer growable. */ void RemoveGrowableCol(size_t idx); /** - Specifies that row idx is no longer growable. + Specifies that the @a idx row index is no longer growable. */ void RemoveGrowableRow(size_t idx); @@ -1527,6 +1542,7 @@ public: Argument @a direction can be @c wxVERTICAL, @c wxHORIZONTAL or @c wxBOTH (which is the default value). Any other value is ignored. + See GetFlexibleDirection() for the explanation of these values. Note that this method does not trigger relayout. */ @@ -1620,11 +1636,25 @@ public: /** @class wxStaticBoxSizer - wxStaticBoxSizer is a sizer derived from wxBoxSizer but adds a static - box around the sizer. - This static box may be either created independently or the sizer may create - it itself as a convenience. In any case, the sizer owns the wxStaticBox control - and will delete it, if it is deleted. + wxStaticBoxSizer is a sizer derived from wxBoxSizer but adds a static box around + the sizer. + + The static box may be either created independently or the sizer may create it + itself as a convenience. In any case, the sizer owns the wxStaticBox control + and will delete it in the wxStaticBoxSizer destructor. + + Note that since wxWidgets 2.9.0 you are encouraged to build the windows which are + placed inside wxStaticBoxes as children of the wxStaticBox itself: + @code + ... + wxStaticBoxSizer *sz = new wxStaticBoxSizer(wxVERTICAL, parentWindow, "StaticBox"); + sz->Add(new wxStaticText(sz->GetStaticBox(), "This window is a child of the staticbox")); + ... + @endcode + + Creating the windows which are placed inside wxStaticBoxes as siblings of the + wxStaticBox is still allowed but it's deprecated as it gives some problems + (e.g. relative to tooltips) on some ports. @library{wxcore} @category{winlayout} @@ -1637,8 +1667,11 @@ public: /** This constructor uses an already existing static box. - It takes the associated static box and the orientation @a orient, which - can be either @c wxVERTICAL or @c wxHORIZONTAL as parameters. + @param box + The static box to associate with the sizer (which will take its + ownership). + @param orient + Can be either @c wxVERTICAL or @c wxHORIZONTAL. */ wxStaticBoxSizer(wxStaticBox* box, int orient);