34 namespace visualization {
40 explicit Combobox(
const std::vector<const char*>& items);
54 void ChangeItem(
const char* orig_name,
const char* new_name);
65 const char*
GetItem(
int index)
const;
84 std::function<
void(
const char*,
int)> on_value_changed);
88 std::unique_ptr<Impl> impl_;
const char * GetItem(int index) const
Definition: Combobox.cpp:118
int GetNumberOfItems() const
Definition: Combobox.cpp:114
DrawResult Draw(const DrawContext &context) override
Definition: Combobox.cpp:168
const char * GetSelectedValue() const
Returns the text of the selected value, or "" if nothing is selected.
Definition: Combobox.cpp:124
void SetOnValueChanged(std::function< void(const char *, int)> on_value_changed)
Definition: Combobox.cpp:150
void RemoveItem(const char *name)
Removes the first item matching the given text.
Definition: Combobox.cpp:96
int AddItem(const char *name)
Definition: Combobox.cpp:78
void ChangeItem(int index, const char *name)
Definition: Combobox.cpp:83
Combobox()
Definition: Combobox.cpp:59
void ClearItems()
Definition: Combobox.cpp:73
~Combobox() override
Definition: Combobox.cpp:71
Size CalcPreferredSize(const Theme &theme) const override
Definition: Combobox.cpp:155
bool SetSelectedValue(const char *value)
Definition: Combobox.cpp:139
Definition: PinholeCameraIntrinsic.cpp:35
Definition: Combobox.cpp:52
std::string name
Definition: FilePCD.cpp:58
Definition: Combobox.h:37
int GetSelectedIndex() const
Definition: Combobox.cpp:122
void SetSelectedIndex(int index)
Definition: Combobox.cpp:133