]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/tbook.tex
silence gcc warnings about values not handled in switch
[wxWidgets.git] / docs / latex / wx / tbook.tex
CommitLineData
b742a43b
WS
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: tbook.tex
3%% Purpose: wxBookCtrl overview
4%% Author: Wlodzimierz ABX Skiba
5%% Modified by:
6%% Created: 11/18/2004
7%% RCS-ID: $Id$
8%% Copyright: (c) wxWidgets team
9%% License: wxWindows license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{wxBookCtrl overview}\label{wxbookctrloverview}
13
3c55b365
JS
14Classes: \helpref{wxNotebook}{wxnotebook}, \helpref{wxListbook}{wxlistbook}, \helpref{wxChoicebook}{wxchoicebook},
15\helpref{wxTreebook}{wxtreebook}, \helpref{wxToolbook}{wxtoolbook}
b742a43b
WS
16
17\subsection{Introduction}\label{wxbookctrlintro}
18
17902387 19A book control is a convenient way of displaying multiple pages of information,
3c55b365 20displayed one page at a time. wxWidgets has five variants of this control:
b742a43b
WS
21
22\begin{itemize}\itemsep=0pt
17902387
JS
23\item \helpref{wxNotebook}{wxnotebook}: uses a row of tabs
24\item \helpref{wxListbook}{wxlistbook}: controlled by a \helpref{wxListCtrl}{wxlistctrl}
25\item \helpref{wxChoicebook}{wxchoicebook}: controlled by a \helpref{wxChoice}{wxchoice}
3c55b365
JS
26\item \helpref{wxTreebook}{wxtreebook}: controlled by a \helpref{wxTreeCtrl}{wxtreectrl}
27\item \helpref{wxToolbook}{wxtoolbook}: controlled by a \helpref{wxToolBar}{wxtoolbar}
b742a43b
WS
28\end{itemize}
29
30\subsection{Best book}\label{wxbestbookctrl}
31
17902387
JS
32wxBookCtrl is mapped to the class best suited for a given platform.
33Currently it provides \helpref{wxChoicebook}{wxchoicebook} for smartphones equipped with
34WinCE, and \helpref{wxNotebook}{wxnotebook} for all other platforms. The mapping consists of:
b742a43b
WS
35
36\twocolwidtha{5cm}
37\begin{twocollist}\itemsep=0pt
38\twocolitem{wxBookCtrl}{wxChoicebook or wxNotebook}
39\twocolitem{wxBookCtrlEvent}{wxChoicebookEvent or wxNotebookEvent}
40\twocolitem{wxEVT\_COMMAND\_BOOKCTRL\_PAGE\_CHANGED}{wxEVT\_COMMAND\_CHOICEBOOK\_PAGE\_CHANGED or wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGED}
41\twocolitem{wxEVT\_COMMAND\_BOOKCTRL\_PAGE\_CHANGING}{wxEVT\_COMMAND\_CHOICEBOOK\_PAGE\_CHANGING or wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGING}
42\twocolitem{EVT\_BOOKCTRL\_PAGE\_CHANGED(id, fn)}{EVT\_CHOICEBOOK\_PAGE\_CHANGED(id, fn) or EVT\_NOTEBOOK\_PAGE\_CHANGED(id, fn)}
43\twocolitem{EVT\_BOOKCTRL\_PAGE\_CHANGING(id, fn)}{EVT\_CHOICEBOOK\_PAGE\_CHANGING(id, fn) or EVT\_NOTEBOOK\_PAGE\_CHANGING(id, fn)}
44\twocolitem{\windowstyle{wxBC\_TOP}}{\windowstyle{wxCHB\_TOP} or \windowstyle{wxNB\_TOP}}
45\twocolitem{\windowstyle{wxBC\_BOTTOM}}{\windowstyle{wxCHB\_BOTTOM} or \windowstyle{wxNB\_BOTTOM}}
46\twocolitem{\windowstyle{wxBC\_LEFT}}{\windowstyle{wxCHB\_LEFT} or \windowstyle{wxNB\_LEFT}}
47\twocolitem{\windowstyle{wxBC\_RIGHT}}{\windowstyle{wxCHB\_RIGHT} or \windowstyle{wxNB\_RIGHT}}
48\twocolitem{\windowstyle{wxBC\_DEFAULT}}{\windowstyle{wxCHB\_DEFAULT} or \windowstyle{wxNB\_DEFAULT}}
49\end{twocollist}
50
17902387 51See {\tt samples/widgets} for an example of wxBookCtrl usage.
dceb1c09 52