void TBarView::SizeWindow(BRect screenFrame) { float windowWidth, windowHeight; GetPreferredWindowSize(screenFrame, &windowWidth, &windowHeight); Window()->ResizeTo(windowWidth, windowHeight); }
void TBarView::SizeWindow(BRect screenFrame) { float windowWidth, windowHeight; GetPreferredWindowSize(screenFrame, &windowWidth, &windowHeight); Window()->ResizeTo(windowWidth, windowHeight); if (fExpando) fExpando->CheckForSizeOverrun(); }
void TBarView::PositionWindow(BRect screenFrame) { float windowWidth, windowHeight; GetPreferredWindowSize(screenFrame, &windowWidth, &windowHeight); BPoint moveLoc(0, 0); // right, expanded if (!fLeft && fVertical) { if (fState == kFullState) moveLoc.x = screenFrame.right - fBarMenuBar->Frame().Width(); else moveLoc.x = screenFrame.right - windowWidth; } // bottom, full or corners if (!fTop) moveLoc.y = screenFrame.bottom - windowHeight; Window()->MoveTo(moveLoc); }