use common code to determine best notebook size instaed of Mac-specific which mistakenly used current pages sizes and not the best ones

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-10-17 01:00:31 +00:00
parent fc2739d5f0
commit d4cace1ccd
2 changed files with 0 additions and 29 deletions

View 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

View 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") );