1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxChoicebook
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
11 #define wxCHB_DEFAULT wxBK_DEFAULT
12 #define wxCHB_TOP wxBK_TOP
13 #define wxCHB_BOTTOM wxBK_BOTTOM
14 #define wxCHB_LEFT wxBK_LEFT
15 #define wxCHB_RIGHT wxBK_RIGHT
16 #define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK
18 wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED
;
19 wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING
;
24 wxChoicebook is a class similar to wxNotebook, but uses a wxChoice control
25 to show the labels instead of the tabs.
27 For usage documentation of this class, please refer to the base abstract class
28 wxBookCtrl. You can also use the @ref page_samples_notebook to see wxChoicebook in
31 wxChoicebook allows the use of wxBookCtrlBase::GetControlSizer(), allowing
32 a program to add other controls next to the choice control. This is
33 particularly useful when screen space is restricted, as it often is when
34 wxChoicebook is being employed.
38 Choose the default location for the labels depending on the current
39 platform (left everywhere except Mac where it is top).
41 Place labels above the page area.
43 Place labels on the left side.
45 Place labels on the right side.
47 Place labels below the page area.
50 @beginEventEmissionTable{wxBookCtrlEvent}
51 @event{EVT_CHOICEBOOK_PAGE_CHANGED(id, func)}
52 The page selection was changed.
53 Processes a @c wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED event.
54 @event{EVT_CHOICEBOOK_PAGE_CHANGING(id, func)}
55 The page selection is about to be changed.
56 Processes a @c wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING event.
57 This event can be vetoed (using wxNotifyEvent::Veto()).
62 @appearance{choicebook.png}
64 @see @ref overview_bookctrl, wxNotebook, @ref page_samples_notebook
66 class wxChoicebook
: public wxBookCtrlBase
71 Constructs a choicebook control.
74 wxChoicebook(wxWindow
* parent
, wxWindowID id
,
75 const wxPoint
& pos
= wxDefaultPosition
,
76 const wxSize
& size
= wxDefaultSize
,
78 const wxString
& name
= wxEmptyString
);
82 Create the choicebook control that has already been constructed with
83 the default constructor.
85 bool Create(wxWindow
*parent
,
87 const wxPoint
& pos
= wxDefaultPosition
,
88 const wxSize
& size
= wxDefaultSize
,
90 const wxString
& name
= wxEmptyString
);
94 Returns the wxChoice associated with the control.
96 wxChoice
* GetChoiceCtrl() const;