[haiku-commits] r36725 - in haiku/trunk: headers/os/interface src/kits/interface

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 7 May 2010 19:24:22 +0200 (CEST)

Author: axeld
Date: 2010-05-07 19:24:22 +0200 (Fri, 07 May 2010)
New Revision: 36725
Changeset: http://dev.haiku-os.org/changeset/36725/haiku

Modified:
   haiku/trunk/headers/os/interface/GroupView.h
   haiku/trunk/src/kits/interface/GroupView.cpp
Log:
* Added constructor that takes a name for the view.


Modified: haiku/trunk/headers/os/interface/GroupView.h
===================================================================
--- haiku/trunk/headers/os/interface/GroupView.h        2010-05-07 15:24:48 UTC 
(rev 36724)
+++ haiku/trunk/headers/os/interface/GroupView.h        2010-05-07 17:24:22 UTC 
(rev 36725)
@@ -1,10 +1,11 @@
 /*
- * Copyright 2006, Haiku, Inc. All rights reserved.
+ * Copyright 2006-2010, Haiku, Inc. All rights reserved.
  * Distributed under the terms of the MIT License.
  */
 #ifndef        _GROUP_VIEW_H
 #define        _GROUP_VIEW_H
 
+
 #include <GroupLayout.h>
 #include <View.h>
 
@@ -14,6 +15,9 @@
                                                                BGroupView(
                                                                        enum 
orientation orientation = B_HORIZONTAL,
                                                                        float 
spacing = 0.0f);
+                                                               
BGroupView(const char* name,
+                                                                       enum 
orientation orientation = B_HORIZONTAL,
+                                                                       float 
spacing = 0.0f);
        virtual                                         ~BGroupView();
 
        virtual void                            SetLayout(BLayout* layout);

Modified: haiku/trunk/src/kits/interface/GroupView.cpp
===================================================================
--- haiku/trunk/src/kits/interface/GroupView.cpp        2010-05-07 15:24:48 UTC 
(rev 36724)
+++ haiku/trunk/src/kits/interface/GroupView.cpp        2010-05-07 17:24:22 UTC 
(rev 36725)
@@ -3,22 +3,30 @@
  * 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(const char* name, enum orientation orientation,
+       float spacing)
+       : BView(name, 0, new BGroupLayout(orientation, spacing))
+{
+       SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
+}
+
+
 BGroupView::~BGroupView()
 {
 }
 
-// SetLayout
+
 void
 BGroupView::SetLayout(BLayout* layout)
 {
@@ -29,7 +37,7 @@
        BView::SetLayout(layout);
 }
 
-// GroupLayout
+
 BGroupLayout*
 BGroupView::GroupLayout() const
 {


Other related posts:

  • » [haiku-commits] r36725 - in haiku/trunk: headers/os/interface src/kits/interface - axeld