]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/listbook.h
supporting alignment in single line controls, see #14452
[wxWidgets.git] / interface / wx / listbook.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: listbook.h
3 // Purpose: interface of wxListbook
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 // wxListbook flags
10 #define wxLB_DEFAULT wxBK_DEFAULT
11 #define wxLB_TOP wxBK_TOP
12 #define wxLB_BOTTOM wxBK_BOTTOM
13 #define wxLB_LEFT wxBK_LEFT
14 #define wxLB_RIGHT wxBK_RIGHT
15 #define wxLB_ALIGN_MASK wxBK_ALIGN_MASK
16
17 wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED;
18 wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING;
19
20 /**
21 @class wxListbook
22
23 wxListbook is a class similar to wxNotebook but which uses a wxListCtrl
24 to show the labels instead of the tabs.
25
26 The underlying wxListCtrl displays page labels in a one-column report view
27 by default. Calling wxBookCtrl::SetImageList will implicitly switch the
28 control to use an icon view.
29
30 For usage documentation of this class, please refer to the base abstract class
31 wxBookCtrl. You can also use the @ref page_samples_notebook to see wxListbook in
32 action.
33
34 @beginStyleTable
35 @style{wxLB_DEFAULT}
36 Choose the default location for the labels depending on the current
37 platform (left everywhere except Mac where it is top).
38 @style{wxLB_TOP}
39 Place labels above the page area.
40 @style{wxLB_LEFT}
41 Place labels on the left side.
42 @style{wxLB_RIGHT}
43 Place labels on the right side.
44 @style{wxLB_BOTTOM}
45 Place labels below the page area.
46 @endStyleTable
47
48 @beginEventEmissionTable{wxBookCtrlEvent}
49 @event{EVT_LISTBOOK_PAGE_CHANGED(id, func)}
50 The page selection was changed.
51 Processes a @c wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED event.
52 @event{EVT_LISTBOOK_PAGE_CHANGING(id, func)}
53 The page selection is about to be changed.
54 Processes a @c wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING event.
55 This event can be vetoed.
56 @endEventTable
57
58 @library{wxcore}
59 @category{bookctrl}
60 @appearance{listbook.png}
61
62 @see wxBookCtrl, wxNotebook, @ref page_samples_notebook
63 */
64 class wxListbook : public wxBookCtrlBase
65 {
66 public:
67 /**
68 Default ctor.
69 */
70 wxListbook();
71
72 /**
73 Constructs a listbook control.
74 */
75 wxListbook(wxWindow* parent, wxWindowID id,
76 const wxPoint& pos = wxDefaultPosition,
77 const wxSize& size = wxDefaultSize,
78 long style = 0,
79 const wxString& name = wxEmptyString);
80
81 /**
82 Create the list book 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 Returns the wxListView associated with the control.
94 */
95 wxListView* GetListView() const;
96 };
97