xref: /haiku/docs/user/interface/OptionPopUp.dox (revision 4bd0c1066b227cec4b79883bdef697c7a27f2e90)
1/*
2 * Copyright 2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Adrien Destugues, pulkomandy@pulkomandy.tk
7 *
8 * Corresponds to:
9 *		headers/os/interface/OptionPopUp.h	 hrev48458
10 *		src/kits/interface/OptionPopUp.cpp	 hrev48458
11 */
12
13
14/*!
15	\file OptionPopUp.h
16	\ingroup interface
17	\ingroup libbe
18	\brief BOptionPopUp class definition.
19*/
20
21
22/*!
23	\class BOptionPopUp
24	\ingroup interface
25	\ingroup libbe
26	\brief A BMenuField based BControl implementation
27
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.
31
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.
34
35	\since BeOS R5
36*/
37
38
39/*!
40	\fn BOptionPopUp::GetOptionAt(int32 index, const char** _name, int32* _value)
41	\brief Get option at given index.
42*/
43
44/*!
45	\fn BOptionPopUp::RemoveOptionAt(int32 index)
46	\brief Remove option at given index from the menu.
47*/
48
49
50/*!
51	\fn BOptionPopUp::CountOptions() const
52	\brief Count options in the menu
53*/
54
55
56/*!
57	\fn BOptionPopUp::AddOptionAt(const char* name, int32 value, int32 index)
58	\brief Add an option to the menu.
59
60	Note that the option value is independent from its position in the menu.
61*/
62
63
64/*!
65	\fn BOptionPopUp::SelectedOption(const char** _name = 0, int32* _value = 0)
66	\brief Get the label and/or value of the currently selected option.
67*/
68