1 #ifndef _WX_NOTEBOOK_H_BASE_
2 #define _WX_NOTEBOOK_H_BASE_
4 // ----------------------------------------------------------------------------
6 // ----------------------------------------------------------------------------
8 #include "wx/event.h" // the base class: wxNotifyEvent
10 // ----------------------------------------------------------------------------
11 // notebook event class (used by NOTEBOOK_PAGE_CHANGED/ING events)
12 // ----------------------------------------------------------------------------
14 class WXDLLEXPORT wxNotebookEvent
: public wxNotifyEvent
17 wxNotebookEvent(wxEventType commandType
= wxEVT_NULL
, int id
= 0,
18 int nSel
= -1, int nOldSel
= -1)
19 : wxNotifyEvent(commandType
, id
)
26 // the currently selected page (-1 if none)
27 int GetSelection() const { return m_nSel
; }
28 void SetSelection(int nSel
) { m_nSel
= nSel
; }
29 // the page that was selected before the change (-1 if none)
30 int GetOldSelection() const { return m_nOldSel
; }
31 void SetOldSelection(int nOldSel
) { m_nOldSel
= nOldSel
; }
34 int m_nSel
, // currently selected page
35 m_nOldSel
; // previously selected page
37 DECLARE_DYNAMIC_CLASS(wxNotebookEvent
)
40 // ----------------------------------------------------------------------------
42 // ----------------------------------------------------------------------------
44 typedef void (wxEvtHandler::*wxNotebookEventFunction
)(wxNotebookEvent
&);
46 #define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \
48 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \
51 (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
55 #define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \
57 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \
60 (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
64 // ----------------------------------------------------------------------------
65 // wxNotebook class itself
66 // ----------------------------------------------------------------------------
68 #if defined(__WXMSW__)
70 #include "wx/generic/notebook.h"
72 #include "wx/msw/notebook.h"
74 #elif defined(__WXMOTIF__)
75 #include "wx/generic/notebook.h"
76 #elif defined(__WXGTK__)
77 #include "wx/gtk/notebook.h"
78 #elif defined(__WXQT__)
79 #include "wx/qt/notebook.h"
80 #elif defined(__WXMAC__)
81 #include "wx/mac/notebook.h"
82 #elif defined(__WXSTUBS__)
83 #include "wx/stubs/notebook.h"
87 // _WX_NOTEBOOK_H_BASE_