Exemple #1
0
void ILayoutable::SetRelativePosition(const Point2F& val)
{
	RETURN_IF_EQUAL(mRelativePosition, val);
	mRelativePosition = val;
	OnLayoutChanged(*this, NodeLayoutChangedFlags::PositionChanged);

}
Exemple #2
0
void ILayoutable::SetMargin(const ThicknessF& val)
{
	RETURN_IF_EQUAL(mMargin, val);

	mMargin = val;
	OnLayoutChanged(*this, NodeLayoutChangedFlags::ArrangeChanged);
}
Exemple #3
0
void ILayoutable::EnableCollapsed(bool val)
{
	RETURN_IF_EQUAL(mIsCollapsed, val);
	mIsCollapsed = val;
	OnLayoutChanged(*this, NodeLayoutChangedFlags::CollapseChanged);

}
Exemple #4
0
void ILayoutable::SetDirection(Direction val)
{
	RETURN_IF_EQUAL(mDirection, val);

	mDirection = val;
	OnLayoutChanged(*this, NodeLayoutChangedFlags::ArrangeChanged);
}
Exemple #5
0
void ILayoutable::SetPadding(const Padding4F& val)
{
	RETURN_IF_EQUAL(mPadding, val);

	mPadding = val;
	OnLayoutChanged(*this, NodeLayoutChangedFlags::ArrangeChanged);

}
Exemple #6
0
void ILayoutable::SetStretchPercent(const Scale2F& val)
{
	RETURN_IF_EQUAL(mStretchPercent, val);

	mStretchPercent = val;
	OnLayoutChanged(*this, NodeLayoutChangedFlags::SizeChanged);

}
Exemple #7
0
void ILayoutable::SetStretch(Stretch val)
{
	RETURN_IF_EQUAL(mStretch, val);

	mStretch = val;
	OnLayoutChanged(*this, NodeLayoutChangedFlags::SizeChanged);

}
Exemple #8
0
void ILayoutable::SetDock(DockPoint val)
{
	RETURN_IF_EQUAL(mDockPoint, val);

	mDockPoint = val;
	OnLayoutChanged(*this, NodeLayoutChangedFlags::PositionChanged);

}
Exemple #9
0
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();
}
Exemple #10
0
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;

}
Exemple #11
0
void ILayoutable::SetMarginEdge(MarginEdges val)
{
	RETURN_IF_EQUAL(mMarginEdge, val);
	mMarginEdge = val;
	OnLayoutChanged(*this, NodeLayoutChangedFlags::ArrangeChanged);
}