2 \section{\class{wxGridBagSizer
}}\label{wxgridbagsizer
}
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
}.
11 \wxheading{Derived from
}
13 \helpref{wxFlexGridSizer
}{wxflexgridsizer
}\\
14 \helpref{wxGridSizer
}{wxgridsizer
}\\
15 \helpref{wxSizer
}{wxsizer
}\\
16 \helpref{wxObject
}{wxobject
}
19 \wxheading{Include files
}
24 \latexignore{\rtfignore{\wxheading{Members
}}}
27 \membersection{wxGridBagSizer::wxGridBagSizer
}\label{wxgridbagsizerwxgridbagsizer
}
29 \func{}{wxGridBagSizer
}{\param{int
}{vgap =
0},
\param{int
}{hgap =
0}}
31 Constructor, with optional parameters to specify the gap between the
35 \membersection{wxGridBagSizer::Add
}\label{wxgridbagsizeradd
}
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
}}
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
}}
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
}}
43 \func{bool
}{Add
}{\param{wxGBSizerItem*
}{item
}}
45 The Add methods return true if the item was successfully placed at the
46 given position, false if something was already there.
51 \membersection{wxGridBagSizer::CalcMin
}\label{wxgridbagsizercalcmin
}
53 \func{wxSize
}{CalcMin
}{\void}
55 Called when the managed size of the sizer is needed or when layout
59 \membersection{wxGridBagSizer::CheckForIntersection
}\label{wxgridbagsizercheckforintersection
}
61 \func{bool
}{CheckForIntersection
}{\param{wxGBSizerItem*
}{item
},
\param{wxGBSizerItem*
}{excludeItem = NULL
}}
63 \func{bool
}{CheckForIntersection
}{\param{const wxGBPosition\&
}{pos
},
\param{const wxGBSpan\&
}{span
},
\param{wxGBSizerItem*
}{excludeItem = NULL
}}
65 Look at all items and see if any intersect (or would overlap) the given
66 item. Returns true if so, false if there would be no overlap. If an
67 excludeItem is given then it will not be checked for intersection, for
68 example it may be the item we are checking the position of.
72 \membersection{wxGridBagSizer::FindItem
}\label{wxgridbagsizerfinditem
}
74 \func{wxGBSizerItem*
}{FindItem
}{\param{wxWindow*
}{window
}}
76 \func{wxGBSizerItem*
}{FindItem
}{\param{wxSizer*
}{sizer
}}
78 Find the sizer item for the given window or subsizer, returns NULL if
79 not found. (non-recursive)
83 \membersection{wxGridBagSizer::FindItemAtPoint
}\label{wxgridbagsizerfinditematpoint
}
85 \func{wxGBSizerItem*
}{FindItemAtPoint
}{\param{const wxPoint\&
}{pt
}}
87 Return the sizer item located at the point given in pt, or NULL if
88 there is no item at that point. The (x,y) coordinates in pt correspond
89 to the client coordinates of the window using the sizer for
90 layout. (non-recursive)
94 \membersection{wxGridBagSizer::FindItemAtPosition
}\label{wxgridbagsizerfinditematposition
}
96 \func{wxGBSizerItem*
}{FindItemAtPosition
}{\param{const wxGBPosition\&
}{pos
}}
98 Return the sizer item for the given grid cell, or NULL if there is no
99 item at that position. (non-recursive)
103 \membersection{wxGridBagSizer::FindItemWithData
}\label{wxgridbagsizerfinditemwithdata
}
105 \func{wxGBSizerItem*
}{FindItemWithData
}{\param{const wxObject*
}{userData
}}
107 Return the sizer item that has a matching user data (it only compares
108 pointer values) or NULL if not found. (non-recursive)
112 \membersection{wxGridBagSizer::GetCellSize
}\label{wxgridbagsizergetcellsize
}
114 \constfunc{wxSize
}{GetCellSize
}{\param{int
}{row
},
\param{int
}{col
}}
116 Get the size of the specified cell, including hgap and vgap. Only
117 valid after a Layout.
121 \membersection{wxGridBagSizer::GetEmptyCellSize
}\label{wxgridbagsizergetemptycellsize
}
123 \constfunc{wxSize
}{GetEmptyCellSize
}{\void}
125 Get the size used for cells in the grid with no item.
129 \membersection{wxGridBagSizer::GetItemPosition
}\label{wxgridbagsizergetitemposition
}
131 \func{wxGBPosition
}{GetItemPosition
}{\param{wxWindow*
}{window
}}
133 \func{wxGBPosition
}{GetItemPosition
}{\param{wxSizer*
}{sizer
}}
135 \func{wxGBPosition
}{GetItemPosition
}{\param{size
\_t }{index
}}
137 Get the grid position of the specified item.
141 \membersection{wxGridBagSizer::GetItemSpan
}\label{wxgridbagsizergetitemspan
}
143 \func{wxGBSpan
}{GetItemSpan
}{\param{wxWindow*
}{window
}}
145 \func{wxGBSpan
}{GetItemSpan
}{\param{wxSizer*
}{sizer
}}
147 \func{wxGBSpan
}{GetItemSpan
}{\param{size
\_t }{index
}}
149 Get the row/col spanning of the specified item
153 \membersection{wxGridBagSizer::RecalcSizes
}\label{wxgridbagsizerrecalcsizes
}
155 \func{void
}{RecalcSizes
}{\void}
157 Called when the managed size of the sizer is needed or when layout
161 \membersection{wxGridBagSizer::SetEmptyCellSize
}\label{wxgridbagsizersetemptycellsize
}
163 \func{void
}{SetEmptyCellSize
}{\param{const wxSize\&
}{sz
}}
165 Set the size used for cells in the grid with no item.
169 \membersection{wxGridBagSizer::SetItemPosition
}\label{wxgridbagsizersetitemposition
}
171 \func{bool
}{SetItemPosition
}{\param{wxWindow*
}{window
},
\param{const wxGBPosition\&
}{pos
}}
173 \func{bool
}{SetItemPosition
}{\param{wxSizer*
}{sizer
},
\param{const wxGBPosition\&
}{pos
}}
175 \func{bool
}{SetItemPosition
}{\param{size
\_t }{index
},
\param{const wxGBPosition\&
}{pos
}}
177 Set the grid position of the specified item. Returns true on success.
178 If the move is not allowed (because an item is already there) then
183 \membersection{wxGridBagSizer::SetItemSpan
}\label{wxgridbagsizersetitemspan
}
185 \func{bool
}{SetItemSpan
}{\param{wxWindow*
}{window
},
\param{const wxGBSpan\&
}{span
}}
187 \func{bool
}{SetItemSpan
}{\param{wxSizer*
}{sizer
},
\param{const wxGBSpan\&
}{span
}}
189 \func{bool
}{SetItemSpan
}{\param{size
\_t }{index
},
\param{const wxGBSpan\&
}{span
}}
191 Set the row/col spanning of the specified item. Returns true on
192 success. If the move is not allowed (because an item is already there)
193 then false is returned.