PixelRect ButtonPanel::UpdateLayout(const PixelRect rc) { if (buttons.empty()) return rc; const bool landscape = rc.right - rc.left > rc.bottom - rc.top; return landscape ? LeftLayout(rc) : BottomLayout(rc); }
PixelRect ButtonPanel::UpdateLayout(const PixelRect rc) { if (buttons.empty()) return rc; const bool landscape = rc.GetWidth() > rc.GetHeight(); return landscape ? LeftLayout(rc) : BottomLayout(rc); }
PixelRect ButtonPanel::BottomLayout() { return BottomLayout(parent.GetClientRect()); }