15 namespace visualization {
32 std::function<
void(
bool)> on_toggled);
44 std::unique_ptr<Impl> impl_;
52 std::function<
void(
bool)> on_enabled,
53 std::function<
void(
const Color&)> on_color_changed);
66 std::unique_ptr<Impl> impl_;
73 std::function<
void(
double)> on_value_changed,
74 std::function<
void(
const Color&)> on_color_changed);
86 std::unique_ptr<Impl> impl_;
135 std::function<
void(
ItemId)> on_selection_changed);
139 std::unique_ptr<Impl> impl_;
CheckableTextTreeCell(const char *text, bool is_checked, std::function< void(bool)> on_toggled)
std::shared_ptr< Checkbox > GetCheckbox()
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
std::shared_ptr< Label > GetLabel()
void Layout(const LayoutContext &context) override
void Layout(const LayoutContext &context) override
ColormapTreeCell(double value, const Color &color, std::function< void(double)> on_value_changed, std::function< void(const Color &)> on_color_changed)
std::shared_ptr< NumberEdit > GetNumberEdit()
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
std::shared_ptr< ColorEdit > GetColorEdit()
std::shared_ptr< Label > GetLabel()
void Layout(const LayoutContext &context) override
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
std::shared_ptr< ColorEdit > GetColorEdit()
std::shared_ptr< Checkbox > GetCheckbox()
LUTTreeCell(const char *text, bool is_checked, const Color &color, std::function< void(bool)> on_enabled, std::function< void(const Color &)> on_color_changed)
std::shared_ptr< Widget > GetItem(ItemId item_id) const
Returns item, or nullptr if item_id cannot be found.
void Clear()
Clears all the items.
void SetOnSelectionChanged(std::function< void(ItemId)> on_selection_changed)
void SetSelectedItemId(ItemId item_id)
Selects the indicated item of the list. Does not call onValueChanged.
ItemId AddTextItem(ItemId parent_id, const char *text)
Adds a text item to the tree.
void Layout(const LayoutContext &context) override
void SetCanSelectItemsWithChildren(bool can_select)
void RemoveItem(ItemId item_id)
Removes an item an all its children (if any) from the tree.
std::vector< ItemId > GetItemChildren(ItemId parent_id) const
ItemId GetRootItem() const
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
bool GetCanSelectItemsWithChildren() const
DrawResult Draw(const DrawContext &context) override
ItemId GetSelectedItemId() const
Returns the currently selected item id in the tree.
ItemId AddItem(ItemId parent_id, std::shared_ptr< Widget > item)
Adds an item to the tree.
Size CalcMinimumSize(const LayoutContext &context) const override
Generic file read and write utility for python interface.