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