]>
Commit | Line | Data |
---|---|---|
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 | ||
59505092 | 14 | Classes: \helpref{wxNotebook}{wxnotebook}, \helpref{wxListbook}{wxlistbook}, \helpref{wxChoicebook}{wxchoicebook}, |
3c55b365 | 15 | \helpref{wxTreebook}{wxtreebook}, \helpref{wxToolbook}{wxtoolbook} |
b742a43b WS |
16 | |
17 | \subsection{Introduction}\label{wxbookctrlintro} | |
18 | ||
17902387 | 19 | A book control is a convenient way of displaying multiple pages of information, |
3c55b365 | 20 | displayed 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 | ||
59505092 WS |
30 | See \helpref{Notebook sample}{samplenotebook} for an example of wxBookCtrl usage. |
31 | ||
b742a43b WS |
32 | \subsection{Best book}\label{wxbestbookctrl} |
33 | ||
17902387 JS |
34 | wxBookCtrl is mapped to the class best suited for a given platform. |
35 | Currently it provides \helpref{wxChoicebook}{wxchoicebook} for smartphones equipped with | |
36 | WinCE, and \helpref{wxNotebook}{wxnotebook} for all other platforms. The mapping consists of: | |
b742a43b WS |
37 | |
38 | \twocolwidtha{5cm} | |
39 | \begin{twocollist}\itemsep=0pt | |
40 | \twocolitem{wxBookCtrl}{wxChoicebook or wxNotebook} | |
41 | \twocolitem{wxBookCtrlEvent}{wxChoicebookEvent or wxNotebookEvent} | |
42 | \twocolitem{wxEVT\_COMMAND\_BOOKCTRL\_PAGE\_CHANGED}{wxEVT\_COMMAND\_CHOICEBOOK\_PAGE\_CHANGED or wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGED} | |
43 | \twocolitem{wxEVT\_COMMAND\_BOOKCTRL\_PAGE\_CHANGING}{wxEVT\_COMMAND\_CHOICEBOOK\_PAGE\_CHANGING or wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGING} | |
44 | \twocolitem{EVT\_BOOKCTRL\_PAGE\_CHANGED(id, fn)}{EVT\_CHOICEBOOK\_PAGE\_CHANGED(id, fn) or EVT\_NOTEBOOK\_PAGE\_CHANGED(id, fn)} | |
45 | \twocolitem{EVT\_BOOKCTRL\_PAGE\_CHANGING(id, fn)}{EVT\_CHOICEBOOK\_PAGE\_CHANGING(id, fn) or EVT\_NOTEBOOK\_PAGE\_CHANGING(id, fn)} | |
b742a43b WS |
46 | \end{twocollist} |
47 | ||
59505092 WS |
48 | For orientation of the book controller, use following flags in style: |
49 | \twocolwidtha{5cm} | |
50 | \begin{twocollist}\itemsep=0pt | |
51 | \twocolitem{\windowstyle{wxBK\_TOP}}{controller above pages} | |
52 | \twocolitem{\windowstyle{wxBK\_BOTTOM}}{controller below pages} | |
53 | \twocolitem{\windowstyle{wxBK\_LEFT}}{controller on the left} | |
54 | \twocolitem{\windowstyle{wxBK\_RIGHT}}{controller on the right} | |
55 | \twocolitem{\windowstyle{wxBK\_DEFAULT}}{native controller placement} | |
56 | \end{twocollist} |