Files
haiku-beta6/src/kits/interface/GroupView.cpp
T
Ingo Weinhold 9ecf9d1c1d Merge from layout management branch.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-26 16:21:15 +00:00

38 lines
701 B
C++

/*
* Copyright 2006, Ingo Weinhold <[email protected]>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#include <GroupView.h>
// constructor
BGroupView::BGroupView(enum orientation orientation, float spacing)
: BView(NULL, 0, new BGroupLayout(orientation, spacing))
{
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
}
// destructor
BGroupView::~BGroupView()
{
}
// SetLayout
void
BGroupView::SetLayout(BLayout* layout)
{
// only BGroupLayouts are allowed
if (!dynamic_cast<BGroupLayout*>(layout))
return;
BView::SetLayout(layout);
}
// GroupLayout
BGroupLayout*
BGroupView::GroupLayout() const
{
return dynamic_cast<BGroupLayout*>(GetLayout());
}