Class ComboBox¶
Defined in File combobox.h
Page Contents
Inheritance Relationships¶
Base Type¶
public nanogui::PopupButton
(Class PopupButton)
Derived Type¶
public nanogui::detail::FormWidget< T, typename std::is_enum< T >::type >
(Template Class FormWidget< T, typename std::is_enum< T >::type >)
Class Documentation¶
-
class
ComboBox
: public nanogui::PopupButton¶ Simple combo box widget based on a popup button.
Subclassed by nanogui::detail::FormWidget< T, typename std::is_enum< T >::type >
Public Functions
-
ComboBox
(Widget *parent, const std::vector<std::string> &items)¶ Create a new combo box with the given items.
-
ComboBox
(Widget *parent, const std::vector<std::string> &items, const std::vector<std::string> &itemsShort)¶ Create a new combo box with the given items, providing both short and long descriptive labels for each item.
-
void
setCallback
(const std::function<void(int)> &callback)¶ Sets the callback to execute for this ComboBox.
-
void
setItems
(const std::vector<std::string> &items, const std::vector<std::string> &itemsShort)¶ Sets the items for this ComboBox, providing both short and long descriptive lables for each item.
-
const std::vector<std::string> &
itemsShort
() const¶ The short descriptions associated with this ComboBox.
-
virtual bool
scrollEvent
(const Vector2i &p, const Vector2f &rel)¶ Handles mouse scrolling events for this ComboBox.
-
virtual void
save
(Serializer &s) const¶ Saves the state of this ComboBox to the specified Serializer.
-
virtual bool
load
(Serializer &s)¶ Sets the state of this ComboBox from the specified Serializer.
-