X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f1dee6b0dd1fe468011a64ec1af6eba720902fb..f2959820a5286e4b1595bb9c89de30fa69d6fc6a:/src/univ/notebook.cpp diff --git a/src/univ/notebook.cpp b/src/univ/notebook.cpp index 5a1d6c87df..78f0c55d79 100644 --- a/src/univ/notebook.cpp +++ b/src/univ/notebook.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 01.02.01 -// RCS-ID: $Id$ // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -105,8 +104,6 @@ END_EVENT_TABLE() // implementation // ============================================================================ -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase) - // ---------------------------------------------------------------------------- // wxNotebook creation // ---------------------------------------------------------------------------- @@ -193,8 +190,8 @@ bool wxNotebook::SetPageImage(size_t nPage, int nImage) { 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] ) { @@ -474,15 +471,15 @@ void wxNotebook::DoDrawTab(wxDC& dc, const wxRect& rect, size_t n) // 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)); - 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 - bmp = m_imageList->GetBitmap(image); + bmp = GetImageList()->GetBitmap(image); #endif } @@ -831,7 +828,7 @@ wxSize wxNotebook::CalcTabSize(int page) const 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 @@ -1260,34 +1257,6 @@ void wxNotebook::ScrollLastTo(size_t page) // wxNotebook sizing/moving // ---------------------------------------------------------------------------- -wxSize wxNotebook::DoGetBestClientSize() const -{ - // calculate the max page size - wxSize size; - - size_t count = GetPageCount(); - if ( count ) - { - for ( size_t n = 0; n < count; n++ ) - { - wxSize sizePage = m_pages[n]->GetSize(); - - if ( size.x < sizePage.x ) - size.x = sizePage.x; - if ( size.y < sizePage.y ) - size.y = sizePage.y; - } - } - else // no pages - { - // use some arbitrary default size - size.x = - size.y = 100; - } - - return GetSizeForPage(size); -} - void wxNotebook::DoMoveWindow(int x, int y, int width, int height) { wxControl::DoMoveWindow(x, y, width, height);