-wxRect wxListbook::GetPageRect() const
-{
- const wxSize sizeList = m_list->GetSize();
-
- wxPoint pt;
- wxRect rectPage(pt, GetClientSize());
- switch ( GetWindowStyle() & wxLB_ALIGN_MASK )
- {
- default:
- wxFAIL_MSG( _T("unexpected wxListbook alignment") );
- // fall through
-
- case wxLB_TOP:
- rectPage.y = sizeList.y + MARGIN;
- // fall through
-
- case wxLB_BOTTOM:
- rectPage.height -= sizeList.y + MARGIN;
- break;
-
- case wxLB_LEFT:
- rectPage.x = sizeList.x + MARGIN;
- // fall through
-
- case wxLB_RIGHT:
- rectPage.width -= sizeList.x + MARGIN;
- break;
- }
-
- return rectPage;
-}
-