Ticket #5525: groupView.patch
File groupView.patch, 1.9 KB (added by , 14 years ago) |
---|
-
headers/os/interface/GroupView.h
18 18 BGroupView(const char* name, 19 19 enum orientation orientation = B_HORIZONTAL, 20 20 float spacing = 0.0f); 21 BGroupView(BMessage* from); 21 22 virtual ~BGroupView(); 22 23 23 24 virtual void SetLayout(BLayout* layout); 25 BGroupLayout* GroupLayout() const; 24 26 25 BGroupLayout* GroupLayout() const;27 static BArchivable* Instantiate(BMessage* from); 26 28 }; 27 29 28 30 -
src/kits/interface/GroupView.cpp
1 1 /* 2 * Copyright 2010, Haiku, Inc. 2 3 * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>. 3 4 * All rights reserved. Distributed under the terms of the MIT License. 4 5 */ … … 8 9 9 10 10 11 BGroupView::BGroupView(enum orientation orientation, float spacing) 11 : BView(NULL, 0, new BGroupLayout(orientation, spacing)) 12 : 13 BView(NULL, 0, new BGroupLayout(orientation, spacing)) 12 14 { 13 15 SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 14 16 } … … 16 18 17 19 BGroupView::BGroupView(const char* name, enum orientation orientation, 18 20 float spacing) 19 : BView(name, 0, new BGroupLayout(orientation, spacing)) 21 : 22 BView(name, 0, new BGroupLayout(orientation, spacing)) 20 23 { 21 24 SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 22 25 } 23 26 24 27 28 BGroupView::BGroupView(BMessage* from) 29 : 30 BView(from) 31 { 32 } 33 34 25 35 BGroupView::~BGroupView() 26 36 { 27 37 } … … 38 48 } 39 49 40 50 51 BArchivable* 52 BGroupView::Instantiate(BMessage* from) 53 { 54 if (validate_instantiation(from, "BGroupView")) 55 return new BGroupView(from); 56 return NULL; 57 } 58 59 41 60 BGroupLayout* 42 61 BGroupView::GroupLayout() const 43 62 {