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