1 /* 2 * Copyright 2006, Haiku, Inc. All rights reserved. 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 orientation orientation = B_HORIZONTAL, 14 float spacing = B_USE_DEFAULT_SPACING); 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 BSplitLayoutBuilder& SetInsets(float left, float top, float right, 28 float bottom); 29 30 operator BSplitView*(); 31 32 private: 33 BSplitView* fView; 34 }; 35 36 #endif // _SPLIT_LAYOUT_BUILDER_H 37