* Made BTwoDimensionalLayout and BSplitLayout::GetInsets() const.
* Give access to BSplitLayout::SetInsets() and GetInsets() from BSplitView. * Give access to BSplitView::SetInsets() from BSplitLayoutBuilder and LayoutBuilder. * Some automatic white-space cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31197 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -175,6 +175,9 @@ public:
|
||||
inline ThisBuilder& SetCollapsible(int32 first, int32 last,
|
||||
bool collapsible);
|
||||
|
||||
inline ThisBuilder& SetInsets(float left, float top, float right,
|
||||
float bottom);
|
||||
|
||||
inline operator BSplitView*();
|
||||
|
||||
private:
|
||||
@@ -702,6 +705,16 @@ Split<ParentBuilder>::SetCollapsible(int32 first, int32 last, bool collapsible)
|
||||
}
|
||||
|
||||
|
||||
template<typename ParentBuilder>
|
||||
typename Split<ParentBuilder>::ThisBuilder&
|
||||
Split<ParentBuilder>::SetInsets(float left, float top, float right,
|
||||
float bottom)
|
||||
{
|
||||
fView->SetInsets(left, top, right, bottom);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template<typename ParentBuilder>
|
||||
Split<ParentBuilder>::operator BSplitView*()
|
||||
{
|
||||
|
||||
@@ -24,6 +24,9 @@ public:
|
||||
|
||||
BSplitLayoutBuilder& SetCollapsible(bool collapsible);
|
||||
|
||||
BSplitLayoutBuilder& SetInsets(float left, float top, float right,
|
||||
float bottom);
|
||||
|
||||
operator BSplitView*();
|
||||
|
||||
private:
|
||||
|
||||
@@ -17,6 +17,11 @@ public:
|
||||
float spacing = 0.0f);
|
||||
virtual ~BSplitView();
|
||||
|
||||
void SetInsets(float left, float top, float right,
|
||||
float bottom);
|
||||
void GetInsets(float* left, float* top, float* right,
|
||||
float* bottom) const;
|
||||
|
||||
float Spacing() const;
|
||||
void SetSpacing(float spacing);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
void SetInsets(float left, float top, float right,
|
||||
float bottom);
|
||||
void GetInsets(float* left, float* top, float* right,
|
||||
float* bottom);
|
||||
float* bottom) const;
|
||||
|
||||
void AlignLayoutWith(BTwoDimensionalLayout* other,
|
||||
enum orientation orientation);
|
||||
|
||||
@@ -192,7 +192,8 @@ BSplitLayout::SetInsets(float left, float top, float right, float bottom)
|
||||
|
||||
// GetInsets
|
||||
void
|
||||
BSplitLayout::GetInsets(float* left, float* top, float* right, float* bottom)
|
||||
BSplitLayout::GetInsets(float* left, float* top, float* right,
|
||||
float* bottom) const
|
||||
{
|
||||
if (left)
|
||||
*left = fLeftInset;
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
void SetInsets(float left, float top, float right,
|
||||
float bottom);
|
||||
void GetInsets(float* left, float* top, float* right,
|
||||
float* bottom);
|
||||
float* bottom) const;
|
||||
|
||||
float Spacing() const;
|
||||
void SetSpacing(float spacing);
|
||||
|
||||
@@ -81,6 +81,15 @@ BSplitLayoutBuilder::SetCollapsible(bool collapsible)
|
||||
return *this;
|
||||
}
|
||||
|
||||
// SetInsets
|
||||
BSplitLayoutBuilder&
|
||||
BSplitLayoutBuilder::SetInsets(float left, float top, float right, float bottom)
|
||||
{
|
||||
fView->SetInsets(left, top, right, bottom);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// cast operator BSplitView*
|
||||
BSplitLayoutBuilder::operator BSplitView*()
|
||||
{
|
||||
|
||||
@@ -55,6 +55,21 @@ BSplitView::~BSplitView()
|
||||
{
|
||||
}
|
||||
|
||||
// SetInsets
|
||||
void
|
||||
BSplitView::SetInsets(float left, float top, float right, float bottom)
|
||||
{
|
||||
fSplitLayout->SetInsets(left, top, right, bottom);
|
||||
}
|
||||
|
||||
// GetInsets
|
||||
void
|
||||
BSplitView::GetInsets(float* left, float* top, float* right,
|
||||
float* bottom) const
|
||||
{
|
||||
fSplitLayout->GetInsets(left, top, right, bottom);
|
||||
}
|
||||
|
||||
// Spacing
|
||||
float
|
||||
BSplitView::Spacing() const
|
||||
|
||||
@@ -248,7 +248,7 @@ BTwoDimensionalLayout::SetInsets(float left, float top, float right,
|
||||
// GetInsets
|
||||
void
|
||||
BTwoDimensionalLayout::GetInsets(float* left, float* top, float* right,
|
||||
float* bottom)
|
||||
float* bottom) const
|
||||
{
|
||||
if (left)
|
||||
*left = fLeftInset;
|
||||
|
||||
Reference in New Issue
Block a user