File: listbook.h

package info (click to toggle)
wxwidgets3.0 3.0.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 120,808 kB
  • ctags: 118,010
  • sloc: cpp: 889,420; makefile: 52,980; ansic: 21,933; sh: 5,603; python: 2,935; xml: 1,534; perl: 281
file content (96 lines) | stat: -rw-r--r-- 3,079 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/////////////////////////////////////////////////////////////////////////////
// Name:        listbook.h
// Purpose:     interface of wxListbook
// Author:      wxWidgets team
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

// wxListbook flags
#define wxLB_DEFAULT          wxBK_DEFAULT
#define wxLB_TOP              wxBK_TOP
#define wxLB_BOTTOM           wxBK_BOTTOM
#define wxLB_LEFT             wxBK_LEFT
#define wxLB_RIGHT            wxBK_RIGHT
#define wxLB_ALIGN_MASK       wxBK_ALIGN_MASK

wxEventType wxEVT_LISTBOOK_PAGE_CHANGED;
wxEventType wxEVT_LISTBOOK_PAGE_CHANGING;

/**
    @class wxListbook

    wxListbook is a class similar to wxNotebook but which uses a wxListCtrl
    to show the labels instead of the tabs.

    The underlying wxListCtrl displays page labels in a one-column report view
    by default. Calling wxBookCtrl::SetImageList will implicitly switch the
    control to use an icon view.

    For usage documentation of this class, please refer to the base abstract class
    wxBookCtrl. You can also use the @ref page_samples_notebook to see wxListbook in
    action.

    @beginStyleTable
    @style{wxLB_DEFAULT}
           Choose the default location for the labels depending on the current
           platform (left everywhere except Mac where it is top).
    @style{wxLB_TOP}
           Place labels above the page area.
    @style{wxLB_LEFT}
           Place labels on the left side.
    @style{wxLB_RIGHT}
           Place labels on the right side.
    @style{wxLB_BOTTOM}
           Place labels below the page area.
    @endStyleTable

    @beginEventEmissionTable{wxBookCtrlEvent}
    @event{EVT_LISTBOOK_PAGE_CHANGED(id, func)}
        The page selection was changed.
        Processes a @c wxEVT_LISTBOOK_PAGE_CHANGED event.
    @event{EVT_LISTBOOK_PAGE_CHANGING(id, func)}
        The page selection is about to be changed.
        Processes a @c wxEVT_LISTBOOK_PAGE_CHANGING event.
        This event can be vetoed.
    @endEventTable

    @library{wxcore}
    @category{bookctrl}
    @appearance{listbook}

    @see wxBookCtrl, wxNotebook, @ref page_samples_notebook
*/
class wxListbook : public wxBookCtrlBase
{
public:
    /**
        Default ctor.
    */
    wxListbook();

    /**
        Constructs a listbook control.
    */
    wxListbook(wxWindow* parent, wxWindowID id,
               const wxPoint& pos = wxDefaultPosition,
               const wxSize& size = wxDefaultSize,
               long style = 0,
               const wxString& name = wxEmptyString);

    /**
       Create the list book control that has already been constructed with
       the default constructor.
    */
    bool Create(wxWindow *parent,
                wxWindowID id,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = 0,
                const wxString& name = wxEmptyString);

    /**
        Returns the wxListView associated with the control.
    */
    wxListView* GetListView() const;
};