1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxWrapSizer
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 // flags for wxWrapSizer
12 wxEXTEND_LAST_ON_EACH_LINE
,
13 wxREMOVE_LEADING_SPACES
,
14 wxWRAPSIZER_DEFAULT_FLAGS
20 A wrap sizer lays out its items in a single line, like a box sizer -- as long
21 as there is space available in that direction.
22 Once all available space in the primary direction has been used, a new line
23 is added and items are added there.
25 So a wrap sizer has a primary orientation for adding items, and adds lines
26 as needed in the secondary direction.
31 @see wxBoxSizer, wxSizer, @ref overview_sizer
33 class wxWrapSizer
: public wxBoxSizer
37 Constructor for a wxWrapSizer.
39 @a orient determines the primary direction of the sizer (the most common
40 case being @c wxHORIZONTAL). The flags parameter can be a combination of
41 the values @c wxEXTEND_LAST_ON_EACH_LINE which will cause the last item
42 on each line to use any remaining space on that line and @c wxREMOVE_LEADING_SPACES
43 which removes any spacer elements from the beginning of a row.
45 Both of these flags are on by default.
47 wxWrapSizer(int orient
= wxHORIZONTAL
,
48 int flags
= wxWRAPSIZER_DEFAULT_FLAGS
);
51 Not used by an application.
53 This is the mechanism by which sizers can inform sub-items of the first
54 determined size component.
55 The sub-item can then better determine its size requirements.
57 Returns @true if the information was used (and the sub-item min size was
60 virtual bool InformFirstDirection(int direction
, int size
,
61 int availableOtherDir
);
63 virtual void RecalcSizes();
64 virtual wxSize
CalcMin();
68 Can be overridden in the derived classes to treat some normal items as
71 This method is used to determine whether the given @a item should be
72 considered to be a spacer for the purposes of @c wxREMOVE_LEADING_SPACES
73 implementation. By default only returns @true for the real spacers.
75 virtual bool IsSpaceItem(wxSizerItem
*item
) const;