Provide shorter synonyms for wxEVT_XXX constants.
[wxWidgets.git] / interface / wx / choicebk.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: choicebk.h
3 // Purpose: interface of wxChoicebook
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9
10 // wxChoicebook flags
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
17
18 wxEventType wxEVT_CHOICEBOOK_PAGE_CHANGED;
19 wxEventType wxEVT_CHOICEBOOK_PAGE_CHANGING;
20
21 /**
22 @class wxChoicebook
23
24 wxChoicebook is a class similar to wxNotebook, but uses a wxChoice control
25 to show the labels instead of the tabs.
26
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
29 action.
30
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.
35
36 @beginStyleTable
37 @style{wxCHB_DEFAULT}
38 Choose the default location for the labels depending on the current
39 platform (left everywhere except Mac where it is top).
40 @style{wxCHB_TOP}
41 Place labels above the page area.
42 @style{wxCHB_LEFT}
43 Place labels on the left side.
44 @style{wxCHB_RIGHT}
45 Place labels on the right side.
46 @style{wxCHB_BOTTOM}
47 Place labels below the page area.
48 @endStyleTable
49
50 @beginEventEmissionTable{wxBookCtrlEvent}
51 @event{EVT_CHOICEBOOK_PAGE_CHANGED(id, func)}
52 The page selection was changed.
53 Processes a @c wxEVT_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_CHOICEBOOK_PAGE_CHANGING event.
57 This event can be vetoed (using wxNotifyEvent::Veto()).
58 @endEventTable
59
60 @library{wxcore}
61 @category{bookctrl}
62 @appearance{choicebook}
63
64 @see @ref overview_bookctrl, wxNotebook, @ref page_samples_notebook
65 */
66 class wxChoicebook : public wxBookCtrlBase
67 {
68 public:
69 //@{
70 /**
71 Constructs a choicebook control.
72 */
73 wxChoicebook();
74 wxChoicebook(wxWindow* parent, wxWindowID id,
75 const wxPoint& pos = wxDefaultPosition,
76 const wxSize& size = wxDefaultSize,
77 long style = 0,
78 const wxString& name = wxEmptyString);
79 //@}
80
81 /**
82 Create the choicebook control that has already been constructed with
83 the default constructor.
84 */
85 bool Create(wxWindow *parent,
86 wxWindowID id,
87 const wxPoint& pos = wxDefaultPosition,
88 const wxSize& size = wxDefaultSize,
89 long style = 0,
90 const wxString& name = wxEmptyString);
91
92
93 /**
94 Returns the wxChoice associated with the control.
95 */
96 wxChoice * GetChoiceCtrl() const;
97 };
98