]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/gridbagsizer.tex
sorting support for generic version (patch 1765087 from Bo)
[wxWidgets.git] / docs / latex / wx / gridbagsizer.tex
CommitLineData
20b35a69
RD
1
2\section{\class{wxGridBagSizer}}\label{wxgridbagsizer}
3
4A \helpref{wxSizer}{wxsizer} that can lay out items in a virtual grid
5like a \helpref{wxFlexGridSizer}{wxflexgridsizer} but in this case
5a30d450 6explicit positioning of the items is allowed using
20b35a69
RD
7\helpref{wxGBPosition}{wxgbposition}, and items can optionally span
8more than one row and/or column using \helpref{wxGBSpan}{wxgbspan}.
9
20b35a69
RD
10\wxheading{Derived from}
11
3ac7b44c
RD
12\helpref{wxFlexGridSizer}{wxflexgridsizer}\\
13\helpref{wxGridSizer}{wxgridsizer}\\
14\helpref{wxSizer}{wxsizer}\\
15\helpref{wxObject}{wxobject}
16
20b35a69
RD
17\wxheading{Include files}
18
19<wx/gbsizer.h>
20
a7af285d
VZ
21\wxheading{Library}
22
23\helpref{wxCore}{librarieslist}
24
20b35a69
RD
25\latexignore{\rtfignore{\wxheading{Members}}}
26
20b35a69
RD
27\membersection{wxGridBagSizer::wxGridBagSizer}\label{wxgridbagsizerwxgridbagsizer}
28
29\func{}{wxGridBagSizer}{\param{int }{vgap = 0}, \param{int }{hgap = 0}}
30
31Constructor, with optional parameters to specify the gap between the
32rows and columns.
33
20b35a69
RD
34\membersection{wxGridBagSizer::Add}\label{wxgridbagsizeradd}
35
56eee37f 36\func{wxSizerItem*}{Add}{\param{wxWindow* }{window}, \param{const wxGBPosition\& }{pos}, \param{const wxGBSpan\& }{span = wxDefaultSpan}, \param{int }{flag = 0}, \param{int }{border = 0}, \param{wxObject* }{userData = NULL}}
20b35a69 37
56eee37f 38\func{wxSizerItem*}{Add}{\param{wxSizer* }{sizer}, \param{const wxGBPosition\& }{pos}, \param{const wxGBSpan\& }{span = wxDefaultSpan}, \param{int }{flag = 0}, \param{int }{border = 0}, \param{wxObject* }{userData = NULL}}
20b35a69 39
56eee37f 40\func{wxSizerItem*}{Add}{\param{int }{width}, \param{int }{height}, \param{const wxGBPosition\& }{pos}, \param{const wxGBSpan\& }{span = wxDefaultSpan}, \param{int }{flag = 0}, \param{int }{border = 0}, \param{wxObject* }{userData = NULL}}
20b35a69 41
56eee37f 42\func{wxSizerItem*}{Add}{\param{wxGBSizerItem* }{item}}
20b35a69 43
56eee37f
WS
44The Add methods return a valid pointer if the item was successfully placed at the
45given position, NULL if something was already there.
20b35a69 46
20b35a69
RD
47\membersection{wxGridBagSizer::CalcMin}\label{wxgridbagsizercalcmin}
48
49\func{wxSize}{CalcMin}{\void}
50
51Called when the managed size of the sizer is needed or when layout
52needs done.
53
20b35a69
RD
54\membersection{wxGridBagSizer::CheckForIntersection}\label{wxgridbagsizercheckforintersection}
55
56\func{bool}{CheckForIntersection}{\param{wxGBSizerItem* }{item}, \param{wxGBSizerItem* }{excludeItem = NULL}}
57
58\func{bool}{CheckForIntersection}{\param{const wxGBPosition\& }{pos}, \param{const wxGBSpan\& }{span}, \param{wxGBSizerItem* }{excludeItem = NULL}}
59
60Look at all items and see if any intersect (or would overlap) the given
5a30d450 61item. Returns true if so, false if there would be no overlap. If an
20b35a69
RD
62excludeItem is given then it will not be checked for intersection, for
63example it may be the item we are checking the position of.
64
20b35a69
RD
65\membersection{wxGridBagSizer::FindItem}\label{wxgridbagsizerfinditem}
66
67\func{wxGBSizerItem*}{FindItem}{\param{wxWindow* }{window}}
68
69\func{wxGBSizerItem*}{FindItem}{\param{wxSizer* }{sizer}}
70
71Find the sizer item for the given window or subsizer, returns NULL if
72not found. (non-recursive)
73
3ac7b44c
RD
74\membersection{wxGridBagSizer::FindItemAtPoint}\label{wxgridbagsizerfinditematpoint}
75
76\func{wxGBSizerItem*}{FindItemAtPoint}{\param{const wxPoint\& }{pt}}
77
78Return the sizer item located at the point given in pt, or NULL if
79there is no item at that point. The (x,y) coordinates in pt correspond
80to the client coordinates of the window using the sizer for
81layout. (non-recursive)
82
20b35a69
RD
83\membersection{wxGridBagSizer::FindItemAtPosition}\label{wxgridbagsizerfinditematposition}
84
85\func{wxGBSizerItem*}{FindItemAtPosition}{\param{const wxGBPosition\& }{pos}}
86
87Return the sizer item for the given grid cell, or NULL if there is no
88item at that position. (non-recursive)
89
20b35a69
RD
90\membersection{wxGridBagSizer::FindItemWithData}\label{wxgridbagsizerfinditemwithdata}
91
92\func{wxGBSizerItem*}{FindItemWithData}{\param{const wxObject* }{userData}}
93
94Return the sizer item that has a matching user data (it only compares
95pointer values) or NULL if not found. (non-recursive)
96
6217b9aa
RD
97\membersection{wxGridBagSizer::GetCellSize}\label{wxgridbagsizergetcellsize}
98
99\constfunc{wxSize}{GetCellSize}{\param{int }{row}, \param{int }{col}}
100
5a30d450 101Get the size of the specified cell, including hgap and vgap. Only
6217b9aa
RD
102valid after a Layout.
103
20b35a69
RD
104\membersection{wxGridBagSizer::GetEmptyCellSize}\label{wxgridbagsizergetemptycellsize}
105
106\constfunc{wxSize}{GetEmptyCellSize}{\void}
107
108Get the size used for cells in the grid with no item.
109
20b35a69
RD
110\membersection{wxGridBagSizer::GetItemPosition}\label{wxgridbagsizergetitemposition}
111
112\func{wxGBPosition}{GetItemPosition}{\param{wxWindow* }{window}}
113
114\func{wxGBPosition}{GetItemPosition}{\param{wxSizer* }{sizer}}
115
116\func{wxGBPosition}{GetItemPosition}{\param{size\_t }{index}}
117
118Get the grid position of the specified item.
119
20b35a69
RD
120\membersection{wxGridBagSizer::GetItemSpan}\label{wxgridbagsizergetitemspan}
121
122\func{wxGBSpan}{GetItemSpan}{\param{wxWindow* }{window}}
123
124\func{wxGBSpan}{GetItemSpan}{\param{wxSizer* }{sizer}}
125
126\func{wxGBSpan}{GetItemSpan}{\param{size\_t }{index}}
127
128Get the row/col spanning of the specified item
129
20b35a69
RD
130\membersection{wxGridBagSizer::RecalcSizes}\label{wxgridbagsizerrecalcsizes}
131
132\func{void}{RecalcSizes}{\void}
133
134Called when the managed size of the sizer is needed or when layout
135needs done.
136
20b35a69
RD
137\membersection{wxGridBagSizer::SetEmptyCellSize}\label{wxgridbagsizersetemptycellsize}
138
139\func{void}{SetEmptyCellSize}{\param{const wxSize\& }{sz}}
140
141Set the size used for cells in the grid with no item.
142
20b35a69
RD
143\membersection{wxGridBagSizer::SetItemPosition}\label{wxgridbagsizersetitemposition}
144
145\func{bool}{SetItemPosition}{\param{wxWindow* }{window}, \param{const wxGBPosition\& }{pos}}
146
147\func{bool}{SetItemPosition}{\param{wxSizer* }{sizer}, \param{const wxGBPosition\& }{pos}}
148
149\func{bool}{SetItemPosition}{\param{size\_t }{index}, \param{const wxGBPosition\& }{pos}}
150
5a30d450 151Set the grid position of the specified item. Returns true on success.
20b35a69 152If the move is not allowed (because an item is already there) then
5a30d450 153false is returned.
20b35a69
RD
154
155\membersection{wxGridBagSizer::SetItemSpan}\label{wxgridbagsizersetitemspan}
156
157\func{bool}{SetItemSpan}{\param{wxWindow* }{window}, \param{const wxGBSpan\& }{span}}
158
159\func{bool}{SetItemSpan}{\param{wxSizer* }{sizer}, \param{const wxGBSpan\& }{span}}
160
161\func{bool}{SetItemSpan}{\param{size\_t }{index}, \param{const wxGBSpan\& }{span}}
162
163Set the row/col spanning of the specified item. Returns true on
5a30d450 164success. If the move is not allowed (because an item is already there)
20b35a69
RD
165then false is returned.
166