2 * Copyright 2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Adrien Destugues, pulkomandy@pulkomandy.tk
9 * headers/os/interface/OptionPopUp.h hrev48458
10 * src/kits/interface/OptionPopUp.cpp hrev48458
18 \brief BOptionPopUp class definition.
26 \brief A BMenuField based BControl implementation
28 This class is a wrapper around \a BMenuField that implements BControl
29 semantics. Each menu item holds a value, which is used as the control
30 value when that item is selected.
32 The menu is populated using the \a AddOptionAt() method, giving the label
33 and value for each option. It is set to radio mode by default.
40 \fn BOptionPopUp::GetOptionAt(int32 index, const char** _name, int32* _value)
41 \brief Get option at given index.
45 \fn BOptionPopUp::RemoveOptionAt(int32 index)
46 \brief Remove option at given index from the menu.
51 \fn BOptionPopUp::CountOptions() const
52 \brief Count options in the menu
57 \fn BOptionPopUp::AddOptionAt(const char* name, int32 value, int32 index)
58 \brief Add an option to the menu.
60 Note that the option value is independent from its position in the menu.
65 \fn BOptionPopUp::SelectedOption(const char** _name = 0, int32* _value = 0)
66 \brief Get the label and/or value of the currently selected option.