2008-02-18 19:04:03 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: bookctrl
|
|
|
|
// Purpose: topic overview
|
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/*!
|
2008-02-19 08:28:24 -05:00
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
@page bookctrl_overview wxBookCtrl overview
|
2008-02-19 08:28:24 -05:00
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
Classes: #wxNotebook, #wxListbook, #wxChoicebook,
|
|
|
|
#wxTreebook, #wxToolbook
|
|
|
|
#Introduction
|
|
|
|
@ref bestbookctrl_overview
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
@section wxbookctrlintro Introduction
|
2008-02-19 08:28:24 -05:00
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
A book control is a convenient way of displaying multiple pages of information,
|
|
|
|
displayed one page at a time. wxWidgets has five variants of this control:
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
#wxNotebook: uses a row of tabs
|
|
|
|
#wxListbook: controlled by a #wxListCtrl
|
|
|
|
#wxChoicebook: controlled by a #wxChoice
|
|
|
|
#wxTreebook: controlled by a #wxTreeCtrl
|
|
|
|
#wxToolbook: controlled by a #wxToolBar
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
See @ref samplenotebook_overview for an example of wxBookCtrl usage.
|
2008-02-19 08:28:24 -05:00
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
@section wxbestbookctrl Best book
|
2008-02-19 08:28:24 -05:00
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
wxBookCtrl is mapped to the class best suited for a given platform.
|
|
|
|
Currently it provides #wxChoicebook for smartphones equipped with
|
|
|
|
WinCE, and #wxNotebook for all other platforms. The mapping consists of:
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
wxBookCtrl
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
wxChoicebook or wxNotebook
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
wxBookCtrlEvent
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
wxChoicebookEvent or wxNotebookEvent
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED or wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING or wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
EVT_BOOKCTRL_PAGE_CHANGED(id, fn)
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
EVT_CHOICEBOOK_PAGE_CHANGED(id, fn) or EVT_NOTEBOOK_PAGE_CHANGED(id, fn)
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
EVT_BOOKCTRL_PAGE_CHANGING(id, fn)
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
EVT_CHOICEBOOK_PAGE_CHANGING(id, fn) or EVT_NOTEBOOK_PAGE_CHANGING(id, fn)
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
For orientation of the book controller, use following flags in style:
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
@b wxBK_TOP
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
controller above pages
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
@b wxBK_BOTTOM
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
controller below pages
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
@b wxBK_LEFT
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
controller on the left
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
@b wxBK_RIGHT
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
controller on the right
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
@b wxBK_DEFAULT
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
native controller placement
|
2008-02-19 08:28:24 -05:00
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
*/
|
2008-02-19 08:28:24 -05:00
|
|
|
|
|
|
|
|