-wxSize wxTreebook::GetTreeSize() const
-{
- const wxSize sizeClient = GetClientSize(),
- sizeBorder = m_tree->GetSize() - m_tree->GetClientSize(),
- sizeTree = m_tree->GetBestSize() + sizeBorder;
-
- wxSize size;
-
- size.x = sizeTree.x;
- size.y = sizeClient.y;
-
- return size;
-}
-
-wxRect wxTreebook::GetPageRect() const
-{
- const wxSize sizeTree = m_tree->GetSize();
-
- wxPoint pt;
- wxRect rectPage(pt, GetClientSize());
- switch ( GetWindowStyle() & wxTBK_ALIGN_MASK )
- {
- default:
- wxFAIL_MSG( _T("unexpected wxTreebook alignment") );
- // fall through
-
- case wxTBK_LEFT:
- rectPage.x = sizeTree.x; // + MARGIN;
- // fall through
-
- case wxTBK_RIGHT:
- rectPage.width -= sizeTree.x; // + MARGIN;
- break;
- }
-
- return rectPage;
-}
-
-void wxTreebook::OnSize(wxSizeEvent& event)