xref: /haiku/src/kits/interface/GroupView.cpp (revision bab64f65bb775dc23060e276f1f1c4498ab7af6c)
19ecf9d1cSIngo Weinhold /*
2*7a96554cSlooncraz  * Copyright 2010-2015 Haiku, Inc. All rights reserved.
39ecf9d1cSIngo Weinhold  * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
4539dc1bcSJohn Scipione  *
5539dc1bcSJohn Scipione  * Distributed under the terms of the MIT License.
69ecf9d1cSIngo Weinhold  */
79ecf9d1cSIngo Weinhold 
8542aff1bSAxel Dörfler 
99ecf9d1cSIngo Weinhold #include <GroupView.h>
109ecf9d1cSIngo Weinhold 
119ecf9d1cSIngo Weinhold 
BGroupView(orientation orientation,float spacing)12e724b26fSJohn Scipione BGroupView::BGroupView(orientation orientation, float spacing)
13ff626c8eSIngo Weinhold 	:
14ff626c8eSIngo Weinhold 	BView(NULL, 0, new BGroupLayout(orientation, spacing))
159ecf9d1cSIngo Weinhold {
16*7a96554cSlooncraz 	AdoptSystemColors();
179ecf9d1cSIngo Weinhold }
189ecf9d1cSIngo Weinhold 
19542aff1bSAxel Dörfler 
BGroupView(const char * name,orientation orientation,float spacing)20e724b26fSJohn Scipione BGroupView::BGroupView(const char* name, orientation orientation,
21542aff1bSAxel Dörfler 	float spacing)
22ff626c8eSIngo Weinhold 	:
23ff626c8eSIngo Weinhold 	BView(name, 0, new BGroupLayout(orientation, spacing))
24542aff1bSAxel Dörfler {
25*7a96554cSlooncraz 	AdoptSystemColors();
26542aff1bSAxel Dörfler }
27542aff1bSAxel Dörfler 
28542aff1bSAxel Dörfler 
BGroupView(BMessage * from)29ff626c8eSIngo Weinhold BGroupView::BGroupView(BMessage* from)
30ff626c8eSIngo Weinhold 	:
31ff626c8eSIngo Weinhold 	BView(from)
32ff626c8eSIngo Weinhold {
33*7a96554cSlooncraz 	AdoptSystemColors();
34ff626c8eSIngo Weinhold }
35ff626c8eSIngo Weinhold 
36ff626c8eSIngo Weinhold 
~BGroupView()379ecf9d1cSIngo Weinhold BGroupView::~BGroupView()
389ecf9d1cSIngo Weinhold {
399ecf9d1cSIngo Weinhold }
409ecf9d1cSIngo Weinhold 
41542aff1bSAxel Dörfler 
429ecf9d1cSIngo Weinhold void
SetLayout(BLayout * layout)439ecf9d1cSIngo Weinhold BGroupView::SetLayout(BLayout* layout)
449ecf9d1cSIngo Weinhold {
459ecf9d1cSIngo Weinhold 	// only BGroupLayouts are allowed
469ecf9d1cSIngo Weinhold 	if (!dynamic_cast<BGroupLayout*>(layout))
479ecf9d1cSIngo Weinhold 		return;
489ecf9d1cSIngo Weinhold 
499ecf9d1cSIngo Weinhold 	BView::SetLayout(layout);
509ecf9d1cSIngo Weinhold }
519ecf9d1cSIngo Weinhold 
52542aff1bSAxel Dörfler 
53ff626c8eSIngo Weinhold BArchivable*
Instantiate(BMessage * from)54ff626c8eSIngo Weinhold BGroupView::Instantiate(BMessage* from)
55ff626c8eSIngo Weinhold {
56ff626c8eSIngo Weinhold 	if (validate_instantiation(from, "BGroupView"))
57ff626c8eSIngo Weinhold 		return new BGroupView(from);
58539dc1bcSJohn Scipione 
59ff626c8eSIngo Weinhold 	return NULL;
60ff626c8eSIngo Weinhold }
61ff626c8eSIngo Weinhold 
62ff626c8eSIngo Weinhold 
639ecf9d1cSIngo Weinhold BGroupLayout*
GroupLayout() const649ecf9d1cSIngo Weinhold BGroupView::GroupLayout() const
659ecf9d1cSIngo Weinhold {
669ecf9d1cSIngo Weinhold 	return dynamic_cast<BGroupLayout*>(GetLayout());
679ecf9d1cSIngo Weinhold }
68fceb7ee2SAlex Wilson 
69fceb7ee2SAlex Wilson 
70fceb7ee2SAlex Wilson status_t
Perform(perform_code code,void * _data)71fceb7ee2SAlex Wilson BGroupView::Perform(perform_code code, void* _data)
72fceb7ee2SAlex Wilson {
73fceb7ee2SAlex Wilson 	return BView::Perform(code, _data);
74fceb7ee2SAlex Wilson }
75fceb7ee2SAlex Wilson 
76fceb7ee2SAlex Wilson 
_ReservedGroupView1()77fceb7ee2SAlex Wilson void BGroupView::_ReservedGroupView1() {}
_ReservedGroupView2()78fceb7ee2SAlex Wilson void BGroupView::_ReservedGroupView2() {}
_ReservedGroupView3()79fceb7ee2SAlex Wilson void BGroupView::_ReservedGroupView3() {}
_ReservedGroupView4()80fceb7ee2SAlex Wilson void BGroupView::_ReservedGroupView4() {}
_ReservedGroupView5()81fceb7ee2SAlex Wilson void BGroupView::_ReservedGroupView5() {}
_ReservedGroupView6()82fceb7ee2SAlex Wilson void BGroupView::_ReservedGroupView6() {}
_ReservedGroupView7()83fceb7ee2SAlex Wilson void BGroupView::_ReservedGroupView7() {}
_ReservedGroupView8()84fceb7ee2SAlex Wilson void BGroupView::_ReservedGroupView8() {}
_ReservedGroupView9()85fceb7ee2SAlex Wilson void BGroupView::_ReservedGroupView9() {}
_ReservedGroupView10()86fceb7ee2SAlex Wilson void BGroupView::_ReservedGroupView10() {}
87