1/*
2 * Copyright 2010-2015 Haiku, Inc. All rights reserved.
3 * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
4 *
5 * Distributed under the terms of the MIT License.
6 */
7
8
9#include <GroupView.h>
10
11
12BGroupView::BGroupView(orientation orientation, float spacing)
13	:
14	BView(NULL, 0, new BGroupLayout(orientation, spacing))
15{
16	AdoptSystemColors();
17}
18
19
20BGroupView::BGroupView(const char* name, orientation orientation,
21	float spacing)
22	:
23	BView(name, 0, new BGroupLayout(orientation, spacing))
24{
25	AdoptSystemColors();
26}
27
28
29BGroupView::BGroupView(BMessage* from)
30	:
31	BView(from)
32{
33	AdoptSystemColors();
34}
35
36
37BGroupView::~BGroupView()
38{
39}
40
41
42void
43BGroupView::SetLayout(BLayout* layout)
44{
45	// only BGroupLayouts are allowed
46	if (!dynamic_cast<BGroupLayout*>(layout))
47		return;
48
49	BView::SetLayout(layout);
50}
51
52
53BArchivable*
54BGroupView::Instantiate(BMessage* from)
55{
56	if (validate_instantiation(from, "BGroupView"))
57		return new BGroupView(from);
58
59	return NULL;
60}
61
62
63BGroupLayout*
64BGroupView::GroupLayout() const
65{
66	return dynamic_cast<BGroupLayout*>(GetLayout());
67}
68
69
70status_t
71BGroupView::Perform(perform_code code, void* _data)
72{
73	return BView::Perform(code, _data);
74}
75
76
77void BGroupView::_ReservedGroupView1() {}
78void BGroupView::_ReservedGroupView2() {}
79void BGroupView::_ReservedGroupView3() {}
80void BGroupView::_ReservedGroupView4() {}
81void BGroupView::_ReservedGroupView5() {}
82void BGroupView::_ReservedGroupView6() {}
83void BGroupView::_ReservedGroupView7() {}
84void BGroupView::_ReservedGroupView8() {}
85void BGroupView::_ReservedGroupView9() {}
86void BGroupView::_ReservedGroupView10() {}
87