added wxNotebook::AssingImageList

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2000-09-28 22:25:07 +00:00
parent 46cd520d1e
commit b656febdf0
7 changed files with 52 additions and 2 deletions

View File

@@ -106,6 +106,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent)
void wxNotebook::Init()
{
m_pImageList = NULL;
m_bOwnsImageList = FALSE;
m_nSelection = -1;
}
@@ -188,6 +189,7 @@ bool wxNotebook::Create(wxWindow *parent,
// dtor
wxNotebook::~wxNotebook()
{
if (m_bOwnsImageList) delete m_pImageList;
}
// ----------------------------------------------------------------------------
@@ -276,10 +278,18 @@ bool wxNotebook::SetPageImage(int nPage, int nImage)
void wxNotebook::SetImageList(wxImageList* imageList)
{
if (m_bOwnsImageList) delete m_pImageList;
m_pImageList = imageList;
m_bOwnsImageList = FALSE;
TabCtrl_SetImageList(m_hwnd, (HIMAGELIST)imageList->GetHIMAGELIST());
}
void wxNotebook::AssignImageList(wxImageList* imageList)
{
SetImageList(imageList);
m_bOwnsImageList = TRUE;
}
// ----------------------------------------------------------------------------
// wxNotebook size settings
// ----------------------------------------------------------------------------