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