Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Missing Python Bindings and Add/Update Docstrings #6429

Merged
merged 5 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cpp/pybind/visualization/gui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,8 @@ void pybind_gui_classes(py::module &m) {
.def_property_readonly("number_of_items",
&Combobox::GetNumberOfItems,
"The number of items (read-only)")
.def("get_item", &Combobox::GetItem,
"Returns the item at the given index")
.def("get_item", &Combobox::GetItem, "index"_a,
"Returns the item at the given index. Index must be valid.")
.def_property("selected_index", &Combobox::GetSelectedIndex,
&Combobox::SetSelectedIndex,
"The index of the currently selected item")
Expand Down Expand Up @@ -1550,6 +1550,11 @@ void pybind_gui_classes(py::module &m) {
.def("remove_item", &TreeView::RemoveItem,
"Removes an item and all its children (if any)")
.def("clear", &TreeView::Clear, "Removes all items")
.def("get_item", &TreeView::GetItem, "item_id"_a,
"Returns the widget associated with the provided Item ID. For "
"example, to manipulate the widget of the currently selected "
"item you would use the ItemID of the selected_item property "
"with get_item to get the widget.")
.def_property(
"can_select_items_with_children",
&TreeView::GetCanSelectItemsWithChildren,
Expand Down
Loading
Loading