/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }