Implement wxBookCtrlBase::CalcSizeFromPage() in the base class.

The definition of this method was needlessly duplicated in all of
wx{Choice,List,Tool,Tree}book and in all of them except the first one it
didn't account correctly for the case when the size of the controller was
greater than the size of the page.

Avoid the duplication and fix the best size determination in such case by
providing a single, correct version of the function in the base class itself.

Closes #11793.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-03-05 23:55:19 +00:00
parent 76680db44a
commit 175363f6b8
10 changed files with 26 additions and 78 deletions

View File

@@ -556,16 +556,6 @@ bool wxTreebook::SetPageImage(size_t n, int imageId)
return true;
}
wxSize wxTreebook::CalcSizeFromPage(const wxSize& sizePage) const
{
const wxSize sizeTree = GetControllerSize();
wxSize size = sizePage;
size.x += sizeTree.x;
return size;
}
int wxTreebook::GetSelection() const
{
return m_selection;