1998-05-20 14:25:30 +00:00
|
|
|
\section{\class{wxTabCtrl}}\label{wxtabctrl}
|
|
|
|
|
|
|
|
This class represents a tab control, which manages multiple tabs.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxControl}{wxcontrol}\\
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 20:41:29 +00:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/tabctrl.h>
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\wxheading{See also}
|
|
|
|
|
1998-09-06 14:43:36 +00:00
|
|
|
\helpref{wxTabEvent}{wxtabevent}, \helpref{wxImageList}{wximagelist},\rtfsp
|
|
|
|
\helpref{wxNotebook}{wxnotebook}
|
1998-06-14 12:11:50 +00:00
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::wxTabCtrl}\label{wxtabctrlconstr}
|
|
|
|
|
|
|
|
\func{}{wxTabCtrl}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{}{wxTabCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
|
|
|
|
\param{const wxSize\&}{ size}, \param{long}{ style = 0}, \param{const wxString\& }{name = "tabCtrl"}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Constructs a tab control.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{parent}{The parent window. Must be non-NULL.}
|
|
|
|
|
|
|
|
\docparam{id}{The window identifier.}
|
|
|
|
|
|
|
|
\docparam{pos}{The window position.}
|
|
|
|
|
|
|
|
\docparam{size}{The window size.}
|
|
|
|
|
|
|
|
\docparam{style}{The window style. Its value is a bit list of zero or more of {\bf wxTC\_MULTILINE},
|
|
|
|
{\bf wxTC\_RIGHTJUSTIFY}, {\bf wxTC\_FIXEDWIDTH} and {\bf wxTC\_OWNERDRAW}.}
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::\destruct{wxTabCtrl}}
|
|
|
|
|
|
|
|
\func{}{\destruct{wxTabCtrl}}{\void}
|
|
|
|
|
|
|
|
Destroys the wxTabCtrl object.
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::Create}\label{wxtabctrlcreate}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
|
|
|
|
\param{const wxSize\&}{ size}, \param{long}{ style = 0}, \param{const wxString\& }{name = "tabCtrl"}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Creates a tab control. See \helpref{wxTabCtrl::wxTabCtrl}{wxtabctrlconstr} for a description
|
|
|
|
of the parameters.
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\membersection{wxTabCtrl::DeleteAllItems}\label{wxtabctrldeleteallitems}
|
|
|
|
|
|
|
|
\func{bool}{DeleteAllItems}{\void}
|
|
|
|
|
|
|
|
Deletes all tab items.
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::DeleteItem}\label{wxtabctrldeleteitem}
|
|
|
|
|
|
|
|
\func{bool}{DeleteItem}{\param{int}{ item}}
|
|
|
|
|
|
|
|
Deletes the specified tab item.
|
|
|
|
|
1998-07-03 16:39:59 +00:00
|
|
|
\membersection{wxTabCtrl::GetCurFocus}\label{wxtabctrlgetcurfocus}
|
|
|
|
|
|
|
|
\constfunc{int}{GetCurFocus}{\void}
|
|
|
|
|
|
|
|
Returns the index for the tab with the focus, or -1 if none has the focus.
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxTabCtrl::GetImageList}\label{wxtabctrlgetimagelist}
|
|
|
|
|
|
|
|
\constfunc{wxImageList*}{GetImageList}{\void}
|
|
|
|
|
|
|
|
Returns the associated image list.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxImageList}{wximagelist}, \helpref{wxTabCtrl::SetImageList}{wxtabctrlsetimagelist}
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::GetItemCount}\label{wxtabctrlgetitemcount}
|
|
|
|
|
|
|
|
\constfunc{int}{GetItemCount}{\void}
|
|
|
|
|
|
|
|
Returns the number of tabs in the tab control.
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\membersection{wxTabCtrl::GetItemData}\label{wxtabctrlgetitemdata}
|
|
|
|
|
|
|
|
\constfunc{void*}{GetItemData}{\void}
|
|
|
|
|
|
|
|
Returns the client data for the given tab.
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::GetItemImage}\label{wxtabctrlgetitemimage}
|
|
|
|
|
|
|
|
\constfunc{int}{GetItemImage}{\void}
|
|
|
|
|
|
|
|
Returns the image index for the given tab.
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxTabCtrl::GetItemRect}\label{wxtabctrlgetitemrect}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\constfunc{bool}{GetItemRect}{\param{int }{item}, \param{wxRect\&}{ rect}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the rectangle bounding the given tab.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxRect}{wxrect}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\membersection{wxTabCtrl::GetItemText}\label{wxtabctrlgetitemtext}
|
|
|
|
|
|
|
|
\constfunc{wxString}{GetItemText}{\void}
|
|
|
|
|
|
|
|
Returns the string for the given tab.
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxTabCtrl::GetRowCount}\label{wxtabctrlgetrowcount}
|
|
|
|
|
1998-09-06 14:43:36 +00:00
|
|
|
\constfunc{int}{GetRowCount}{\void}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the number of rows in the tab control.
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::GetSelection}\label{wxtabctrlgetselection}
|
|
|
|
|
|
|
|
\constfunc{int}{GetSelection}{\void}
|
|
|
|
|
|
|
|
Returns the index for the currently selected tab.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxTabCtrl::SetSelection}{wxtabctrlsetselection}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\membersection{wxTabCtrl::HitTest}\label{wxtabctrlhittest}
|
|
|
|
|
|
|
|
\func{int}{HitTest}{\param{const wxPoint\&}{ pt}, \param{long\&}{ flags}}
|
|
|
|
|
|
|
|
Tests whether a tab is at the specified position.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{pt}{Specifies the point for the hit test.}
|
|
|
|
|
|
|
|
\docparam{flags}{Return value for detailed information. One of the following values:
|
|
|
|
|
|
|
|
\twocolwidtha{7cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\twocolitem{{\bf wxTAB\_HITTEST\_NOWHERE}}{There was no tab under this point.}
|
|
|
|
\twocolitem{{\bf wxTAB\_HITTEST\_ONICON}}{The point was over an icon.}
|
|
|
|
\twocolitem{{\bf wxTAB\_HITTEST\_ONLABEL}}{The point was over a label.}
|
|
|
|
\twocolitem{{\bf wxTAB\_HITTEST\_ONITEM}}{The point was over an item, but not on the label or icon.}
|
|
|
|
\end{twocollist}
|
|
|
|
}
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
Returns the zero-based tab index or -1 if no tab is at the specified position.
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::InsertItem}\label{wxtabctrlinsertitem}
|
|
|
|
|
|
|
|
\func{void}{InsertItem}{\param{int}{ item}, \param{const wxString\&}{ text}, \param{int }{imageId = -1},
|
|
|
|
\param{void*}{ clientData = NULL}}
|
|
|
|
|
|
|
|
Inserts a new tab.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{item}{Specifies the index for the new item.}
|
|
|
|
|
|
|
|
\docparam{text}{Specifies the text for the new item.}
|
|
|
|
|
|
|
|
\docparam{imageId}{Specifies the optional image index for the new item.}
|
|
|
|
|
|
|
|
\docparam{clientData}{Specifies the optional client data for the new item.}
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
TRUE if successful, FALSE otherwise.
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::SetItemData}\label{wxtabctrlsetitemdata}
|
|
|
|
|
|
|
|
\func{bool}{SetItemData}{\param{int}{ item}, \param{void*}{ data}}
|
|
|
|
|
|
|
|
Sets the client data for a tab.
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::SetItemImage}\label{wxtabctrlsetitemimage}
|
|
|
|
|
|
|
|
\func{bool}{SetItemImage}{\param{int}{ item}, \param{int }{image}}
|
|
|
|
|
|
|
|
Sets the image index for the given tab. {\it image} is an index into
|
1998-07-29 06:51:33 +00:00
|
|
|
the image list which was set with \helpref{wxTabCtrl::SetImageList}{wxtabctrlsetimagelist}.
|
1998-06-14 12:11:50 +00:00
|
|
|
|
|
|
|
\membersection{wxTabCtrl::SetImageList}\label{wxtabctrlsetimagelist}
|
|
|
|
|
|
|
|
\func{void}{SetImageList}{\param{wxImageList*}{ imageList}}
|
|
|
|
|
|
|
|
Sets the image list for the tab control.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxImageList}{wximagelist}
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::SetItemSize}\label{wxtabctrlsetitemsize}
|
|
|
|
|
|
|
|
\func{void}{SetItemSize}{\param{const wxSize\&}{ size}}
|
|
|
|
|
|
|
|
Sets the width and height of the tabs.
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::SetItemText}\label{wxtabctrlsetitemtext}
|
|
|
|
|
|
|
|
\func{bool}{SetItemText}{\param{int}{ item}, \param{const wxString\& }{text}}
|
|
|
|
|
|
|
|
Sets the text for the given tab.
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::SetPadding}\label{wxtabctrlsetpadding}
|
|
|
|
|
|
|
|
\func{void}{SetPadding}{\param{const wxSize\&}{ padding}}
|
|
|
|
|
|
|
|
Sets the amount of space around each tab's icon and label.
|
|
|
|
|
|
|
|
\membersection{wxTabCtrl::SetSelection}\label{wxtabctrlsetselection}
|
|
|
|
|
|
|
|
\func{int}{SetSelection}{\param{int}{ item}}
|
|
|
|
|
|
|
|
Sets the selection for the given tab, returning the index of the previously
|
|
|
|
selected tab. Returns -1 if the call was unsuccessful.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxTabCtrl::GetSelection}{wxtabctrlgetselection}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
|