TreeItem

package
v0.0.0-...-ad02d68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

A single item of a [Tree] control. It can contain other [TreeItem]s as children, which allows it to create a hierarchy. It can also contain text and buttons. [TreeItem] is not a [Node], it is internal to the [Tree]. To create a [TreeItem], use [Instance.Tree.CreateItem] or [Instance.Treeitem.CreateChild]. To remove a [TreeItem], use [Instance.Object.Free]. Note: The ID values used for buttons are 32-bit, unlike [int] which is always 64-bit. They go from -2147483648 to 2147483647.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsTreeItem() Instance
}

type Expanded

type Expanded [1]gdclass.TreeItem

func (Expanded) AddButton

func (self Expanded) AddButton(column int, button Texture2D.Instance, id int, disabled bool, tooltip_text string)

Adds a button with [Texture2D] 'button' to the end of the cell at column 'column'. The 'id' is used to identify the button in the according [signal Tree.button_clicked] signal and can be different from the buttons index. If not specified, the next available index is used, which may be retrieved by calling Instance.GetButtonCount immediately before this method. Optionally, the button can be 'disabled' and have a 'tooltip_text'.

func (Expanded) CreateChild

func (self Expanded) CreateChild(index int) Instance

Creates an item and adds it as a child. The new item will be inserted as position 'index' (the default value -1 means the last position), or it will be the last child if 'index' is higher than the child count.

func (Expanded) GetNextInTree

func (self Expanded) GetNextInTree(wrap bool) Instance

Returns the next TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If 'wrap' is enabled, the method will wrap around to the first element in the tree when called on the last element, otherwise it returns null.

func (Expanded) GetNextVisible

func (self Expanded) GetNextVisible(wrap bool) Instance

Returns the next visible TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If 'wrap' 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 null.

func (Expanded) GetPrevInTree

func (self Expanded) GetPrevInTree(wrap bool) Instance

Returns the previous TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If 'wrap' is enabled, the method will wrap around to the last element in the tree when called on the first visible element, otherwise it returns null.

func (Expanded) GetPrevVisible

func (self Expanded) GetPrevVisible(wrap bool) Instance

Returns the previous visible sibling TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If 'wrap' 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 null.

func (Expanded) IsAnyCollapsed

func (self Expanded) IsAnyCollapsed(only_visible bool) bool

Returns true if this [TreeItem], or any of its descendants, is collapsed. If 'only_visible' is true it ignores non-visible [TreeItem]s.

func (Expanded) PropagateCheck

func (self Expanded) PropagateCheck(column int, emit_signal bool)

Propagates this item's checked status to its children and parents for the given 'column'. It is possible to process the items affected by this method call by connecting to [signal Tree.check_propagated_to_item]. The order that the items affected will be processed is as follows: the item invoking this method, children of that item, and finally parents of that item. If 'emit_signal' is false, then [signal Tree.check_propagated_to_item] will not be emitted.

func (Expanded) SetCustomBgColor

func (self Expanded) SetCustomBgColor(column int, color Color.RGBA, just_outline bool)

Sets the given column's custom background color and whether to just use it as an outline.

func (Expanded) SetRangeConfig

func (self Expanded) SetRangeConfig(column int, min Float.X, max Float.X, step Float.X, expr bool)

Sets the range of accepted values for a column. The column must be in the CellModeRange mode. If 'expr' is true, the edit mode slider will use an exponential scale as with [member Range.exp_edit].

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsTreeItem

func (self *Extension[T]) AsTreeItem() Instance

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.TreeItem

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AddButton

func (self Instance) AddButton(column int, button Texture2D.Instance)

Adds a button with [Texture2D] 'button' to the end of the cell at column 'column'. The 'id' is used to identify the button in the according [signal Tree.button_clicked] signal and can be different from the buttons index. If not specified, the next available index is used, which may be retrieved by calling Instance.GetButtonCount immediately before this method. Optionally, the button can be 'disabled' and have a 'tooltip_text'.

func (Instance) AddChild

func (self Instance) AddChild(child Instance)

Adds a previously unparented [TreeItem] as a direct child of this one. The 'child' item must not be a part of any [Tree] or parented to any [TreeItem]. See also Instance.RemoveChild.

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsTreeItem

func (self Instance) AsTreeItem() Instance

func (Instance) CallRecursive

func (self Instance) CallRecursive(method string, args ...any)

Calls the 'method' on the actual TreeItem and its children recursively. Pass parameters as a comma separated list.

func (Instance) ClearButtons

func (self Instance) ClearButtons()

Removes all buttons from all columns of this item.

func (Instance) ClearCustomBgColor

func (self Instance) ClearCustomBgColor(column int)

Resets the background color for the given column to default.

func (Instance) ClearCustomColor

func (self Instance) ClearCustomColor(column int)

Resets the color for the given column to default.

func (Instance) Collapsed

func (self Instance) Collapsed() bool

func (Instance) CreateChild

func (self Instance) CreateChild() Instance

Creates an item and adds it as a child. The new item will be inserted as position 'index' (the default value -1 means the last position), or it will be the last child if 'index' is higher than the child count.

func (Instance) CustomMinimumHeight

func (self Instance) CustomMinimumHeight() int

func (Instance) Deselect

func (self Instance) Deselect(column int)

Deselects the given column.

func (Instance) DisableFolding

func (self Instance) DisableFolding() bool

func (Instance) EraseButton

func (self Instance) EraseButton(column int, button_index int)

Removes the button at index 'button_index' in column 'column'.

func (Instance) GetAutoTranslateMode

func (self Instance) GetAutoTranslateMode(column int) Node.AutoTranslateMode

Returns the column's auto translate mode.

func (Instance) GetAutowrapMode

func (self Instance) GetAutowrapMode(column int) TextServer.AutowrapMode

Returns the text autowrap mode in the given 'column'. By default it is [Textserver.AutowrapOff].

func (Instance) GetButton

func (self Instance) GetButton(column int, button_index int) Texture2D.Instance

Returns the [Texture2D] of the button at index 'button_index' in column 'column'.

func (Instance) GetButtonById

func (self Instance) GetButtonById(column int, id int) int

Returns the button index if there is a button with ID 'id' in column 'column', otherwise returns -1.

func (Instance) GetButtonColor

func (self Instance) GetButtonColor(column int, id int) Color.RGBA

Returns the color of the button with ID 'id' in column 'column'. If the specified button does not exist, returns [Color.Black].

func (Instance) GetButtonCount

func (self Instance) GetButtonCount(column int) int

Returns the number of buttons in column 'column'.

func (Instance) GetButtonId

func (self Instance) GetButtonId(column int, button_index int) int

Returns the ID for the button at index 'button_index' in column 'column'.

func (Instance) GetButtonTooltipText

func (self Instance) GetButtonTooltipText(column int, button_index int) string

Returns the tooltip text for the button at index 'button_index' in column 'column'.

func (Instance) GetCellMode

func (self Instance) GetCellMode(column int) TreeCellMode

Returns the column's cell mode.

func (Instance) GetChild

func (self Instance) GetChild(index int) Instance

Returns a child item by its 'index' (see Instance.GetChildCount). This method is often used for iterating all children of an item. Negative indices access the children from the last one.

func (Instance) GetChildCount

func (self Instance) GetChildCount() int

Returns the number of child items.

func (Instance) GetChildren

func (self Instance) GetChildren() []Instance

Returns an array of references to the item's children.

func (Instance) GetCustomBgColor

func (self Instance) GetCustomBgColor(column int) Color.RGBA

Returns the custom background color of column 'column'.

func (Instance) GetCustomColor

func (self Instance) GetCustomColor(column int) Color.RGBA

Returns the custom color of column 'column'.

func (Instance) GetCustomDrawCallback

func (self Instance) GetCustomDrawCallback(column int) Callable.Function

Returns the custom callback of column 'column'.

func (Instance) GetCustomFont

func (self Instance) GetCustomFont(column int) Font.Instance

Returns custom font used to draw text in the column 'column'.

func (Instance) GetCustomFontSize

func (self Instance) GetCustomFontSize(column int) int

Returns custom font size used to draw text in the column 'column'.

func (Instance) GetExpandRight

func (self Instance) GetExpandRight(column int) bool

Returns true if expand_right is set.

func (Instance) GetFirstChild

func (self Instance) GetFirstChild() Instance

Returns the TreeItem's first child.

func (Instance) GetIcon

func (self Instance) GetIcon(column int) Texture2D.Instance

Returns the given column's icon [Texture2D]. Error if no icon is set.

func (Instance) GetIconMaxWidth

func (self Instance) GetIconMaxWidth(column int) int

Returns the maximum allowed width of the icon in the given 'column'.

func (Instance) GetIconModulate

func (self Instance) GetIconModulate(column int) Color.RGBA

Returns the [Color] modulating the column's icon.

func (Instance) GetIconOverlay

func (self Instance) GetIconOverlay(column int) Texture2D.Instance

Returns the given column's icon overlay [Texture2D].

func (Instance) GetIconRegion

func (self Instance) GetIconRegion(column int) Rect2.PositionSize

Returns the icon [Texture2D] region as [Rect2].

func (Instance) GetIndex

func (self Instance) GetIndex() int

Returns the node's order in the tree. For example, if called on the first child item the position is 0.

func (Instance) GetLanguage

func (self Instance) GetLanguage(column int) string

Returns item's text language code.

func (Instance) GetMetadata

func (self Instance) GetMetadata(column int) any

Returns the metadata value that was set for the given column using Instance.SetMetadata.

func (Instance) GetNext

func (self Instance) GetNext() Instance

Returns the next sibling TreeItem in the tree or a null object if there is none.

func (Instance) GetNextInTree

func (self Instance) GetNextInTree() Instance

Returns the next TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If 'wrap' is enabled, the method will wrap around to the first element in the tree when called on the last element, otherwise it returns null.

func (Instance) GetNextVisible

func (self Instance) GetNextVisible() Instance

Returns the next visible TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If 'wrap' 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 null.

func (Instance) GetParent

func (self Instance) GetParent() Instance

Returns the parent TreeItem or a null object if there is none.

func (Instance) GetPrev

func (self Instance) GetPrev() Instance

Returns the previous sibling TreeItem in the tree or a null object if there is none.

func (Instance) GetPrevInTree

func (self Instance) GetPrevInTree() Instance

Returns the previous TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If 'wrap' is enabled, the method will wrap around to the last element in the tree when called on the first visible element, otherwise it returns null.

func (Instance) GetPrevVisible

func (self Instance) GetPrevVisible() Instance

Returns the previous visible sibling TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If 'wrap' 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 null.

func (Instance) GetRange

func (self Instance) GetRange(column int) Float.X

Returns the value of a CellModeRange column.

func (Instance) GetRangeConfig

func (self Instance) GetRangeConfig(column int) RangeConfig

Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr".

func (Instance) GetStructuredTextBidiOverride

func (self Instance) GetStructuredTextBidiOverride(column int) TextServer.StructuredTextParser

Returns the BiDi algorithm override set for this cell.

func (Instance) GetStructuredTextBidiOverrideOptions

func (self Instance) GetStructuredTextBidiOverrideOptions(column int) []any

Returns the additional BiDi options set for this cell.

func (Instance) GetSuffix

func (self Instance) GetSuffix(column int) string

Gets the suffix string shown after the column value.

func (Instance) GetText

func (self Instance) GetText(column int) string

Returns the given column's text.

func (Instance) GetTextAlignment

func (self Instance) GetTextAlignment(column int) GUI.HorizontalAlignment

Returns the given column's text alignment.

func (Instance) GetTextDirection

func (self Instance) GetTextDirection(column int) Control.TextDirection

Returns item's text base writing direction.

func (Instance) GetTextOverrunBehavior

func (self Instance) GetTextOverrunBehavior(column int) TextServer.OverrunBehavior

Returns the clipping behavior when the text exceeds the item's bounding rectangle in the given 'column'. By default it is [Textserver.OverrunTrimEllipsis].

func (Instance) GetTooltipText

func (self Instance) GetTooltipText(column int) string

Returns the given column's tooltip text.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) IsAnyCollapsed

func (self Instance) IsAnyCollapsed() bool

Returns true if this [TreeItem], or any of its descendants, is collapsed. If 'only_visible' is true it ignores non-visible [TreeItem]s.

func (Instance) IsButtonDisabled

func (self Instance) IsButtonDisabled(column int, button_index int) bool

Returns true if the button at index 'button_index' for the given 'column' is disabled.

func (Instance) IsChecked

func (self Instance) IsChecked(column int) bool

Returns true if the given 'column' is checked.

func (Instance) IsCustomSetAsButton

func (self Instance) IsCustomSetAsButton(column int) bool

Returns true if the cell was made into a button with Instance.SetCustomAsButton.

func (Instance) IsEditMultiline

func (self Instance) IsEditMultiline(column int) bool

Returns true if the given 'column' is multiline editable.

func (Instance) IsEditable

func (self Instance) IsEditable(column int) bool

Returns true if the given 'column' is editable.

func (Instance) IsIndeterminate

func (self Instance) IsIndeterminate(column int) bool

Returns true if the given 'column' is indeterminate.

func (Instance) IsSelectable

func (self Instance) IsSelectable(column int) bool

Returns true if the given 'column' is selectable.

func (Instance) IsSelected

func (self Instance) IsSelected(column int) bool

Returns true if the given 'column' is selected.

func (Instance) IsVisibleInTree

func (self Instance) IsVisibleInTree() bool

Returns true if [member visible] is true and all its ancestors are also visible.

func (Instance) MoveAfter

func (self Instance) MoveAfter(item Instance)

Moves this TreeItem right after the given 'item'. Note: You can't move to the root or move the root.

func (Instance) MoveBefore

func (self Instance) MoveBefore(item Instance)

Moves this TreeItem right before the given 'item'. Note: You can't move to the root or move the root.

func (Instance) PropagateCheck

func (self Instance) PropagateCheck(column int)

Propagates this item's checked status to its children and parents for the given 'column'. It is possible to process the items affected by this method call by connecting to [signal Tree.check_propagated_to_item]. The order that the items affected will be processed is as follows: the item invoking this method, children of that item, and finally parents of that item. If 'emit_signal' is false, then [signal Tree.check_propagated_to_item] will not be emitted.

func (Instance) RemoveChild

func (self Instance) RemoveChild(child Instance)

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 (see Instance.AddChild). To completely remove a [TreeItem] use [Instance.Object.Free]. Note: If you want to move a child from one [Tree] to another, then instead of removing and adding it manually you can use Instance.MoveBefore or Instance.MoveAfter.

func (Instance) Select

func (self Instance) Select(column int)

Selects the given 'column'.

func (Instance) SetAutoTranslateMode

func (self Instance) SetAutoTranslateMode(column int, mode Node.AutoTranslateMode)

Sets the given column's auto translate mode to 'mode'. All columns use [Node.AutoTranslateModeInherit] by default, which uses the same auto translate mode as the [Tree] itself.

func (Instance) SetAutowrapMode

func (self Instance) SetAutowrapMode(column int, autowrap_mode TextServer.AutowrapMode)

Sets the autowrap mode in the given 'column'. If set to something other than [Textserver.AutowrapOff], the text gets wrapped inside the cell's bounding rectangle.

func (Instance) SetButton

func (self Instance) SetButton(column int, button_index int, button Texture2D.Instance)

Sets the given column's button [Texture2D] at index 'button_index' to 'button'.

func (Instance) SetButtonColor

func (self Instance) SetButtonColor(column int, button_index int, color Color.RGBA)

Sets the given column's button color at index 'button_index' to 'color'.

func (Instance) SetButtonDisabled

func (self Instance) SetButtonDisabled(column int, button_index int, disabled bool)

If true, disables the button at index 'button_index' in the given 'column'.

func (Instance) SetButtonTooltipText

func (self Instance) SetButtonTooltipText(column int, button_index int, tooltip string)

Sets the tooltip text for the button at index 'button_index' in the given 'column'.

func (Instance) SetCellMode

func (self Instance) SetCellMode(column int, mode TreeCellMode)

Sets the given column's cell mode to 'mode'. This determines how the cell is displayed and edited. See TreeCellMode constants for details.

func (Instance) SetChecked

func (self Instance) SetChecked(column int, checked bool)

If 'checked' is true, the given 'column' is checked. Clears column's indeterminate status.

func (Instance) SetCollapsed

func (self Instance) SetCollapsed(value bool)

func (Instance) SetCollapsedRecursive

func (self Instance) SetCollapsedRecursive(enable bool)

Collapses or uncollapses this [TreeItem] and all the descendants of this item.

func (Instance) SetCustomAsButton

func (self Instance) SetCustomAsButton(column int, enable bool)

Makes a cell with CellModeCustom display as a non-flat button with a [StyleBox].

func (Instance) SetCustomBgColor

func (self Instance) SetCustomBgColor(column int, color Color.RGBA)

Sets the given column's custom background color and whether to just use it as an outline.

func (Instance) SetCustomColor

func (self Instance) SetCustomColor(column int, color Color.RGBA)

Sets the given column's custom color.

func (Instance) SetCustomDraw

func (self Instance) SetCustomDraw(column int, obj Object.Instance, callback string)

Sets the given column's custom draw callback to the 'callback' method on 'object'. The method named 'callback' should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].

func (Instance) SetCustomDrawCallback

func (self Instance) SetCustomDrawCallback(column int, callback func(item Instance, rect Rect2.PositionSize))

Sets the given column's custom draw callback. Use an empty [Callable] (Callable()) to clear the custom callback. The cell has to be in CellModeCustom to use this feature. The 'callback' should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].

func (Instance) SetCustomFont

func (self Instance) SetCustomFont(column int, font Font.Instance)

Sets custom font used to draw text in the given 'column'.

func (Instance) SetCustomFontSize

func (self Instance) SetCustomFontSize(column int, font_size int)

Sets custom font size used to draw text in the given 'column'.

func (Instance) SetCustomMinimumHeight

func (self Instance) SetCustomMinimumHeight(value int)

func (Instance) SetDisableFolding

func (self Instance) SetDisableFolding(value bool)

func (Instance) SetEditMultiline

func (self Instance) SetEditMultiline(column int, multiline bool)

If 'multiline' is true, the given 'column' is multiline editable. Note: This option only affects the type of control ([LineEdit] or [TextEdit]) that appears when editing the column. You can set multiline values with Instance.SetText even if the column is not multiline editable.

func (Instance) SetEditable

func (self Instance) SetEditable(column int, enabled bool)

If 'enabled' is true, the given 'column' is editable.

func (Instance) SetExpandRight

func (self Instance) SetExpandRight(column int, enable bool)

If 'enable' is true, the given 'column' is expanded to the right.

func (Instance) SetIcon

func (self Instance) SetIcon(column int, texture Texture2D.Instance)

Sets the given cell's icon [Texture2D]. If the cell is in CellModeIcon mode, the icon is displayed in the center of the cell. Otherwise, the icon is displayed before the cell's text. CellModeRange does not display an icon.

func (Instance) SetIconMaxWidth

func (self Instance) SetIconMaxWidth(column int, width int)

Sets the maximum allowed width of the icon in the given 'column'. This limit is applied on top of the default size of the icon and on top of [theme_item Tree.icon_max_width]. The height is adjusted according to the icon's ratio.

func (Instance) SetIconModulate

func (self Instance) SetIconModulate(column int, modulate Color.RGBA)

Modulates the given column's icon with 'modulate'.

func (Instance) SetIconOverlay

func (self Instance) SetIconOverlay(column int, texture Texture2D.Instance)

Sets the given cell's icon overlay [Texture2D]. The cell has to be in CellModeIcon mode, and icon has to be set. Overlay is drawn on top of icon, in the bottom left corner.

func (Instance) SetIconRegion

func (self Instance) SetIconRegion(column int, region Rect2.PositionSize)

Sets the given column's icon's texture region.

func (Instance) SetIndeterminate

func (self Instance) SetIndeterminate(column int, indeterminate bool)

If 'indeterminate' is true, the given 'column' is marked indeterminate. Note: If set true from false, then column is cleared of checked status.

func (Instance) SetLanguage

func (self Instance) SetLanguage(column int, language string)

Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.

func (Instance) SetMetadata

func (self Instance) SetMetadata(column int, meta any)

Sets the metadata value for the given column, which can be retrieved later using Instance.GetMetadata. This can be used, for example, to store a reference to the original data.

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetRange

func (self Instance) SetRange(column int, value Float.X)

Sets the value of a CellModeRange column.

func (Instance) SetRangeConfig

func (self Instance) SetRangeConfig(column int, min Float.X, max Float.X, step Float.X)

Sets the range of accepted values for a column. The column must be in the CellModeRange mode. If 'expr' is true, the edit mode slider will use an exponential scale as with [member Range.exp_edit].

func (Instance) SetSelectable

func (self Instance) SetSelectable(column int, selectable bool)

If 'selectable' is true, the given 'column' is selectable.

func (Instance) SetStructuredTextBidiOverride

func (self Instance) SetStructuredTextBidiOverride(column int, parser TextServer.StructuredTextParser)

Set BiDi algorithm override for the structured text. Has effect for cells that display text.

func (Instance) SetStructuredTextBidiOverrideOptions

func (self Instance) SetStructuredTextBidiOverrideOptions(column int, args []any)

Set additional options for BiDi override. Has effect for cells that display text.

func (Instance) SetSuffix

func (self Instance) SetSuffix(column int, text string)

Sets a string to be shown after a column's value (for example, a unit abbreviation).

func (Instance) SetText

func (self Instance) SetText(column int, text string)

Sets the given column's text value.

func (Instance) SetTextAlignment

func (self Instance) SetTextAlignment(column int, text_alignment GUI.HorizontalAlignment)

Sets the given column's text alignment. See [HorizontalAlignment] for possible values.

func (Instance) SetTextDirection

func (self Instance) SetTextDirection(column int, direction Control.TextDirection)

Sets item's text base writing direction.

func (Instance) SetTextOverrunBehavior

func (self Instance) SetTextOverrunBehavior(column int, overrun_behavior TextServer.OverrunBehavior)

Sets the clipping behavior when the text exceeds the item's bounding rectangle in the given 'column'.

func (Instance) SetTooltipText

func (self Instance) SetTooltipText(column int, tooltip string)

Sets the given column's tooltip text.

func (Instance) SetVisible

func (self Instance) SetVisible(value bool)

func (Instance) UncollapseTree

func (self Instance) UncollapseTree()

Uncollapses all [TreeItem]s necessary to reveal this [TreeItem], i.e. all ancestor [TreeItem]s.

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

func (Instance) Visible

func (self Instance) Visible() bool

type RangeConfig

type RangeConfig struct {
	Min  float32 `gd:"min"`
	Max  float32 `gd:"max"`
	Step float32 `gd:"step"`
	Expr string  `gd:"expr"`
}

type TreeCellMode

type TreeCellMode int //gd:TreeItem.TreeCellMode
const (
	/*Cell shows a string label, optionally with an icon. When editable, the text can be edited using a [LineEdit], or a [TextEdit] popup if [method set_edit_multiline] is used.*/
	CellModeString TreeCellMode = 0
	/*Cell shows a checkbox, optionally with text and an icon. The checkbox can be pressed, released, or indeterminate (via [method set_indeterminate]). The checkbox can't be clicked unless the cell is editable.*/
	CellModeCheck TreeCellMode = 1
	/*Cell shows a numeric range. When editable, it can be edited using a range slider. Use [method set_range] to set the value and [method set_range_config] to configure the range.
	  This cell can also be used in a text dropdown mode when you assign a text with [method set_text]. Separate options with a comma, e.g. [code]"Option1,Option2,Option3"[/code].*/
	CellModeRange TreeCellMode = 2
	/*Cell shows an icon. It can't be edited nor display text. The icon is always centered within the cell.*/
	CellModeIcon TreeCellMode = 3
	/*Cell shows as a clickable button. It will display an arrow similar to [OptionButton], but doesn't feature a dropdown (for that you can use [constant CELL_MODE_RANGE]). Clicking the button emits the [signal Tree.item_edited] signal. The button is flat by default, you can use [method set_custom_as_button] to display it with a [StyleBox].
	  This mode also supports custom drawing using [method set_custom_draw_callback].*/
	CellModeCustom TreeCellMode = 4
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL