void SetSizeOf(IWidget& wgt, const Size& s) { wgt.GetRenderer().SetSize(s); wgt.GetView().SetSize(s); CallEvent<Resize>(wgt, UIEventArgs(wgt)); }
void PaintChild(IWidget& wgt, PaintEventArgs&& e) { auto& sender(e.GetSender()); if(Clip(e.ClipArea, Rect(e.Location += GetLocationOf(sender), GetSizeOf(sender)))) wgt.GetRenderer().Paint(sender, std::move(e)); }
void InvalidateChildren(IWidget& wgt, const Rect& bounds) { Rect r(wgt.GetRenderer().CommitInvalidation(bounds)); for(auto pr(wgt.GetChildren()); pr.first != pr.second; ++pr.first) { auto& child(*pr.first); InvalidateChildren(child, Rect(r - GetLocationOf(child))); } }