wxRect wxChoicebook::GetPageRect() const { const wxSize sizeChoice = m_choice->GetSize(); wxPoint pt; wxRect rectPage(pt, GetClientSize()); switch ( GetWindowStyle() & wxCHB_ALIGN_MASK ) { default: wxFAIL_MSG( _T("unexpected wxChoicebook alignment") ); // fall through case wxCHB_TOP: rectPage.y = sizeChoice.y + MARGIN; // fall through case wxCHB_BOTTOM: rectPage.height -= sizeChoice.y + MARGIN; break; case wxCHB_LEFT: rectPage.x = sizeChoice.x + MARGIN; // fall through case wxCHB_RIGHT: rectPage.width -= sizeChoice.x + MARGIN; break; } return rectPage; }
void COXCustomizeManager::RecalcPageRect() { CRect rectSepTitle; m_sepTitle.GetWindowRect(rectSepTitle); ScreenToClient(rectSepTitle); CRect rectSepBottom; m_sepBottom.GetWindowRect(rectSepBottom); ScreenToClient(rectSepBottom); CRect rectPage(rectSepTitle.left,rectSepTitle.bottom, rectSepTitle.right,rectSepBottom.top); m_rectPage=rectPage; }
wxRect wxBookCtrlBase::GetPageRect() const { const wxSize size = GetControllerSize(); wxPoint pt; wxRect rectPage(pt, GetClientSize()); switch ( GetWindowStyle() & wxBK_ALIGN_MASK ) { default: wxFAIL_MSG( wxT("unexpected alignment") ); // fall through case wxBK_TOP: rectPage.y = size.y + GetInternalBorder(); // fall through case wxBK_BOTTOM: rectPage.height -= size.y + GetInternalBorder(); if (rectPage.height < 0) rectPage.height = 0; break; case wxBK_LEFT: rectPage.x = size.x + GetInternalBorder(); // fall through case wxBK_RIGHT: rectPage.width -= size.x + GetInternalBorder(); if (rectPage.width < 0) rectPage.width = 0; break; } return rectPage; }