- _guiInput
void _guiInput(InputEvent arg0)
- _popupSelect
void _popupSelect(long arg0)
- _rangeClickTimeout
void _rangeClickTimeout()
- _scrollMoved
void _scrollMoved(double arg0)
- _textEditorEnter
void _textEditorEnter(StringArg0 arg0)
- _textEditorModalClose
void _textEditorModalClose()
- _valueEditorChanged
void _valueEditorChanged(double arg0)
- areColumnTitlesVisible
bool areColumnTitlesVisible()
Returns true if the column titles are being shown.
- clear
void clear()
Clears the tree. This removes all items.
- createItem
TreeItem createItem(GodotObject parent, long idx)
Create an item in the tree and add it as the last child of parent. If parent is not given, it will be added as the root's last child, or it'll the be the root itself if the tree is empty.
- ensureCursorIsVisible
void ensureCursorIsVisible()
Makes the currently selected item visible. This will scroll the tree to make sure the selected item is visible.
- getAllowReselect
bool getAllowReselect()
- getAllowRmbSelect
bool getAllowRmbSelect()
- getColumnAtPosition
long getColumnAtPosition(Vector2 position)
Returns the column index under the given point.
- getColumnTitle
String getColumnTitle(long column)
Returns the column's title.
- getColumnWidth
long getColumnWidth(long column)
Returns the column's width in pixels.
- getColumns
long getColumns()
- getCustomPopupRect
Rect2 getCustomPopupRect()
Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See TreeItem.setCellMode.
- getDropModeFlags
long getDropModeFlags()
- getDropSectionAtPosition
long getDropSectionAtPosition(Vector2 position)
If dropModeFlags includes DROP_MODE_INBETWEEN, returns -1 if position is the upper part of a tree item at that position, 1 for the lower part, and additionally 0 for the middle part if dropModeFlags includes DROP_MODE_ON_ITEM.
Otherwise, returns 0. If there are no tree item at position, returns -100.
- getEdited
TreeItem getEdited()
Returns the currently edited item. This is only available for custom cell mode.
- getEditedColumn
long getEditedColumn()
Returns the column for the currently edited item. This is only available for custom cell mode.
- getItemAreaRect
Rect2 getItemAreaRect(GodotObject item, long column)
Returns the rectangle area for the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns.
- getItemAtPosition
TreeItem getItemAtPosition(Vector2 position)
Returns the tree item at the specified position (relative to the tree origin position).
- getNextSelected
TreeItem getNextSelected(GodotObject from)
Returns the next selected item after the given one.
- getPressedButton
long getPressedButton()
Returns the last pressed button's index.
- getRoot
TreeItem getRoot()
Returns the tree's root item.
- getScroll
Vector2 getScroll()
Returns the current scrolling position.
- getSelectMode
Tree.SelectMode getSelectMode()
- getSelected
TreeItem getSelected()
Returns the currently selected item.
- getSelectedColumn
long getSelectedColumn()
Returns the current selection's column.
- isFoldingHidden
bool isFoldingHidden()
- isRootHidden
bool isRootHidden()
- opAssign
Tree opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(Tree other)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
- setAllowReselect
void setAllowReselect(bool allow)
- setAllowRmbSelect
void setAllowRmbSelect(bool allow)
- setColumnExpand
void setColumnExpand(long column, bool expand)
If true the column will have the "Expand" flag of Control.
- setColumnMinWidth
void setColumnMinWidth(long column, long min_width)
Set the minimum width of a column.
- setColumnTitle
void setColumnTitle(long column, StringArg1 title)
Set the title of a column.
- setColumnTitlesVisible
void setColumnTitlesVisible(bool visible)
If true column titles are visible.
- setColumns
void setColumns(long amount)
- setDropModeFlags
void setDropModeFlags(long flags)
- setHideFolding
void setHideFolding(bool hide)
- setHideRoot
void setHideRoot(bool enable)
- setSelectMode
void setSelectMode(long mode)
- allowReselect
bool allowReselect [@property getter]
bool allowReselect [@property setter]
If true the currently selected cell may be selected again.
- allowRmbSelect
bool allowRmbSelect [@property getter]
bool allowRmbSelect [@property setter]
If true a right mouse button click can select items.
- columns
long columns [@property getter]
long columns [@property setter]
- dropModeFlags
long dropModeFlags [@property getter]
long dropModeFlags [@property setter]
The drop mode as an OR combination of flags. See DROP_MODE_* constants. Once dropping is done, reverts to DROP_MODE_DISABLED. Setting this during Control.canDropData is recommended.
- hideFolding
bool hideFolding [@property getter]
bool hideFolding [@property setter]
If true the folding arrow is hidden.
- hideRoot
bool hideRoot [@property getter]
bool hideRoot [@property setter]
If true the tree's root is hidden.
- selectMode
Tree.SelectMode selectMode [@property getter]
long selectMode [@property setter]
Allow single or multiple selection. See the SELECT_* constants.
Control to show a tree of items.
This shows a tree of items that can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like text editing, buttons and popups. It can be useful for structured displays and interactions. Trees are built via code, using TreeItem objects to create the structure. They have a single root but multiple roots can be simulated if a dummy hidden root is added.