]> git.saurik.com Git - wxWidgets.git/commitdiff
use common code to determine best notebook size instaed of Mac-specific which mistake...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 Oct 2004 01:00:31 +0000 (01:00 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 Oct 2004 01:00:31 +0000 (01:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/mac/carbon/notebook.h
src/mac/carbon/notebmac.cpp

index 63356daf75cea97ea98f3c77beddd0414516a4fc..3eb50dae825b491a2c9a00f8cc126e60fbc2e1d1 100644 (file)
@@ -133,7 +133,6 @@ public:
   // -------------------
   virtual void Command(wxCommandEvent& event);
 protected:
-  virtual wxSize DoGetBestSize() const ;
   virtual wxNotebookPage *DoRemovePage(size_t page) ;
   virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
   // common part of all ctors
index db806ca7e6fccff3bf4dce97ddf449a9243b8250..fa58eacad72834e444b290a228967847b8d1d6d7 100644 (file)
@@ -163,34 +163,6 @@ wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
     return DoGetSizeFromClientSize( sizePage ) ;
 }
 
-wxSize wxNotebook::DoGetBestSize() const
-{
-    // calculate the max page size
-    wxSize size(0, 0);
-
-    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 CalcSizeFromPage(size);
-}
-
 int wxNotebook::SetSelection(size_t nPage)
 {
     wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );