[haiku-commits] r36716 - haiku/trunk/headers/os/interface

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 7 May 2010 13:32:11 +0200 (CEST)

Author: axeld
Date: 2010-05-07 13:32:11 +0200 (Fri, 07 May 2010)
New Revision: 36716
Changeset: http://dev.haiku-os.org/changeset/36716/haiku

Modified:
   haiku/trunk/headers/os/interface/LayoutBuilder.h
Log:
* Added new BView variant of the BLayoutBuilder::Group() constructor.


Modified: haiku/trunk/headers/os/interface/LayoutBuilder.h
===================================================================
--- haiku/trunk/headers/os/interface/LayoutBuilder.h    2010-05-07 11:31:10 UTC 
(rev 36715)
+++ haiku/trunk/headers/os/interface/LayoutBuilder.h    2010-05-07 11:32:11 UTC 
(rev 36716)
@@ -56,6 +56,9 @@
        inline                                          Group(BWindow* window,
                                                                        enum 
orientation orientation = B_HORIZONTAL,
                                                                        float 
spacing = 0.0f);
+       inline                                          Group(BView* window,
+                                                                       enum 
orientation orientation = B_HORIZONTAL,
+                                                                       float 
spacing = 0.0f);
        inline                                          Group(BGroupLayout* 
layout);
        inline                                          Group(BGroupView* view);
 
@@ -247,6 +250,16 @@
 
 
 template<typename ParentBuilder>
+Group<ParentBuilder>::Group(BView* view, enum orientation orientation,
+       float spacing)
+       :
+       fLayout((new BGroupView(orientation, spacing))->GroupLayout())
+{
+       view->SetLayout(fLayout);
+}
+
+
+template<typename ParentBuilder>
 Group<ParentBuilder>::Group(BGroupLayout* layout)
        :
        fLayout(layout)


Other related posts: