MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_navigation_state

Method get_navigation_state

editor/gui/code_editor.cpp:1499–1516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1497}
1498
1499Variant CodeTextEditor::get_navigation_state() {
1500 Dictionary state;
1501
1502 state["scroll_position"] = text_editor->get_v_scroll();
1503 state["h_scroll_position"] = text_editor->get_h_scroll();
1504 state["column"] = text_editor->get_caret_column();
1505 state["row"] = text_editor->get_caret_line();
1506
1507 state["selection"] = get_text_editor()->has_selection();
1508 if (get_text_editor()->has_selection()) {
1509 state["selection_from_line"] = text_editor->get_selection_from_line();
1510 state["selection_from_column"] = text_editor->get_selection_from_column();
1511 state["selection_to_line"] = text_editor->get_selection_to_line();
1512 state["selection_to_column"] = text_editor->get_selection_to_column();
1513 }
1514
1515 return state;
1516}
1517
1518void CodeTextEditor::set_error(const String &p_error) {
1519 error->set_text(p_error);

Callers 1

popup_find_lineMethod · 0.45

Calls 9

get_caret_lineMethod · 0.80
get_selection_to_lineMethod · 0.80
get_v_scrollMethod · 0.45
get_h_scrollMethod · 0.45
get_caret_columnMethod · 0.45
has_selectionMethod · 0.45

Tested by

no test coverage detected