]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/wrapsizer.h
HUGE commit of ifacecheck-automated fixes to virtualness/constness/staticness of...
[wxWidgets.git] / interface / wx / wrapsizer.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: wrapsizer.h
e54c96f1 3// Purpose: interface of wxWrapSizer
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxWrapSizer
7c913512
FM
11
12 A wrap sizer lays out its items in a single line, like a box sizer -- as long
f41d6c8c
FM
13 as there is space available in that direction.
14 Once all available space in the primary direction has been used, a new line
15 is added and items are added there.
7c913512 16
23324ae1 17 So a wrap sizer has a primary orientation for adding items, and adds lines
7c913512
FM
18 as needed in the secondary direction.
19
23324ae1
FM
20 @library{wxcore}
21 @category{winlayout}
7c913512 22
f41d6c8c 23 @see wxBoxSizer, wxSizer, @ref overview_sizer
23324ae1
FM
24*/
25class wxWrapSizer : public wxBoxSizer
26{
27public:
28 /**
f41d6c8c
FM
29 Constructor for a wxWrapSizer.
30
31 @a orient determines the primary direction of the sizer (the most common
32 case being @c wxHORIZONTAL). The flags parameter can be a combination of
33 the values @c wxEXTEND_LAST_ON_EACH_LINE which will cause the last item
34 on each line to use any remaining space on that line and @c wxREMOVE_LEADING_SPACES
35 which removes any spacer elements from the beginning of a row.
36
37 Both of these flags are on by default.
23324ae1 38 */
4fc3ee30
VZ
39 wxWrapSizer(int orient = wxHORIZONTAL,
40 int flags = wxEXTEND_LAST_ON_EACH_LINE |
41 wxREMOVE_LEADING_SPACES);
23324ae1
FM
42
43 /**
f41d6c8c
FM
44 Not used by an application.
45
46 This is the mechanism by which sizers can inform sub-items of the first
47 determined size component.
48 The sub-item can then better determine its size requirements.
49
23324ae1
FM
50 Returns @true if the information was used (and the sub-item min size was
51 updated).
52 */
53 bool InformFirstDirection(int direction, int size,
54 int availableOtherDir);
4fc3ee30
VZ
55
56protected:
57 /**
58 Can be overridden in the derived classes to treat some normal items as
59 spacers.
60
61 This method is used to determine whether the given @a item should be
62 considered to be a spacer for the purposes of @c wxREMOVE_LEADING_SPACES
63 implementation. By default only returns @true for the real spacers.
64 */
65 virtual bool IsSpaceItem(wxSizerItem *item) const;
23324ae1 66};
e54c96f1 67