2 * Copyright 2006-2015, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
13 class BSplitView
: public BView
{
16 orientation orientation
= B_HORIZONTAL
,
17 float spacing
= B_USE_DEFAULT_SPACING
);
18 BSplitView(BMessage
* from
);
19 virtual ~BSplitView();
21 void SetInsets(float left
, float top
, float right
,
23 void SetInsets(float horizontal
, float vertical
);
24 void SetInsets(float insets
);
25 void GetInsets(float* left
, float* top
,
26 float* right
, float* bottom
) const;
28 float Spacing() const;
29 void SetSpacing(float spacing
);
31 orientation
Orientation() const;
32 void SetOrientation(orientation orientation
);
34 float SplitterSize() const;
35 void SetSplitterSize(float size
);
37 int32
CountItems() const;
38 float ItemWeight(int32 index
) const;
39 float ItemWeight(BLayoutItem
* item
) const;
40 void SetItemWeight(int32 index
, float weight
,
41 bool invalidateLayout
);
42 void SetItemWeight(BLayoutItem
* item
, float weight
);
44 bool IsCollapsible(int32 index
) const;
45 void SetCollapsible(bool collapsible
);
46 void SetCollapsible(int32 index
, bool collapsible
);
47 void SetCollapsible(int32 first
, int32 last
,
50 bool IsItemCollapsed(int32 index
) const;
51 void SetItemCollapsed(int32 index
, bool collapsed
);
53 // void AddChild(BView* child);
54 void AddChild(BView
* child
, BView
* sibling
= NULL
);
55 bool AddChild(BView
* child
, float weight
);
56 bool AddChild(int32 index
, BView
* child
,
59 bool AddChild(BLayoutItem
* child
);
60 bool AddChild(BLayoutItem
* child
, float weight
);
61 bool AddChild(int32 index
, BLayoutItem
* child
,
64 virtual void AttachedToWindow();
65 virtual void Draw(BRect updateRect
);
66 virtual void DrawAfterChildren(BRect updateRect
);
67 virtual void MouseDown(BPoint where
);
68 virtual void MouseUp(BPoint where
);
69 virtual void MouseMoved(BPoint where
, uint32 transit
,
70 const BMessage
* message
);
72 virtual void MessageReceived(BMessage
* message
);
75 virtual void SetLayout(BLayout
* layout
);
76 // overridden to avoid use
78 virtual status_t
Archive(BMessage
* into
, bool deep
= true) const;
79 static BArchivable
* Instantiate(BMessage
* from
);
81 virtual status_t
Perform(perform_code d
, void* arg
);
84 virtual status_t
AllArchived(BMessage
* into
) const;
85 virtual status_t
AllUnarchived(const BMessage
* from
);
87 virtual void DrawSplitter(BRect frame
,
88 const BRect
& updateRect
,
89 orientation orientation
,
95 virtual void _ReservedSplitView1();
96 virtual void _ReservedSplitView2();
97 virtual void _ReservedSplitView3();
98 virtual void _ReservedSplitView4();
99 virtual void _ReservedSplitView5();
100 virtual void _ReservedSplitView6();
101 virtual void _ReservedSplitView7();
102 virtual void _ReservedSplitView8();
103 virtual void _ReservedSplitView9();
104 virtual void _ReservedSplitView10();
107 BSplitView(const BSplitView
&);
108 void operator =(const BSplitView
&);
110 static void _DrawDefaultSplitter(BView
* view
, BRect frame
,
111 const BRect
& updateRect
,
112 orientation orientation
,
116 BSplitLayout
* fSplitLayout
;
121 #endif // _SPLIT_VIEW_H