From 9f9d972f7904f9d6b24d2680df2d094db2f8b59c Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 8 Dec 2014 14:38:09 +0100 Subject: [PATCH] Minimal documentation for BOptionPopUp. This was available in R5 but somehow went missing from our version of the Be Book (it is documented in the release notes in Tycom Systems version). Document the more important methods of it, at least. --- docs/user/interface/OptionPopUp.dox | 67 +++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 docs/user/interface/OptionPopUp.dox diff --git a/docs/user/interface/OptionPopUp.dox b/docs/user/interface/OptionPopUp.dox new file mode 100644 index 0000000000..49bd24c529 --- /dev/null +++ b/docs/user/interface/OptionPopUp.dox @@ -0,0 +1,67 @@ +/* + * Copyright 2014 Haiku, Inc. All rights reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Adrien Destugues, pulkomandy@pulkomandy.tk + * + * Corresponds to: + * headers/os/interface/OptionPopUp.h hrev48458 + * src/kits/interface/OptionPopUp.cpp hrev48458 + */ + + +/*! + \file OptionPopUp.h + \ingroup interface + \ingroup libbe + \brief BOptionPopUp class definition. +*/ + + +/*! + \class BOptionPopUp + \ingroup interface + \ingroup libbe + \brief A BMenuField based BControl implementation + + This class is a wrapper around \a BMenuField that implements BControl + semantics. Each menu item holds a value, which is used as the control + value when that item is selected. + + The menu is populated using the \a AddOptionAt() method, giving the label + and value for each option. It is set to radio mode by default. + + \since BeOS R5 +*/ + + +/*! + \fn BMenuField::GetOptionAt(int32 index, const char** _name, int32* _value) + \brief Get option at given index. +*/ + +/*! + \fn BOptionPopUp::RemoveOptionAt(int32 index) + \brief Remove option at given index from the menu. +*/ + + +/*! + \fn BOptionPopUp::CountOptions() const + \brief Count options in the menu +*/ + + +/*! + \fn BOptionPopUpAddOptionAt(const char* name, int32 value, int32 index) + \brief Add an option to the menu. + + Note that the option value is independant from its position in the menu. +*/ + + +/*! + \fn BOptionPopUp::SelectedOption(const char** _name = 0, int32* _value = 0) + \brief Get the label and/or value of the currently selected option. +*/