コード例 #1
0
ファイル: Area.cpp プロジェクト: veer77/Haiku-services-branch
/**
 * 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
ファイル: Area.cpp プロジェクト: veer77/Haiku-services-branch
/**
 * 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
ファイル: Area.cpp プロジェクト: veer77/Haiku-services-branch
/**
 * 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
ファイル: Area.cpp プロジェクト: veer77/Haiku-services-branch
/**
 * 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;
}