2 * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
6 #include <SplitLayoutBuilder.h>
15 BSplitLayoutBuilder::BSplitLayoutBuilder(orientation orientation
,
17 : fView(new BSplitView(orientation
, spacing
))
22 BSplitLayoutBuilder::BSplitLayoutBuilder(BSplitView
* view
)
29 BSplitLayoutBuilder::SplitView() const
36 BSplitLayoutBuilder::GetSplitView(BSplitView
** view
)
44 BSplitLayoutBuilder::Add(BView
* view
)
46 fView
->AddChild(view
);
52 BSplitLayoutBuilder::Add(BView
* view
, float weight
)
54 fView
->AddChild(view
, weight
);
60 BSplitLayoutBuilder::Add(BLayoutItem
* item
)
62 fView
->AddChild(item
);
68 BSplitLayoutBuilder::Add(BLayoutItem
* item
, float weight
)
70 fView
->AddChild(item
, weight
);
76 BSplitLayoutBuilder::SetCollapsible(bool collapsible
)
78 int32 count
= fView
->CountChildren();
80 fView
->SetCollapsible(count
- 1, collapsible
);
86 BSplitLayoutBuilder::SetInsets(float left
, float top
, float right
, float bottom
)
88 fView
->SetInsets(left
, top
, right
, bottom
);
93 // cast operator BSplitView*
94 BSplitLayoutBuilder::operator BSplitView
*()