Control for a single item inside a [Tree].
Control for a single item inside a [Tree]. May have child [TreeItem]s and be styled as well as contain buttons.
You can remove a [TreeItem] by using [method Object.free].
Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code].
Calls the [code]method[/code] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list.
Resets the background color for the given column to default.
Resets the color for the given column to default.
Removes all OpenType features.
Deselects the given column.
Removes the button at index [code]button_idx[/code] in column [code]column[/code].
Returns the [Texture2D] of the button at index [code]button_idx[/code] in column [code]column[/code].
Returns the number of buttons in column [code]column[/code]. May be used to get the most recently added button's index, if no index was specified.
Returns the tooltip string for the button at index [code]button_idx[/code] in column [code]column[/code].
Returns the column's cell mode.
Returns the TreeItem's first child item or a null object if there is none.
Returns the custom background color of column [code]column[/code].
Returns the custom color of column [code]column[/code].
Returns [code]true[/code] if [code]expand_right[/code] is set.
Returns the given column's icon [Texture2D]. Error if no icon is set.
Returns the column's icon's maximum width.
Returns the [Color] modulating the column's icon.
Returns the icon [Texture2D] region as [Rect2].
Returns item's text language code.
Returns the next TreeItem in the tree or a null object if there is none.
Returns the next visible TreeItem in the tree or a null object if there is none.
If [code]wrap[/code] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns [code]null[/code].
Returns OpenType feature [code]tag[/code] of the item's text.
Returns the parent TreeItem or a null object if there is none.
Returns the previous TreeItem in the tree or a null object if there is none.
Returns the previous visible TreeItem in the tree or a null object if there is none.
If [code]wrap[/code] is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns [code]null[/code].
Returns the given column's text.
Returns the given column's text alignment.
Returns item's text base writing direction.
Returns the given column's tooltip.
Returns [code]true[/code] if the button at index [code]button_idx[/code] for the given column is disabled.
Returns [code]true[/code] if the given column is checked.
Returns [code]true[/code] if column [code]column[/code] is editable.
Returns [code]true[/code] if column [code]column[/code] is selectable.
Returns [code]true[/code] if column [code]column[/code] is selected.
Moves this TreeItem to the bottom in the [Tree] hierarchy.
Moves this TreeItem to the top in the [Tree] hierarchy.
Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [TreeItem] use [method Object.free].
Selects the column [code]column[/code].
Sets the given column's button [Texture2D] at index [code]button_idx[/code] to [code]button[/code].
If [code]true[/code], disables the button at index [code]button_idx[/code] in column [code]column[/code].
Sets the given column's cell mode to [code]mode[/code]. See [enum TreeCellMode] constants.
If [code]true[/code], the column [code]column[/code] is checked.
Sets the given column's custom background color and whether to just use it as an outline.
Sets the given column's custom color.
Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code].
The [code]callback[/code] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].
If [code]true[/code], column [code]column[/code] is editable.
If [code]true[/code], column [code]column[/code] is expanded to the right.
Sets the given column's icon [Texture2D].
Sets the given column's icon's maximum width.
Modulates the given column's icon with [code]modulate[/code].
Sets the given column's icon's texture region.
Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
Sets OpenType feature [code]tag[/code] for the item's text.
If [code]true[/code], the given column is selectable.
Sets the given column's text alignment. See [enum TextAlign] for possible values.
Sets item's text base writing direction.
Sets the given column's tooltip text.
If [code]true[/code], the TreeItem is collapsed.
The custom minimum height.
If [code]true[/code], folding is disabled for this TreeItem.
Cell contains a string.
Cell can be checked.
Cell contains a range.
Cell contains an icon.
Align text to the left. See [code]set_text_align()[/code].
Center text. See [code]set_text_align()[/code].
Align text to the right. See [code]set_text_align()[/code].