XRC: make wxStaticText's wrap property a dimension.
[wxWidgets.git] / interface / wx / choicebk.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: choicebk.h
3 // Purpose: interface of wxChoicebook
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
7
8
9 // wxChoicebook flags
10 #define wxCHB_DEFAULT wxBK_DEFAULT
11 #define wxCHB_TOP wxBK_TOP
12 #define wxCHB_BOTTOM wxBK_BOTTOM
13 #define wxCHB_LEFT wxBK_LEFT
14 #define wxCHB_RIGHT wxBK_RIGHT
15 #define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK
16
17 wxEventType wxEVT_CHOICEBOOK_PAGE_CHANGED;
18 wxEventType wxEVT_CHOICEBOOK_PAGE_CHANGING;
19
20 /**
21 @class wxChoicebook
22
23 wxChoicebook is a class similar to wxNotebook, but uses a wxChoice control
24 to show the labels instead of the tabs.
25
26 For usage documentation of this class, please refer to the base abstract class
27 wxBookCtrl. You can also use the @ref page_samples_notebook to see wxChoicebook in
28 action.
29
30 wxChoicebook allows the use of wxBookCtrlBase::GetControlSizer(), allowing
31 a program to add other controls next to the choice control. This is
32 particularly useful when screen space is restricted, as it often is when
33 wxChoicebook is being employed.
34
35 @beginStyleTable
36 @style{wxCHB_DEFAULT}
37 Choose the default location for the labels depending on the current
38 platform (left everywhere except Mac where it is top).
39 @style{wxCHB_TOP}
40 Place labels above the page area.
41 @style{wxCHB_LEFT}
42 Place labels on the left side.
43 @style{wxCHB_RIGHT}
44 Place labels on the right side.
45 @style{wxCHB_BOTTOM}
46 Place labels below the page area.
47 @endStyleTable
48
49 @beginEventEmissionTable{wxBookCtrlEvent}
50 @event{EVT_CHOICEBOOK_PAGE_CHANGED(id, func)}
51 The page selection was changed.
52 Processes a @c wxEVT_CHOICEBOOK_PAGE_CHANGED event.
53 @event{EVT_CHOICEBOOK_PAGE_CHANGING(id, func)}
54 The page selection is about to be changed.
55 Processes a @c wxEVT_CHOICEBOOK_PAGE_CHANGING event.
56 This event can be vetoed (using wxNotifyEvent::Veto()).
57 @endEventTable
58
59 @library{wxcore}
60 @category{bookctrl}
61 @appearance{choicebook}
62
63 @see @ref overview_bookctrl, wxNotebook, @ref page_samples_notebook
64 */
65 class wxChoicebook : public wxBookCtrlBase
66 {
67 public:
68 //@{
69 /**
70 Constructs a choicebook control.
71 */
72 wxChoicebook();
73 wxChoicebook(wxWindow* parent, wxWindowID id,
74 const wxPoint& pos = wxDefaultPosition,
75 const wxSize& size = wxDefaultSize,
76 long style = 0,
77 const wxString& name = wxEmptyString);
78 //@}
79
80 /**
81 Create the choicebook control that has already been constructed with
82 the default constructor.
83 */
84 bool Create(wxWindow *parent,
85 wxWindowID id,
86 const wxPoint& pos = wxDefaultPosition,
87 const wxSize& size = wxDefaultSize,
88 long style = 0,
89 const wxString& name = wxEmptyString);
90
91
92 /**
93 Returns the wxChoice associated with the control.
94 */
95 wxChoice * GetChoiceCtrl() const;
96 };
97