X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa3310b88de52e7b7d6fe3432e42707ae92d4af8..af182d461f12a154c0167ce7ee89e78e9f5e35fd:/src/generic/notebook.cpp diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp index fe376a1202..c5e67adbe2 100644 --- a/src/generic/notebook.cpp +++ b/src/generic/notebook.cpp @@ -21,16 +21,20 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif -#ifndef __WXPALMOS__ +#if wxUSE_NOTEBOOK + +#include "wx/notebook.h" + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/log.h" +#endif -#include "wx/string.h" -#include "wx/log.h" #include "wx/settings.h" #include "wx/generic/imaglist.h" -#include "wx/notebook.h" #include "wx/dcclient.h" #include "wx/generic/tabg.h" @@ -73,16 +77,16 @@ class WXDLLEXPORT wxNotebookTabView: public wxTabView { DECLARE_DYNAMIC_CLASS(wxNotebookTabView) public: - wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR); - ~wxNotebookTabView(void); + wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR); + ~wxNotebookTabView(void); - // Called when a tab is activated - virtual void OnTabActivate(int activateId, int deactivateId); - // Allows vetoing - virtual bool OnTabPreActivate(int activateId, int deactivateId); + // Called when a tab is activated + virtual void OnTabActivate(int activateId, int deactivateId); + // Allows vetoing + virtual bool OnTabPreActivate(int activateId, int deactivateId); protected: - wxNotebook* m_notebook; + wxNotebook* m_notebook; }; // ---------------------------------------------------------------------------- @@ -262,17 +266,17 @@ bool wxNotebook::DeletePage(size_t nPage) if (m_pages.GetCount() == 0) { - m_nSelection = -1; - m_tabView->SetTabSelection(-1, false); + m_nSelection = -1; + m_tabView->SetTabSelection(-1, false); } else if (m_nSelection > -1) { - m_nSelection = -1; + m_nSelection = -1; - m_tabView->SetTabSelection((int) (long) GetPage(0), false); + m_tabView->SetTabSelection((int) (long) GetPage(0), false); - if (m_nSelection != 0) - ChangePage(-1, 0); + if (m_nSelection != 0) + ChangePage(-1, 0); } RefreshLayout(false); @@ -712,4 +716,4 @@ bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId) return retval; } -#endif // __WXPALMOS__ +#endif // wxUSE_NOTEBOOK