From 510fae5f1da8e378ff8c5942dd1e649d3b6822fb Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Sun, 25 Oct 2009 10:49:28 +0000 Subject: [PATCH] Also add layout-friendly constructor for BOptionPopUp (not yet tested) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33757 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/interface/OptionPopUp.h | 4 ++++ src/kits/interface/OptionPopUp.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/headers/os/interface/OptionPopUp.h b/headers/os/interface/OptionPopUp.h index edc597b762..d71d2af686 100644 --- a/headers/os/interface/OptionPopUp.h +++ b/headers/os/interface/OptionPopUp.h @@ -24,6 +24,10 @@ public: 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(); diff --git a/src/kits/interface/OptionPopUp.cpp b/src/kits/interface/OptionPopUp.cpp index 60bb8e1eca..635cb30b6d 100644 --- a/src/kits/interface/OptionPopUp.cpp +++ b/src/kits/interface/OptionPopUp.cpp @@ -63,6 +63,16 @@ BOptionPopUp::BOptionPopUp(BRect frame, const char *name, const char *label, } +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() { }