xref: /haiku/src/kits/interface/GroupView.cpp (revision 385ee03ba83b7a40d315e17b03031b3ca37820c0)
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 
12 BGroupView::BGroupView(orientation orientation, float spacing)
13 	:
14 	BView(NULL, 0, new BGroupLayout(orientation, spacing))
15 {
16 	AdoptSystemColors();
17 }
18 
19 
20 BGroupView::BGroupView(const char* name, orientation orientation,
21 	float spacing)
22 	:
23 	BView(name, 0, new BGroupLayout(orientation, spacing))
24 {
25 	AdoptSystemColors();
26 }
27 
28 
29 BGroupView::BGroupView(BMessage* from)
30 	:
31 	BView(from)
32 {
33 	AdoptSystemColors();
34 }
35 
36 
37 BGroupView::~BGroupView()
38 {
39 }
40 
41 
42 void
43 BGroupView::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 
53 BArchivable*
54 BGroupView::Instantiate(BMessage* from)
55 {
56 	if (validate_instantiation(from, "BGroupView"))
57 		return new BGroupView(from);
58 
59 	return NULL;
60 }
61 
62 
63 BGroupLayout*
64 BGroupView::GroupLayout() const
65 {
66 	return dynamic_cast<BGroupLayout*>(GetLayout());
67 }
68 
69 
70 status_t
71 BGroupView::Perform(perform_code code, void* _data)
72 {
73 	return BView::Perform(code, _data);
74 }
75 
76 
77 void BGroupView::_ReservedGroupView1() {}
78 void BGroupView::_ReservedGroupView2() {}
79 void BGroupView::_ReservedGroupView3() {}
80 void BGroupView::_ReservedGroupView4() {}
81 void BGroupView::_ReservedGroupView5() {}
82 void BGroupView::_ReservedGroupView6() {}
83 void BGroupView::_ReservedGroupView7() {}
84 void BGroupView::_ReservedGroupView8() {}
85 void BGroupView::_ReservedGroupView9() {}
86 void BGroupView::_ReservedGroupView10() {}
87