// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __GTKNOTEBOOKH__
-#define __GTKNOTEBOOKH__
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
+#ifndef _WX_GTKNOTEBOOK_H_
+#define _WX_GTKNOTEBOOK_H_
//-----------------------------------------------------------------------------
// internal class
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// internal class
//-----------------------------------------------------------------------------
// set the currently selected page, return the index of the previously
// selected one (or -1 on error)
// NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
// set the currently selected page, return the index of the previously
// selected one (or -1 on error)
// NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
// set/get the title of a page
bool SetPageText(size_t nPage, const wxString& strText);
wxString GetPageText(size_t nPage) const;
// set/get the title of a page
bool SetPageText(size_t nPage, const wxString& strText);
wxString GetPageText(size_t nPage) const;
// don't delete it yourself). If bSelect, this page becomes active.
// the same as AddPage(), but adds it at the specified position
bool InsertPage( size_t position,
// don't delete it yourself). If bSelect, this page becomes active.
// the same as AddPage(), but adds it at the specified position
bool InsertPage( size_t position,
// the additional page data (the pages themselves are in m_pages array)
wxGtkNotebookPagesList m_pagesData;
// the additional page data (the pages themselves are in m_pages array)
wxGtkNotebookPagesList m_pagesData;
- // for reasons explained in gtk/notebook.cpp we store the current
- // selection internally instead of querying the notebook for it
- int m_selection;
-
- // flag set to true while we're inside "switch_page" callback
- bool m_inSwitchPage;
+ // we need to store the old selection since there
+ // is no other way to know about it at the time
+ // of the change selection event
+ int m_oldSelection;
// remove one page from the notebook but do not destroy it
virtual wxNotebookPage *DoRemovePage(size_t nPage);
// remove one page from the notebook but do not destroy it
virtual wxNotebookPage *DoRemovePage(size_t nPage);