15 namespace visualization {
21 explicit Combobox(
const std::vector<const char*>& items);
35 void ChangeItem(
const char* orig_name,
const char* new_name);
46 const char*
GetItem(
int index)
const;
66 std::function<
void(
const char*,
int)> on_value_changed);
70 std::unique_ptr<Impl> impl_;
int GetNumberOfItems() const
void RemoveItem(const char *name)
Removes the first item matching the given text.
int GetSelectedIndex() const
const char * GetSelectedValue() const
Returns the text of the selected value, or "" if nothing is selected.
int AddItem(const char *name)
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
DrawResult Draw(const DrawContext &context) override
bool SetSelectedValue(const char *value)
void ChangeItem(int index, const char *name)
const char * GetItem(int index) const
void SetOnValueChanged(std::function< void(const char *, int)> on_value_changed)
void SetSelectedIndex(int index)
Generic file read and write utility for python interface.