void Button::setBox(const BoundingBox& allowedBox) { m_skin->setBox(allowedBox); if (m_toolTip) m_toolTip->setBox(box()); setPositionBoxes(allowedBox, box()); }
void CanvasLayout::updateBox() { if (!m_parentBox) return; m_curBox = adjust(m_box->get(), m_list.box(), m_adjustment); setPositionBoxes(*m_parentBox, box()); }
void LinearLayout::setBox(const BoundingBox& allowedBox) { m_skin->setBox(allowedBox); bool isHorizontal = m_skin->direction() == Direction::Horizontal; auto extent = placeObjects(m_list, m_skin->listBox(), isHorizontal, m_skipInvisibleElements); if (extent.isValid()) m_skin->setExtent(extent); else m_skin->setExtent(BoundingBox(Vec2(0, 0), Vec2(0, 0))); setPositionBoxes(allowedBox, m_skin->box()); m_allowedBox = allowedBox; }
void Backgrounded::setBox(const BoundingBox& allowedBox) { m_curBox = allowedBox; if (m_mainDrawable) { m_mainDrawable->setBox(m_curBox); m_curBox = m_mainDrawable->movedBox(); } if (m_backgroundDrawable) { m_backgroundDrawable->setBox(m_curBox); m_curBox = m_backgroundDrawable->movedBox(); } setPositionBoxes(allowedBox, m_curBox); }