Skip to content

Commit

Permalink
ImGuiColorTextEdit: add GetSelectionStart/End
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Jan 16, 2024
1 parent 0ba472a commit 32e1787
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bindings/imgui_bundle/imgui_color_text_edit.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ class TextEditor:
a_cursor: int = -1
) -> None:
pass
def get_selection_start(self, a_cursor: int = -1) -> TextEditor.Coordinates:
pass
def get_selection_end(self, a_cursor: int = -1) -> TextEditor.Coordinates:
pass
@overload
def set_selection(
self,
Expand Down
2 changes: 1 addition & 1 deletion external/ImGuiColorTextEdit/ImGuiColorTextEdit
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ void py_init_module_imgui_color_text_edit(py::module& m)
&TextEditor::SetSelectionStart, py::arg("a_position"), py::arg("a_cursor") = -1)
.def("set_selection_end",
&TextEditor::SetSelectionEnd, py::arg("a_position"), py::arg("a_cursor") = -1)
.def("get_selection_start",
&TextEditor::GetSelectionStart, py::arg("a_cursor") = -1)
.def("get_selection_end",
&TextEditor::GetSelectionEnd, py::arg("a_cursor") = -1)
.def("set_selection",
py::overload_cast<const TextEditor::Coordinates &, const TextEditor::Coordinates &, TextEditor::SelectionMode, int, bool>(&TextEditor::SetSelection), py::arg("a_start"), py::arg("a_end"), py::arg("a_mode") = TextEditor::SelectionMode::Normal, py::arg("a_cursor") = -1, py::arg("is_spawning_new_cursor") = false)
.def("set_selection",
Expand Down

0 comments on commit 32e1787

Please sign in to comment.