#include namespace psemek::ui { element * element::root() { element * r = this; while (r->parent()) r = r->parent(); return r; } element const * element::root() const { element const * r = this; while (r->parent()) r = r->parent(); return r; } void element::reshape() { reshape(shape().bbox()); } geom::box element::size_constraints() const { static float const inf = std::numeric_limits::infinity(); return {{{0.f, inf}, {0.f, inf}}}; } }