Added Grid::AddGlue(), and SetExplicit*Size() methods.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009-2010, Haiku, Inc. All rights reserved.
|
* Copyright 2009-2012, Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _LAYOUT_BUILDER_H
|
#ifndef _LAYOUT_BUILDER_H
|
||||||
@@ -108,6 +108,10 @@ public:
|
|||||||
inline ThisBuilder& SetInsets(float horizontal, float vertical);
|
inline ThisBuilder& SetInsets(float horizontal, float vertical);
|
||||||
inline ThisBuilder& SetInsets(float insets);
|
inline ThisBuilder& SetInsets(float insets);
|
||||||
|
|
||||||
|
inline ThisBuilder& SetExplicitMinSize(BSize size);
|
||||||
|
inline ThisBuilder& SetExplicitMaxSize(BSize size);
|
||||||
|
inline ThisBuilder& SetExplicitPreferredSize(BSize size);
|
||||||
|
|
||||||
inline operator BGroupLayout*();
|
inline operator BGroupLayout*();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -188,6 +192,9 @@ public:
|
|||||||
int32 row, int32 columnCount = 1,
|
int32 row, int32 columnCount = 1,
|
||||||
int32 rowCount = 1);
|
int32 rowCount = 1);
|
||||||
|
|
||||||
|
inline ThisBuilder& AddGlue(int32 column, int32 row,
|
||||||
|
int32 columnCount = 1, int32 rowCount = 1);
|
||||||
|
|
||||||
inline ThisBuilder& SetColumnWeight(int32 column, float weight);
|
inline ThisBuilder& SetColumnWeight(int32 column, float weight);
|
||||||
inline ThisBuilder& SetRowWeight(int32 row, float weight);
|
inline ThisBuilder& SetRowWeight(int32 row, float weight);
|
||||||
|
|
||||||
@@ -196,6 +203,10 @@ public:
|
|||||||
inline ThisBuilder& SetInsets(float horizontal, float vertical);
|
inline ThisBuilder& SetInsets(float horizontal, float vertical);
|
||||||
inline ThisBuilder& SetInsets(float insets);
|
inline ThisBuilder& SetInsets(float insets);
|
||||||
|
|
||||||
|
inline ThisBuilder& SetExplicitMinSize(BSize size);
|
||||||
|
inline ThisBuilder& SetExplicitMaxSize(BSize size);
|
||||||
|
inline ThisBuilder& SetExplicitPreferredSize(BSize size);
|
||||||
|
|
||||||
inline operator BGridLayout*();
|
inline operator BGridLayout*();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -604,6 +615,33 @@ Group<ParentBuilder>::SetInsets(float insets)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename ParentBuilder>
|
||||||
|
typename Group<ParentBuilder>::ThisBuilder&
|
||||||
|
Group<ParentBuilder>::SetExplicitMinSize(BSize size)
|
||||||
|
{
|
||||||
|
fLayout->SetExplicitMinSize(size);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename ParentBuilder>
|
||||||
|
typename Group<ParentBuilder>::ThisBuilder&
|
||||||
|
Group<ParentBuilder>::SetExplicitMaxSize(BSize size)
|
||||||
|
{
|
||||||
|
fLayout->SetExplicitMaxSize(size);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename ParentBuilder>
|
||||||
|
typename Group<ParentBuilder>::ThisBuilder&
|
||||||
|
Group<ParentBuilder>::SetExplicitPreferredSize(BSize size)
|
||||||
|
{
|
||||||
|
fLayout->SetExplicitPreferredSize(size);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename ParentBuilder>
|
template<typename ParentBuilder>
|
||||||
Group<ParentBuilder>::operator BGroupLayout*()
|
Group<ParentBuilder>::operator BGroupLayout*()
|
||||||
{
|
{
|
||||||
@@ -833,6 +871,17 @@ Grid<ParentBuilder>::AddSplit(BSplitView* splitView, int32 column, int32 row,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename ParentBuilder>
|
||||||
|
typename Grid<ParentBuilder>::ThisBuilder&
|
||||||
|
Grid<ParentBuilder>::AddGlue(int32 column, int32 row, int32 columnCount,
|
||||||
|
int32 rowCount)
|
||||||
|
{
|
||||||
|
fLayout->AddItem(BSpaceLayoutItem::CreateGlue(), column, row, columnCount,
|
||||||
|
rowCount);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename ParentBuilder>
|
template<typename ParentBuilder>
|
||||||
typename Grid<ParentBuilder>::ThisBuilder&
|
typename Grid<ParentBuilder>::ThisBuilder&
|
||||||
Grid<ParentBuilder>::SetColumnWeight(int32 column, float weight)
|
Grid<ParentBuilder>::SetColumnWeight(int32 column, float weight)
|
||||||
@@ -879,6 +928,33 @@ Grid<ParentBuilder>::SetInsets(float insets)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename ParentBuilder>
|
||||||
|
typename Grid<ParentBuilder>::ThisBuilder&
|
||||||
|
Grid<ParentBuilder>::SetExplicitMinSize(BSize size)
|
||||||
|
{
|
||||||
|
fLayout->SetExplicitMinSize(size);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename ParentBuilder>
|
||||||
|
typename Grid<ParentBuilder>::ThisBuilder&
|
||||||
|
Grid<ParentBuilder>::SetExplicitMaxSize(BSize size)
|
||||||
|
{
|
||||||
|
fLayout->SetExplicitMaxSize(size);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename ParentBuilder>
|
||||||
|
typename Grid<ParentBuilder>::ThisBuilder&
|
||||||
|
Grid<ParentBuilder>::SetExplicitPreferredSize(BSize size)
|
||||||
|
{
|
||||||
|
fLayout->SetExplicitPreferredSize(size);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename ParentBuilder>
|
template<typename ParentBuilder>
|
||||||
Grid<ParentBuilder>::operator BGridLayout*()
|
Grid<ParentBuilder>::operator BGridLayout*()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user