* Add new SetInsets() methods to BTwoDimensionalLayout, BSplitView

* Also add equivalent methods to the layout builders in LayoutBuilder.h
* BSplitView now calls BControlLook::ComposeSpacing(), instead of BSplitLayout
* part of #7447


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42077 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alex Wilson
2011-06-09 20:58:52 +00:00
parent cd511790d7
commit 813147df83
6 changed files with 115 additions and 4 deletions
+60
View File
@@ -102,6 +102,8 @@ public:
inline ThisBuilder& SetInsets(float left, float top, float right,
float bottom);
inline ThisBuilder& SetInsets(float horizontal, float vertical);
inline ThisBuilder& SetInsets(float insets);
inline operator BGroupLayout*();
@@ -185,6 +187,8 @@ public:
inline ThisBuilder& SetInsets(float left, float top, float right,
float bottom);
inline ThisBuilder& SetInsets(float horizontal, float vertical);
inline ThisBuilder& SetInsets(float insets);
inline operator BGridLayout*();
@@ -246,6 +250,8 @@ public:
inline ThisBuilder& SetInsets(float left, float top, float right,
float bottom);
inline ThisBuilder& SetInsets(float horizontal, float vertical);
inline ThisBuilder& SetInsets(float insets);
inline operator BSplitView*();
@@ -562,6 +568,24 @@ Group<ParentBuilder>::SetInsets(float left, float top, float right,
}
template<typename ParentBuilder>
typename Group<ParentBuilder>::ThisBuilder&
Group<ParentBuilder>::SetInsets(float horizontal, float vertical)
{
fLayout->SetInsets(horizontal, vertical);
return *this;
}
template<typename ParentBuilder>
typename Group<ParentBuilder>::ThisBuilder&
Group<ParentBuilder>::SetInsets(float insets)
{
fLayout->SetInsets(insets);
return *this;
}
template<typename ParentBuilder>
Group<ParentBuilder>::operator BGroupLayout*()
{
@@ -807,6 +831,24 @@ Grid<ParentBuilder>::SetInsets(float left, float top, float right,
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::ThisBuilder&
Grid<ParentBuilder>::SetInsets(float horizontal, float vertical)
{
fLayout->SetInsets(horizontal, vertical);
return *this;
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::ThisBuilder&
Grid<ParentBuilder>::SetInsets(float insets)
{
fLayout->SetInsets(insets);
return *this;
}
template<typename ParentBuilder>
Grid<ParentBuilder>::operator BGridLayout*()
{
@@ -1012,6 +1054,24 @@ Split<ParentBuilder>::SetInsets(float left, float top, float right,
}
template<typename ParentBuilder>
typename Split<ParentBuilder>::ThisBuilder&
Split<ParentBuilder>::SetInsets(float horizontal, float vertical)
{
fView->SetInsets(horizontal, vertical);
return *this;
}
template<typename ParentBuilder>
typename Split<ParentBuilder>::ThisBuilder&
Split<ParentBuilder>::SetInsets(float insets)
{
fView->SetInsets(insets);
return *this;
}
template<typename ParentBuilder>
Split<ParentBuilder>::operator BSplitView*()
{
+2
View File
@@ -21,6 +21,8 @@ public:
void SetInsets(float left, float top, float right,
float bottom);
void SetInsets(float horizontal, float vertical);
void SetInsets(float insets);
void GetInsets(float* left, float* top,
float* right, float* bottom) const;
@@ -19,6 +19,8 @@ public:
void SetInsets(float left, float top, float right,
float bottom);
void SetInsets(float horizontal, float vertical);
void SetInsets(float insets);
void GetInsets(float* left, float* top, float* right,
float* bottom) const;