void ILayoutable::SetRelativePosition(const Point2F& val) { RETURN_IF_EQUAL(mRelativePosition, val); mRelativePosition = val; OnLayoutChanged(*this, NodeLayoutChangedFlags::PositionChanged); }
void ILayoutable::SetMargin(const ThicknessF& val) { RETURN_IF_EQUAL(mMargin, val); mMargin = val; OnLayoutChanged(*this, NodeLayoutChangedFlags::ArrangeChanged); }
void ILayoutable::EnableCollapsed(bool val) { RETURN_IF_EQUAL(mIsCollapsed, val); mIsCollapsed = val; OnLayoutChanged(*this, NodeLayoutChangedFlags::CollapseChanged); }
void ILayoutable::SetDirection(Direction val) { RETURN_IF_EQUAL(mDirection, val); mDirection = val; OnLayoutChanged(*this, NodeLayoutChangedFlags::ArrangeChanged); }
void ILayoutable::SetPadding(const Padding4F& val) { RETURN_IF_EQUAL(mPadding, val); mPadding = val; OnLayoutChanged(*this, NodeLayoutChangedFlags::ArrangeChanged); }
void ILayoutable::SetStretchPercent(const Scale2F& val) { RETURN_IF_EQUAL(mStretchPercent, val); mStretchPercent = val; OnLayoutChanged(*this, NodeLayoutChangedFlags::SizeChanged); }
void ILayoutable::SetStretch(Stretch val) { RETURN_IF_EQUAL(mStretch, val); mStretch = val; OnLayoutChanged(*this, NodeLayoutChangedFlags::SizeChanged); }
void ILayoutable::SetDock(DockPoint val) { RETURN_IF_EQUAL(mDockPoint, val); mDockPoint = val; OnLayoutChanged(*this, NodeLayoutChangedFlags::PositionChanged); }
void INode::AddChild(INode* node) { MEDUSA_ASSERT_NULL(node->Parent(), ""); mNodes.Add(node); node->SetParent(this); if (!node->Name().IsEmpty()) { mNodeDict.Add(node->Name(), node); } if (node->IsManaged()) { mManagedNodes.Add(node); } OnLayoutChanged(*node, NodeLayoutChangedFlags::ChildAdded); OnRenderQueueChanged(); OnVisitQueueChanged(); }
bool INode::RemoveChild(INode* node) { RETURN_FALSE_IF_NULL(node); if (mNodes.RemoveFirst(node)) { node->SetParent(nullptr); mNodeDict.RemoveKey(node->Name()); if (node->IsManaged()) { mManagedNodes.RemoveFirst(node); } OnLayoutChanged(*node, NodeLayoutChangedFlags::ChildRemoved); OnRenderQueueChanged(); OnVisitQueueChanged(); return true; } return false; }
void ILayoutable::SetMarginEdge(MarginEdges val) { RETURN_IF_EQUAL(mMarginEdge, val); mMarginEdge = val; OnLayoutChanged(*this, NodeLayoutChangedFlags::ArrangeChanged); }