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
}.
10 \wxheading{Derived from
}
12 \helpref{wxFlexGridSizer
}{wxflexgridsizer
}\\
13 \helpref{wxGridSizer
}{wxgridsizer
}\\
14 \helpref{wxSizer
}{wxsizer
}\\
15 \helpref{wxObject
}{wxobject
}
17 \wxheading{Include files
}
23 \helpref{wxCore
}{librarieslist
}
25 \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
34 \membersection{wxGridBagSizer::Add
}\label{wxgridbagsizeradd
}
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
}}
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
}}
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
}}
42 \func{wxSizerItem*
}{Add
}{\param{wxGBSizerItem*
}{item
}}
44 The Add methods return a valid pointer if the item was successfully placed at the
45 given position, NULL if something was already there.
47 \membersection{wxGridBagSizer::CalcMin
}\label{wxgridbagsizercalcmin
}
49 \func{wxSize
}{CalcMin
}{\void}
51 Called when the managed size of the sizer is needed or when layout
54 \membersection{wxGridBagSizer::CheckForIntersection
}\label{wxgridbagsizercheckforintersection
}
56 \func{bool
}{CheckForIntersection
}{\param{wxGBSizerItem*
}{item
},
\param{wxGBSizerItem*
}{excludeItem = NULL
}}
58 \func{bool
}{CheckForIntersection
}{\param{const wxGBPosition\&
}{pos
},
\param{const wxGBSpan\&
}{span
},
\param{wxGBSizerItem*
}{excludeItem = NULL
}}
60 Look at all items and see if any intersect (or would overlap) the given
61 item. Returns true if so, false if there would be no overlap. If an
62 excludeItem is given then it will not be checked for intersection, for
63 example it may be the item we are checking the position of.
65 \membersection{wxGridBagSizer::FindItem
}\label{wxgridbagsizerfinditem
}
67 \func{wxGBSizerItem*
}{FindItem
}{\param{wxWindow*
}{window
}}
69 \func{wxGBSizerItem*
}{FindItem
}{\param{wxSizer*
}{sizer
}}
71 Find the sizer item for the given window or subsizer, returns NULL if
72 not found. (non-recursive)
74 \membersection{wxGridBagSizer::FindItemAtPoint
}\label{wxgridbagsizerfinditematpoint
}
76 \func{wxGBSizerItem*
}{FindItemAtPoint
}{\param{const wxPoint\&
}{pt
}}
78 Return the sizer item located at the point given in pt, or NULL if
79 there is no item at that point. The (x,y) coordinates in pt correspond
80 to the client coordinates of the window using the sizer for
81 layout. (non-recursive)
83 \membersection{wxGridBagSizer::FindItemAtPosition
}\label{wxgridbagsizerfinditematposition
}
85 \func{wxGBSizerItem*
}{FindItemAtPosition
}{\param{const wxGBPosition\&
}{pos
}}
87 Return the sizer item for the given grid cell, or NULL if there is no
88 item at that position. (non-recursive)
90 \membersection{wxGridBagSizer::FindItemWithData
}\label{wxgridbagsizerfinditemwithdata
}
92 \func{wxGBSizerItem*
}{FindItemWithData
}{\param{const wxObject*
}{userData
}}
94 Return the sizer item that has a matching user data (it only compares
95 pointer values) or NULL if not found. (non-recursive)
97 \membersection{wxGridBagSizer::GetCellSize
}\label{wxgridbagsizergetcellsize
}
99 \constfunc{wxSize
}{GetCellSize
}{\param{int
}{row
},
\param{int
}{col
}}
101 Get the size of the specified cell, including hgap and vgap. Only
102 valid after a Layout.
104 \membersection{wxGridBagSizer::GetEmptyCellSize
}\label{wxgridbagsizergetemptycellsize
}
106 \constfunc{wxSize
}{GetEmptyCellSize
}{\void}
108 Get the size used for cells in the grid with no item.
110 \membersection{wxGridBagSizer::GetItemPosition
}\label{wxgridbagsizergetitemposition
}
112 \func{wxGBPosition
}{GetItemPosition
}{\param{wxWindow*
}{window
}}
114 \func{wxGBPosition
}{GetItemPosition
}{\param{wxSizer*
}{sizer
}}
116 \func{wxGBPosition
}{GetItemPosition
}{\param{size
\_t }{index
}}
118 Get the grid position of the specified item.
120 \membersection{wxGridBagSizer::GetItemSpan
}\label{wxgridbagsizergetitemspan
}
122 \func{wxGBSpan
}{GetItemSpan
}{\param{wxWindow*
}{window
}}
124 \func{wxGBSpan
}{GetItemSpan
}{\param{wxSizer*
}{sizer
}}
126 \func{wxGBSpan
}{GetItemSpan
}{\param{size
\_t }{index
}}
128 Get the row/col spanning of the specified item
130 \membersection{wxGridBagSizer::RecalcSizes
}\label{wxgridbagsizerrecalcsizes
}
132 \func{void
}{RecalcSizes
}{\void}
134 Called when the managed size of the sizer is needed or when layout
137 \membersection{wxGridBagSizer::SetEmptyCellSize
}\label{wxgridbagsizersetemptycellsize
}
139 \func{void
}{SetEmptyCellSize
}{\param{const wxSize\&
}{sz
}}
141 Set the size used for cells in the grid with no item.
143 \membersection{wxGridBagSizer::SetItemPosition
}\label{wxgridbagsizersetitemposition
}
145 \func{bool
}{SetItemPosition
}{\param{wxWindow*
}{window
},
\param{const wxGBPosition\&
}{pos
}}
147 \func{bool
}{SetItemPosition
}{\param{wxSizer*
}{sizer
},
\param{const wxGBPosition\&
}{pos
}}
149 \func{bool
}{SetItemPosition
}{\param{size
\_t }{index
},
\param{const wxGBPosition\&
}{pos
}}
151 Set the grid position of the specified item. Returns true on success.
152 If the move is not allowed (because an item is already there) then
155 \membersection{wxGridBagSizer::SetItemSpan
}\label{wxgridbagsizersetitemspan
}
157 \func{bool
}{SetItemSpan
}{\param{wxWindow*
}{window
},
\param{const wxGBSpan\&
}{span
}}
159 \func{bool
}{SetItemSpan
}{\param{wxSizer*
}{sizer
},
\param{const wxGBSpan\&
}{span
}}
161 \func{bool
}{SetItemSpan
}{\param{size
\_t }{index
},
\param{const wxGBSpan\&
}{span
}}
163 Set the row/col spanning of the specified item. Returns true on
164 success. If the move is not allowed (because an item is already there)
165 then false is returned.