X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12f5e1e78fe906050ff2fee9529476db332633f0..92c0fc34c104c8d7c12d6a3b78ea232690fc23f4:/interface/wx/wrapsizer.h?ds=inline diff --git a/interface/wx/wrapsizer.h b/interface/wx/wrapsizer.h index 748f784577..61bc160bb3 100644 --- a/interface/wx/wrapsizer.h +++ b/interface/wx/wrapsizer.h @@ -2,17 +2,24 @@ // Name: wrapsizer.h // Purpose: interface of wxWrapSizer // Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// flags for wxWrapSizer +enum +{ + wxEXTEND_LAST_ON_EACH_LINE, + wxREMOVE_LEADING_SPACES, + wxWRAPSIZER_DEFAULT_FLAGS +}; + /** @class wxWrapSizer A wrap sizer lays out its items in a single line, like a box sizer -- as long - as there is space available in that direction. Once all available space in - the primary direction has been used, a new line is added and items are added - there. + as there is space available in that direction. + Once all available space in the primary direction has been used, a new line + is added and items are added there. So a wrap sizer has a primary orientation for adding items, and adds lines as needed in the secondary direction. @@ -20,33 +27,40 @@ @library{wxcore} @category{winlayout} - @see wxBoxSizer, wxSizer, @ref overview_sizeroverview "Sizer overview" + @see wxBoxSizer, wxSizer, @ref overview_sizer */ class wxWrapSizer : public wxBoxSizer { public: /** - Constructor for a wxWrapSizer. @a orient determines the primary direction of - the sizer (the most common case being @c wxHORIZONTAL). The flags - parameter can be a combination of the values @c - wxEXTEND_LAST_ON_EACH_LINE which will cause the last item on each line - to use any remaining space on that line and @c wxREMOVE_LEADING_SPACES - which removes any spacer elements from the beginning of a row. Both of - these flags are on by default. + Constructor for a wxWrapSizer. + + @a orient determines the primary direction of the sizer (the most common + case being @c wxHORIZONTAL). The flags parameter can be a combination of + the values @c wxEXTEND_LAST_ON_EACH_LINE which will cause the last item + on each line to use any remaining space on that line and @c wxREMOVE_LEADING_SPACES + which removes any spacer elements from the beginning of a row. + + Both of these flags are on by default. */ wxWrapSizer(int orient = wxHORIZONTAL, - int flags = wxEXTEND_LAST_ON_EACH_LINE | - wxREMOVE_LEADING_SPACES); + int flags = wxWRAPSIZER_DEFAULT_FLAGS); /** - Not used by an application. This is the mechanism by which sizers can inform - sub-items of the first determined size component. The sub-item can then better - determine its size requirements. + Not used by an application. + + This is the mechanism by which sizers can inform sub-items of the first + determined size component. + The sub-item can then better determine its size requirements. + Returns @true if the information was used (and the sub-item min size was updated). */ - bool InformFirstDirection(int direction, int size, - int availableOtherDir); + virtual bool InformFirstDirection(int direction, int size, + int availableOtherDir); + + virtual void RecalcSizes(); + virtual wxSize CalcMin(); protected: /**