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