xref: /haiku/headers/os/interface/SplitLayoutBuilder.h (revision 2f470aec1c92ce6917b8a903e343795dc77af41f)
1 /*
2  * Copyright 2006, Haiku Inc.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef	_SPLIT_LAYOUT_BUILDER_H
6 #define	_SPLIT_LAYOUT_BUILDER_H
7 
8 #include <SplitView.h>
9 
10 class BSplitLayoutBuilder {
11 public:
12 								BSplitLayoutBuilder(
13 									enum orientation orientation = B_HORIZONTAL,
14 									float spacing = 0.0f);
15 								BSplitLayoutBuilder(BSplitView* view);
16 
17 			BSplitView*			SplitView() const;
18 			BSplitLayoutBuilder& GetSplitView(BSplitView** view);
19 
20 			BSplitLayoutBuilder& Add(BView* view);
21 			BSplitLayoutBuilder& Add(BView* view, float weight);
22 			BSplitLayoutBuilder& Add(BLayoutItem* item);
23 			BSplitLayoutBuilder& Add(BLayoutItem* item, float weight);
24 
25 			BSplitLayoutBuilder& SetCollapsible(bool collapsible);
26 
27 								operator BSplitView*();
28 
29 private:
30 			BSplitView*			fView;
31 };
32 
33 #endif	// _SPLIT_LAYOUT_BUILDER_H
34