示例#1
0
/**
 * Gets bottom inset between area and its content.
 */
float
Area::BottomInset() const
{
	if (fRightBottomInset.IsHeightSet())
		return fRightBottomInset.Height();

	BALMLayout* layout = static_cast<BALMLayout*>(fLayoutItem->Layout());
	if (fBottom.Get() == layout->Bottom())
		return layout->Inset();
	return layout->Spacing() / 2;
}
示例#2
0
/**
 * Gets top inset between area and its content.
 */
float
Area::TopInset() const
{
	if (fTopLeftInset.IsHeightSet())
		return fTopLeftInset.Height();

	BALMLayout* layout = static_cast<BALMLayout*>(fLayoutItem->Layout());
	if (fTop.Get() == layout->Top())
		return layout->Inset();
	return layout->Spacing() / 2;
}
示例#3
0
/**
 * Gets right inset between area and its content.
 */
float
Area::RightInset() const
{
	if (fRightBottomInset.IsWidthSet())
		return fRightBottomInset.Width();

	BALMLayout* layout = static_cast<BALMLayout*>(fLayoutItem->Layout());
	if (fRight.Get() == layout->Right())
		return layout->Inset();
	return layout->Spacing() / 2;
}
示例#4
0
/**
 * Gets left inset between area and its content.
 */
float
Area::LeftInset() const
{
	if (fTopLeftInset.IsWidthSet())
		return fTopLeftInset.Width();

	BALMLayout* layout = static_cast<BALMLayout*>(fLayoutItem->Layout());
	if (fLeft.Get() == layout->Left())
		return layout->Inset();
	return layout->Spacing() / 2;
}