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

Method get_next_selected

scene/gui/tree.cpp:5439–5473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5437}
5438
5439TreeItem *Tree::get_next_selected(TreeItem *p_item) {
5440 if (!root) {
5441 return nullptr;
5442 }
5443
5444 while (true) {
5445 if (!p_item) {
5446 p_item = root;
5447 } else {
5448 if (p_item->first_child) {
5449 p_item = p_item->first_child;
5450
5451 } else if (p_item->next) {
5452 p_item = p_item->next;
5453 } else {
5454 while (!p_item->next) {
5455 p_item = p_item->parent;
5456 if (p_item == nullptr) {
5457 return nullptr;
5458 }
5459 }
5460
5461 p_item = p_item->next;
5462 }
5463 }
5464
5465 for (int i = 0; i < columns.size(); i++) {
5466 if (p_item->cells[i].selected) {
5467 return p_item;
5468 }
5469 }
5470 }
5471
5472 return nullptr;
5473}
5474
5475int Tree::get_column_minimum_width(int p_column) const {
5476 ERR_FAIL_INDEX_V(p_column, columns.size(), -1);

Callers 12

_editedMethod · 0.80
get_drag_data_fwMethod · 0.80
_sbox_inputMethod · 0.80
get_drag_data_fwMethod · 0.80
_notificationMethod · 0.80
_tree_get_selectedMethod · 0.80
_file_optionMethod · 0.80
get_drag_data_fwMethod · 0.80
_tree_gui_inputMethod · 0.80
_file_list_gui_inputMethod · 0.80

Calls 1

sizeMethod · 0.65

Tested by

no test coverage detected