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

  • From: stefano.ceccherini@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 25 Oct 2009 11:49:28 +0100 (CET)

Author: jackburton
Date: 2009-10-25 11:49:28 +0100 (Sun, 25 Oct 2009)
New Revision: 33757
Changeset: http://dev.haiku-os.org/changeset/33757/haiku

Modified:
   haiku/trunk/headers/os/interface/OptionPopUp.h
   haiku/trunk/src/kits/interface/OptionPopUp.cpp
Log:
Also add layout-friendly constructor for BOptionPopUp (not yet tested)


Modified: haiku/trunk/headers/os/interface/OptionPopUp.h
===================================================================
--- haiku/trunk/headers/os/interface/OptionPopUp.h      2009-10-25 10:45:42 UTC 
(rev 33756)
+++ haiku/trunk/headers/os/interface/OptionPopUp.h      2009-10-25 10:49:28 UTC 
(rev 33757)
@@ -24,6 +24,10 @@
                                                                        bool 
fixed, uint32 resizeMask
                                                                                
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
                                                                        uint32 
flags = B_WILL_DRAW);
+                                                               
BOptionPopUp(const char* name,
+                                                                       const 
char* label, BMessage* message,
+                                                                       uint32 
flags = B_WILL_DRAW);
+                                                               
        virtual                                         ~BOptionPopUp();
 
                        BMenuField*                     MenuField();

Modified: haiku/trunk/src/kits/interface/OptionPopUp.cpp
===================================================================
--- haiku/trunk/src/kits/interface/OptionPopUp.cpp      2009-10-25 10:45:42 UTC 
(rev 33756)
+++ haiku/trunk/src/kits/interface/OptionPopUp.cpp      2009-10-25 10:49:28 UTC 
(rev 33757)
@@ -63,6 +63,16 @@
 }
 
 
+BOptionPopUp::BOptionPopUp(const char* name, const char* label,
+               BMessage* message, uint32 flags)
+       : BOptionControl(name, label, message, flags)
+{
+       BPopUpMenu *popUp = new BPopUpMenu(label, true, true);
+       fMenuField = new BMenuField("_menu", label, popUp);
+       AddChild(fMenuField);
+}
+                                                               
+                                                               
 BOptionPopUp::~BOptionPopUp()
 {
 }


Other related posts:

  • » [haiku-commits] r33757 - in haiku/trunk: headers/os/interface src/kits/interface - stefano . ceccherini