wxUSE_NOTEBOOK usage.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -24,6 +24,8 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_NOTEBOOK
|
||||||
|
|
||||||
#include "wx/notebook.h"
|
#include "wx/notebook.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
@@ -75,16 +77,16 @@ class WXDLLEXPORT wxNotebookTabView: public wxTabView
|
|||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxNotebookTabView)
|
DECLARE_DYNAMIC_CLASS(wxNotebookTabView)
|
||||||
public:
|
public:
|
||||||
wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
|
wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
|
||||||
~wxNotebookTabView(void);
|
~wxNotebookTabView(void);
|
||||||
|
|
||||||
// Called when a tab is activated
|
// Called when a tab is activated
|
||||||
virtual void OnTabActivate(int activateId, int deactivateId);
|
virtual void OnTabActivate(int activateId, int deactivateId);
|
||||||
// Allows vetoing
|
// Allows vetoing
|
||||||
virtual bool OnTabPreActivate(int activateId, int deactivateId);
|
virtual bool OnTabPreActivate(int activateId, int deactivateId);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxNotebook* m_notebook;
|
wxNotebook* m_notebook;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -264,17 +266,17 @@ bool wxNotebook::DeletePage(size_t nPage)
|
|||||||
|
|
||||||
if (m_pages.GetCount() == 0)
|
if (m_pages.GetCount() == 0)
|
||||||
{
|
{
|
||||||
m_nSelection = -1;
|
m_nSelection = -1;
|
||||||
m_tabView->SetTabSelection(-1, false);
|
m_tabView->SetTabSelection(-1, false);
|
||||||
}
|
}
|
||||||
else if (m_nSelection > -1)
|
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)
|
if (m_nSelection != 0)
|
||||||
ChangePage(-1, 0);
|
ChangePage(-1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshLayout(false);
|
RefreshLayout(false);
|
||||||
@@ -713,3 +715,5 @@ bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId)
|
|||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_NOTEBOOK
|
||||||
|
Reference in New Issue
Block a user