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