-#include "wx/notebook.h"
-#include "wx/panel.h"
-#include "wx/utils.h"
-#include "wx/imaglist.h"
-#include "wx/log.h"
-
-//-----------------------------------------------------------------------------
-// wxNotebookPage
-//-----------------------------------------------------------------------------
-
-class wxNotebookPage: public wxObject
-{
-public:
- wxNotebookPage()
- {
- m_id = -1;
- m_text = "";
- m_image = -1;
- m_page = NULL;
- m_client = NULL;
- m_parent = NULL;
- };
-
-//private:
- int m_id;
- wxString m_text;
- int m_image;
- wxWindow *m_client;
-};
-
-//-----------------------------------------------------------------------------
-// wxNotebook
-//-----------------------------------------------------------------------------
-
-IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl)
+#include <wx/string.h>
+#include <wx/log.h>
+#include <wx/imaglist.h>
+#include <wx/notebook.h>
+
+// ----------------------------------------------------------------------------
+// macros
+// ----------------------------------------------------------------------------
+
+// check that the page index is valid
+#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
+
+// ----------------------------------------------------------------------------
+// event table
+// ----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(wxNotebook, wxControl)
+ EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange)
+
+ EVT_SIZE(wxNotebook::OnSize)
+ EVT_SET_FOCUS(wxNotebook::OnSetFocus)
+ EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
+END_EVENT_TABLE()
+
+IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxNotebook construction
+// ----------------------------------------------------------------------------