+// ============================================================================
+// Private class
+// ============================================================================
+
+WX_DECLARE_HASH_MAP(int, wxNotebookPage*, wxIntegerHash, wxIntegerEqual,
+ wxIntToNotebookPageHashMap);
+
+WX_DECLARE_HASH_MAP(wxNotebookPage*, int, wxPointerHash, wxPointerEqual,
+ wxNotebookPageToIntHashMap);
+
+// This reuses wxTabView to draw the tabs.
+class WXDLLEXPORT wxNotebookTabView: public wxTabView
+{
+DECLARE_DYNAMIC_CLASS(wxNotebookTabView)
+public:
+ wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
+ virtual ~wxNotebookTabView(void);
+
+ // Called when a tab is activated
+ virtual void OnTabActivate(int activateId, int deactivateId);
+ // Allows vetoing
+ virtual bool OnTabPreActivate(int activateId, int deactivateId);
+
+ // map integer ids used by wxTabView to wxNotebookPage pointers
+ int GetId(wxNotebookPage *page);
+ wxNotebookPage *GetPage(int id) { return m_idToPage[id]; }
+
+protected:
+ wxNotebook* m_notebook;
+
+private:
+ wxIntToNotebookPageHashMap m_idToPage;
+ wxNotebookPageToIntHashMap m_pageToId;
+ int m_nextid;
+};
+
+static int GetPageId(wxTabView *tabview, wxNotebookPage *page)
+{
+ return wx_static_cast(wxNotebookTabView*, tabview)->GetId(page);
+}
+