diff --git a/headers/os/interface/GroupView.h b/headers/os/interface/GroupView.h index a31e6f185c..f4abfeb167 100644 --- a/headers/os/interface/GroupView.h +++ b/headers/os/interface/GroupView.h @@ -18,11 +18,13 @@ public: BGroupView(const char* name, enum orientation orientation = B_HORIZONTAL, float spacing = 0.0f); + BGroupView(BMessage* from); virtual ~BGroupView(); virtual void SetLayout(BLayout* layout); - BGroupLayout* GroupLayout() const; + + static BArchivable* Instantiate(BMessage* from); }; diff --git a/src/kits/interface/GroupView.cpp b/src/kits/interface/GroupView.cpp index 8a7d9abcf9..b9e6912419 100644 --- a/src/kits/interface/GroupView.cpp +++ b/src/kits/interface/GroupView.cpp @@ -1,4 +1,5 @@ /* + * Copyright 2010, Haiku, Inc. * Copyright 2006, Ingo Weinhold . * All rights reserved. Distributed under the terms of the MIT License. */ @@ -8,7 +9,8 @@ BGroupView::BGroupView(enum orientation orientation, float spacing) - : BView(NULL, 0, new BGroupLayout(orientation, spacing)) + : + BView(NULL, 0, new BGroupLayout(orientation, spacing)) { SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); } @@ -16,12 +18,20 @@ BGroupView::BGroupView(enum orientation orientation, float spacing) BGroupView::BGroupView(const char* name, enum orientation orientation, float spacing) - : BView(name, 0, new BGroupLayout(orientation, spacing)) + : + BView(name, 0, new BGroupLayout(orientation, spacing)) { SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); } +BGroupView::BGroupView(BMessage* from) + : + BView(from) +{ +} + + BGroupView::~BGroupView() { } @@ -38,6 +48,15 @@ BGroupView::SetLayout(BLayout* layout) } +BArchivable* +BGroupView::Instantiate(BMessage* from) +{ + if (validate_instantiation(from, "BGroupView")) + return new BGroupView(from); + return NULL; +} + + BGroupLayout* BGroupView::GroupLayout() const {