1 \section{\class{wxTabCtrl
}}\label{wxtabctrl
}
3 This class represents a tab control, which manages multiple tabs.
5 \wxheading{Derived from
}
7 \helpref{wxControl
}{wxcontrol
}\\
8 \helpref{wxWindow
}{wxwindow
}\\
9 \helpref{wxEvtHandler
}{wxevthandler
}\\
10 \helpref{wxObject
}{wxobject
}
14 \helpref{wxTabEvent
}{wxtabevent
},
\helpref{wxImageList
}{wximagelist
}
16 \latexignore{\rtfignore{\wxheading{Members
}}}
18 \membersection{wxTabCtrl::wxTabCtrl
}\label{wxtabctrlconstr
}
20 \func{}{wxTabCtrl
}{\void}
24 \func{}{wxTabCtrl
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{id
},
\param{const wxPoint\&
}{ pos = wxDefaultPosition
},
25 \param{const wxSize\&
}{ size
},
\param{long
}{ style =
0},
\param{const wxString\&
}{name = "tabCtrl"
}}
27 Constructs a tab control.
29 \wxheading{Parameters
}
31 \docparam{parent
}{The parent window. Must be non-NULL.
}
33 \docparam{id
}{The window identifier.
}
35 \docparam{pos
}{The window position.
}
37 \docparam{size
}{The window size.
}
39 \docparam{style
}{The window style. Its value is a bit list of zero or more of
{\bf wxTC
\_MULTILINE},
40 {\bf wxTC
\_RIGHTJUSTIFY},
{\bf wxTC
\_FIXEDWIDTH} and
{\bf wxTC
\_OWNERDRAW}.
}
42 \membersection{wxTabCtrl::
\destruct{wxTabCtrl
}}
44 \func{}{\destruct{wxTabCtrl
}}{\void}
46 Destroys the wxTabCtrl object.
48 \membersection{wxTabCtrl::Create
}\label{wxtabctrlcreate
}
50 \func{bool
}{Create
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{id
},
\param{const wxPoint\&
}{ pos = wxDefaultPosition
},
51 \param{const wxSize\&
}{ size
},
\param{long
}{ style =
0},
\param{const wxString\&
}{name = "tabCtrl"
}}
53 Creates a tab control. See
\helpref{wxTabCtrl::wxTabCtrl
}{wxtabctrlconstr
} for a description
56 \membersection{wxTabCtrl::DeleteAllItems
}\label{wxtabctrldeleteallitems
}
58 \func{bool
}{DeleteAllItems
}{\void}
60 Deletes all tab items.
62 \membersection{wxTabCtrl::DeleteItem
}\label{wxtabctrldeleteitem
}
64 \func{bool
}{DeleteItem
}{\param{int
}{ item
}}
66 Deletes the specified tab item.
68 \membersection{wxTabCtrl::GetCurFocus
}\label{wxtabctrlgetcurfocus
}
70 \constfunc{int
}{GetCurFocus
}{\void}
72 Returns the index for the tab with the focus, or -
1 if none has the focus.
74 \membersection{wxTabCtrl::GetImageList
}\label{wxtabctrlgetimagelist
}
76 \constfunc{wxImageList*
}{GetImageList
}{\void}
78 Returns the associated image list.
82 \helpref{wxImageList
}{wximagelist
},
\helpref{wxTabCtrl::SetImageList
}{wxtabctrlsetimagelist
}
84 \membersection{wxTabCtrl::GetItemCount
}\label{wxtabctrlgetitemcount
}
86 \constfunc{int
}{GetItemCount
}{\void}
88 Returns the number of tabs in the tab control.
90 \membersection{wxTabCtrl::GetItemData
}\label{wxtabctrlgetitemdata
}
92 \constfunc{void*
}{GetItemData
}{\void}
94 Returns the client data for the given tab.
96 \membersection{wxTabCtrl::GetItemImage
}\label{wxtabctrlgetitemimage
}
98 \constfunc{int
}{GetItemImage
}{\void}
100 Returns the image index for the given tab.
102 \membersection{wxTabCtrl::GetItemRect
}\label{wxtabctrlgetitemrect
}
104 \constfunc{bool
}{GetItemRect
}{\param{int
}{item
},
\param{wxRect\&
}{ rect
}}
106 Returns the rectangle bounding the given tab.
110 \helpref{wxRect
}{wxrect
}
112 \membersection{wxTabCtrl::GetItemText
}\label{wxtabctrlgetitemtext
}
114 \constfunc{wxString
}{GetItemText
}{\void}
116 Returns the string for the given tab.
118 \membersection{wxTabCtrl::GetRowCount
}\label{wxtabctrlgetrowcount
}
120 \constfunc{bool
}{GetRowCount
}{\void}
122 Returns the number of rows in the tab control.
124 \membersection{wxTabCtrl::GetSelection
}\label{wxtabctrlgetselection
}
126 \constfunc{int
}{GetSelection
}{\void}
128 Returns the index for the currently selected tab.
132 \helpref{wxTabCtrl::SetSelection
}{wxtabctrlsetselection
}
134 \membersection{wxTabCtrl::HitTest
}\label{wxtabctrlhittest
}
136 \func{int
}{HitTest
}{\param{const wxPoint\&
}{ pt
},
\param{long\&
}{ flags
}}
138 Tests whether a tab is at the specified position.
140 \wxheading{Parameters
}
142 \docparam{pt
}{Specifies the point for the hit test.
}
144 \docparam{flags
}{Return value for detailed information. One of the following values:
147 \begin{twocollist
}\itemsep=
0pt
148 \twocolitem{{\bf wxTAB
\_HITTEST\_NOWHERE}}{There was no tab under this point.
}
149 \twocolitem{{\bf wxTAB
\_HITTEST\_ONICON}}{The point was over an icon.
}
150 \twocolitem{{\bf wxTAB
\_HITTEST\_ONLABEL}}{The point was over a label.
}
151 \twocolitem{{\bf wxTAB
\_HITTEST\_ONITEM}}{The point was over an item, but not on the label or icon.
}
155 \wxheading{Return value
}
157 Returns the zero-based tab index or -
1 if no tab is at the specified position.
159 \membersection{wxTabCtrl::InsertItem
}\label{wxtabctrlinsertitem
}
161 \func{void
}{InsertItem
}{\param{int
}{ item
},
\param{const wxString\&
}{ text
},
\param{int
}{imageId = -
1},
162 \param{void*
}{ clientData = NULL
}}
166 \wxheading{Parameters
}
168 \docparam{item
}{Specifies the index for the new item.
}
170 \docparam{text
}{Specifies the text for the new item.
}
172 \docparam{imageId
}{Specifies the optional image index for the new item.
}
174 \docparam{clientData
}{Specifies the optional client data for the new item.
}
176 \wxheading{Return value
}
178 TRUE if successful, FALSE otherwise.
180 \membersection{wxTabCtrl::SetItemData
}\label{wxtabctrlsetitemdata
}
182 \func{bool
}{SetItemData
}{\param{int
}{ item
},
\param{void*
}{ data
}}
184 Sets the client data for a tab.
186 \membersection{wxTabCtrl::SetItemImage
}\label{wxtabctrlsetitemimage
}
188 \func{bool
}{SetItemImage
}{\param{int
}{ item
},
\param{int
}{image
}}
190 Sets the image index for the given tab.
{\it image
} is an index into
191 the image list which was set with
\helpref{wxTabCtrl::SetImageList
}{wxtabctrlsetimagelist
}.
193 \membersection{wxTabCtrl::SetImageList
}\label{wxtabctrlsetimagelist
}
195 \func{void
}{SetImageList
}{\param{wxImageList*
}{ imageList
}}
197 Sets the image list for the tab control.
201 \helpref{wxImageList
}{wximagelist
}
203 \membersection{wxTabCtrl::SetItemSize
}\label{wxtabctrlsetitemsize
}
205 \func{void
}{SetItemSize
}{\param{const wxSize\&
}{ size
}}
207 Sets the width and height of the tabs.
209 \membersection{wxTabCtrl::SetItemText
}\label{wxtabctrlsetitemtext
}
211 \func{bool
}{SetItemText
}{\param{int
}{ item
},
\param{const wxString\&
}{text
}}
213 Sets the text for the given tab.
215 \membersection{wxTabCtrl::SetPadding
}\label{wxtabctrlsetpadding
}
217 \func{void
}{SetPadding
}{\param{const wxSize\&
}{ padding
}}
219 Sets the amount of space around each tab's icon and label.
221 \membersection{wxTabCtrl::SetSelection
}\label{wxtabctrlsetselection
}
223 \func{int
}{SetSelection
}{\param{int
}{ item
}}
225 Sets the selection for the given tab, returning the index of the previously
226 selected tab. Returns -
1 if the call was unsuccessful.
230 \helpref{wxTabCtrl::GetSelection
}{wxtabctrlgetselection
}