Make use of HasImageList() and GetImageList() instead of accessing the now private m_imageList directly. Fixed for wxUniv, wxGTK1, and wxOS2 (the latter 2 blindly). Changes are similar to r68856 and should have been a part of that.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68857
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
m_padding = 0;
m_inSwitchPage = false;
m_padding = 0;
m_inSwitchPage = false;
}
/* Only cases 3) and 4) left */
}
/* Only cases 3) and 4) left */
- wxASSERT( m_imageList != NULL ); /* Just in case */
+ wxASSERT( HasImageList() ); /* Just in case */
/* Construct the new pixmap */
/* Construct the new pixmap */
- const wxBitmap *bmp = m_imageList->GetBitmapPtr(image);
+ const wxBitmap *bmp = GetImageList()->GetBitmapPtr(image);
GdkPixmap *pixmap = bmp->GetPixmap();
GdkBitmap *mask = NULL;
if ( bmp->GetMask() )
GdkPixmap *pixmap = bmp->GetPixmap();
GdkBitmap *mask = NULL;
if ( bmp->GetMask() )
- wxASSERT( m_imageList != NULL );
+ wxASSERT( HasImageList() );
- const wxBitmap *bmp = m_imageList->GetBitmapPtr(imageId);
+ const wxBitmap *bmp = GetImageList()->GetBitmapPtr(imageId);
GdkPixmap *pixmap = bmp->GetPixmap();
GdkBitmap *mask = NULL;
if ( bmp->GetMask() )
GdkPixmap *pixmap = bmp->GetPixmap();
GdkBitmap *mask = NULL;
if ( bmp->GetMask() )
//
void wxNotebook::Init()
{
//
void wxNotebook::Init()
{
m_nTabSize = 0;
} // end of wxNotebook::Init
m_nTabSize = 0;
} // end of wxNotebook::Init
- wxBitmap vBitmap = (wxBitmap)m_imageList->GetBitmap(nImage);
+ wxBitmap vBitmap = (wxBitmap)GetImageList()->GetBitmap(nImage);
return (bool)::WinSendMsg( GetHWND()
,BKM_SETTABBITMAP
return (bool)::WinSendMsg( GetHWND()
,BKM_SETTABBITMAP
{
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("invalid notebook page") );
{
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("invalid notebook page") );
- wxCHECK_MSG( m_imageList && nImage < m_imageList->GetImageCount(), false,
- wxT("invalid image index in SetPageImage()") );
+ wxCHECK_MSG( HasImageList() && nImage < GetImageList()->GetImageCount(),
+ false, wxT("invalid image index in SetPageImage()") );
if ( nImage != m_images[nPage] )
{
if ( nImage != m_images[nPage] )
{
// used for wxUniversal under MSW
#if 0 // def __WXMSW__ // FIXME
int w, h;
// used for wxUniversal under MSW
#if 0 // def __WXMSW__ // FIXME
int w, h;
- m_imageList->GetSize(n, w, h);
+ GetImageList()->GetSize(n, w, h);
bmp.Create(w, h);
wxMemoryDC dc;
dc.SelectObject(bmp);
dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID));
bmp.Create(w, h);
wxMemoryDC dc;
dc.SelectObject(bmp);
dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID));
- m_imageList->Draw(image, dc, 0, 0, wxIMAGELIST_DRAW_NORMAL, true);
+ GetImageList()->Draw(image, dc, 0, 0, wxIMAGELIST_DRAW_NORMAL, true);
dc.SelectObject(wxNullBitmap);
#else
dc.SelectObject(wxNullBitmap);
#else
- bmp = m_imageList->GetBitmap(image);
+ bmp = GetImageList()->GetBitmap(image);
if ( HasImage(page) )
{
wxSize sizeImage;
if ( HasImage(page) )
{
wxSize sizeImage;
- m_imageList->GetSize(m_images[page], sizeImage.x, sizeImage.y);
+ GetImageList()->GetSize(m_images[page], sizeImage.x, sizeImage.y);
size.x += sizeImage.x + 5; // FIXME: hard coded margin
size.x += sizeImage.x + 5; // FIXME: hard coded margin