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