82ab316723
* introduce B_USE_DEFAULT_SPACING, which works somewhat like B_SIZE_UNSET and B_ALIGN_HORIZONTAL_UNSET * introduce static float BControlLook::ComposeItemSpacing(float spacing), which checks uses be_control_look->DefaultItemSpacing(). * modify layouts to use BControlLook::ComposeItemSpacing() in SetInsets and SetSpacing methods. * default insets are still 0, 0, 0, 0, but can be set to default spacing by passing B_USE_DEFAULT_SPACING * I've found two regressions, patches incoming, please report others on #5614. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38512 a95241bf-73f2-0310-859d-f6bbb57e9c96
37 lines
976 B
C++
37 lines
976 B
C++
/*
|
|
* Copyright 2006, Haiku, Inc. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _SPLIT_LAYOUT_BUILDER_H
|
|
#define _SPLIT_LAYOUT_BUILDER_H
|
|
|
|
#include <SplitView.h>
|
|
|
|
class BSplitLayoutBuilder {
|
|
public:
|
|
BSplitLayoutBuilder(
|
|
enum orientation orientation = B_HORIZONTAL,
|
|
float spacing = B_USE_DEFAULT_SPACING);
|
|
BSplitLayoutBuilder(BSplitView* view);
|
|
|
|
BSplitView* SplitView() const;
|
|
BSplitLayoutBuilder& GetSplitView(BSplitView** view);
|
|
|
|
BSplitLayoutBuilder& Add(BView* view);
|
|
BSplitLayoutBuilder& Add(BView* view, float weight);
|
|
BSplitLayoutBuilder& Add(BLayoutItem* item);
|
|
BSplitLayoutBuilder& Add(BLayoutItem* item, float weight);
|
|
|
|
BSplitLayoutBuilder& SetCollapsible(bool collapsible);
|
|
|
|
BSplitLayoutBuilder& SetInsets(float left, float top, float right,
|
|
float bottom);
|
|
|
|
operator BSplitView*();
|
|
|
|
private:
|
|
BSplitView* fView;
|
|
};
|
|
|
|
#endif // _SPLIT_LAYOUT_BUILDER_H
|