Merge pull request #11921 from mhilbrunner/docs-tree-treeitem

[DOCS] Document Tree & TreeItem
This commit is contained in:
Chris Bradfield 2017-10-09 13:53:30 -07:00 committed by GitHub
commit f240cfe5a9
2 changed files with 100 additions and 31 deletions

View file

@ -4,8 +4,8 @@
Control to show a tree of items. Control to show a tree of items.
</brief_description> </brief_description>
<description> <description>
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 structural displaying and interactions. 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 root can be simulated if a dummy hidden root is added. 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.
[codeblock] [codeblock]
func _ready(): func _ready():
var tree = Tree.new() var tree = Tree.new()
@ -26,14 +26,14 @@
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Get whether the column titles are being shown. Returns [code]true[/code] if the column titles are being shown.
</description> </description>
</method> </method>
<method name="clear"> <method name="clear">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Clear the tree. This erases all of the items. Clears the tree. This removes all items.
</description> </description>
</method> </method>
<method name="create_item"> <method name="create_item">
@ -42,27 +42,28 @@
<argument index="0" name="parent" type="Object" default="null"> <argument index="0" name="parent" type="Object" default="null">
</argument> </argument>
<description> <description>
Create an item in the tree and add it as the last child of [code]parent[/code]. If parent is not given, it will be added as the last child of the root, or it'll the be the root itself if the tree is empty. Create an item in the tree and add it as the last child of [code]parent[/code]. 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.
</description> </description>
</method> </method>
<method name="ensure_cursor_is_visible"> <method name="ensure_cursor_is_visible">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Make the current selected item visible. This will scroll the tree to make sure the selected item is in sight. Makes the currently selected item visible. This will scroll the tree to make sure the selected item is visible.
</description> </description>
</method> </method>
<method name="get_allow_reselect" qualifiers="const"> <method name="get_allow_reselect" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Returns [code]true[/code] if a cell that is currently already selected may be selected again.
</description> </description>
</method> </method>
<method name="get_allow_rmb_select" qualifiers="const"> <method name="get_allow_rmb_select" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Get whether a right click can select items. Returns [code]true[/code] if a right click can select items.
</description> </description>
</method> </method>
<method name="get_column_at_position" qualifiers="const"> <method name="get_column_at_position" qualifiers="const">
@ -71,7 +72,7 @@
<argument index="0" name="position" type="Vector2"> <argument index="0" name="position" type="Vector2">
</argument> </argument>
<description> <description>
Get the column index under the given point. Returns the column index under the given point.
</description> </description>
</method> </method>
<method name="get_column_title" qualifiers="const"> <method name="get_column_title" qualifiers="const">
@ -80,7 +81,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Get the title of the given column. Returns the column's title.
</description> </description>
</method> </method>
<method name="get_column_width" qualifiers="const"> <method name="get_column_width" qualifiers="const">
@ -89,28 +90,28 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Get the width of the given column in pixels. Returns the column's width in pixels.
</description> </description>
</method> </method>
<method name="get_columns" qualifiers="const"> <method name="get_columns" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Get the amount of columns. Returns the amount of columns.
</description> </description>
</method> </method>
<method name="get_custom_popup_rect" qualifiers="const"> <method name="get_custom_popup_rect" qualifiers="const">
<return type="Rect2"> <return type="Rect2">
</return> </return>
<description> <description>
Get the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode]. Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode].
</description> </description>
</method> </method>
<method name="get_drop_mode_flags" qualifiers="const"> <method name="get_drop_mode_flags" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Get the flags of the current drop mode. Returns the current drop mode's flags.
</description> </description>
</method> </method>
<method name="get_drop_section_at_position" qualifiers="const"> <method name="get_drop_section_at_position" qualifiers="const">
@ -125,14 +126,14 @@
<return type="TreeItem"> <return type="TreeItem">
</return> </return>
<description> <description>
Get the current edited item. This is only available for custom cell mode. Returns the currently edited item. This is only available for custom cell mode.
</description> </description>
</method> </method>
<method name="get_edited_column" qualifiers="const"> <method name="get_edited_column" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Get the column of the cell for the current edited icon. This is only available for custom cell mode. Returns the column for the currently edited item. This is only available for custom cell mode.
</description> </description>
</method> </method>
<method name="get_item_area_rect" qualifiers="const"> <method name="get_item_area_rect" qualifiers="const">
@ -143,7 +144,7 @@
<argument index="1" name="column" type="int" default="-1"> <argument index="1" name="column" type="int" default="-1">
</argument> </argument>
<description> <description>
Get the rectangle area of the the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. 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.
</description> </description>
</method> </method>
<method name="get_item_at_position" qualifiers="const"> <method name="get_item_at_position" qualifiers="const">
@ -152,7 +153,7 @@
<argument index="0" name="position" type="Vector2"> <argument index="0" name="position" type="Vector2">
</argument> </argument>
<description> <description>
Get the tree item at the specified position (relative to the tree origin position). Returns the tree item at the specified position (relative to the tree origin position).
</description> </description>
</method> </method>
<method name="get_next_selected"> <method name="get_next_selected">
@ -161,49 +162,49 @@
<argument index="0" name="from" type="Object"> <argument index="0" name="from" type="Object">
</argument> </argument>
<description> <description>
Get the next selected item after the given one. Returns the next selected item after the given one.
</description> </description>
</method> </method>
<method name="get_pressed_button" qualifiers="const"> <method name="get_pressed_button" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Get the index of the last pressed button. Returns the last pressed button's index.
</description> </description>
</method> </method>
<method name="get_root"> <method name="get_root">
<return type="TreeItem"> <return type="TreeItem">
</return> </return>
<description> <description>
Get the root item of the tree. Returns the tree's root item.
</description> </description>
</method> </method>
<method name="get_scroll" qualifiers="const"> <method name="get_scroll" qualifiers="const">
<return type="Vector2"> <return type="Vector2">
</return> </return>
<description> <description>
Get the current scrolling position. Returns the current scrolling position.
</description> </description>
</method> </method>
<method name="get_selected" qualifiers="const"> <method name="get_selected" qualifiers="const">
<return type="TreeItem"> <return type="TreeItem">
</return> </return>
<description> <description>
Get the currently selected item. Returns the currently selected item.
</description> </description>
</method> </method>
<method name="get_selected_column" qualifiers="const"> <method name="get_selected_column" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Get the column number of the current selection. Returns the current selection's column.
</description> </description>
</method> </method>
<method name="is_folding_hidden" qualifiers="const"> <method name="is_folding_hidden" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Get whether the folding arrow is hidden. Returns [code]true[/code] if the folding arrow is hidden.
</description> </description>
</method> </method>
<method name="set_allow_reselect"> <method name="set_allow_reselect">
@ -212,6 +213,7 @@
<argument index="0" name="allow" type="bool"> <argument index="0" name="allow" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code] the currently selected cell may be selected again.
</description> </description>
</method> </method>
<method name="set_allow_rmb_select"> <method name="set_allow_rmb_select">
@ -220,7 +222,7 @@
<argument index="0" name="allow" type="bool"> <argument index="0" name="allow" type="bool">
</argument> </argument>
<description> <description>
Set whether or not a right mouse button click can select items. If [code]true[/code] a right mouse button click can select items.
</description> </description>
</method> </method>
<method name="set_column_expand"> <method name="set_column_expand">
@ -231,7 +233,7 @@
<argument index="1" name="expand" type="bool"> <argument index="1" name="expand" type="bool">
</argument> </argument>
<description> <description>
Set whether a column will have the "Expand" flag of [Control]. If [code]true[/code] the column will have the "Expand" flag of [Control].
</description> </description>
</method> </method>
<method name="set_column_min_width"> <method name="set_column_min_width">
@ -262,7 +264,7 @@
<argument index="0" name="visible" type="bool"> <argument index="0" name="visible" type="bool">
</argument> </argument>
<description> <description>
Set whether the column titles visibility. If [code]true[/code] column titles are visible.
</description> </description>
</method> </method>
<method name="set_columns"> <method name="set_columns">
@ -289,7 +291,7 @@
<argument index="0" name="hide" type="bool"> <argument index="0" name="hide" type="bool">
</argument> </argument>
<description> <description>
Set whether the folding arrow should be hidden. If [code]true[/code] the folding arrow is hidden.
</description> </description>
</method> </method>
<method name="set_hide_root"> <method name="set_hide_root">
@ -298,7 +300,7 @@
<argument index="0" name="enable" type="bool"> <argument index="0" name="enable" type="bool">
</argument> </argument>
<description> <description>
Set whether the root of the tree should be hidden. If [code]true[/code] the tree's root is hidden.
</description> </description>
</method> </method>
<method name="set_select_mode"> <method name="set_select_mode">
@ -307,7 +309,7 @@
<argument index="0" name="mode" type="int" enum="Tree.SelectMode"> <argument index="0" name="mode" type="int" enum="Tree.SelectMode">
</argument> </argument>
<description> <description>
Set the selection mode. Use one of the [code]SELECT_*[/code] constants. Allow single or multiple selection. See the [code]SELECT_*[/code] constants.
</description> </description>
</method> </method>
</methods> </methods>
@ -332,6 +334,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Emitted when a column's title is pressed.
</description> </description>
</signal> </signal>
<signal name="custom_popup_edited"> <signal name="custom_popup_edited">
@ -366,15 +369,17 @@
</signal> </signal>
<signal name="item_double_clicked"> <signal name="item_double_clicked">
<description> <description>
Emitted when an item is double clicked.
</description> </description>
</signal> </signal>
<signal name="item_edited"> <signal name="item_edited">
<description> <description>
Emitted when an item is editted. Emitted when an item is edited.
</description> </description>
</signal> </signal>
<signal name="item_rmb_edited"> <signal name="item_rmb_edited">
<description> <description>
Emitted when an item is edited using the right mouse button.
</description> </description>
</signal> </signal>
<signal name="item_rmb_selected"> <signal name="item_rmb_selected">
@ -397,15 +402,18 @@
<argument index="2" name="selected" type="bool"> <argument index="2" name="selected" type="bool">
</argument> </argument>
<description> <description>
Emitted instead of [code]item_selected[/code] when [code]select_mode[/code] is [code]SELECT_MULTI[/code].
</description> </description>
</signal> </signal>
</signals> </signals>
<constants> <constants>
<constant name="SELECT_SINGLE" value="0"> <constant name="SELECT_SINGLE" value="0">
Allow selection of a single item at a time.
</constant> </constant>
<constant name="SELECT_ROW" value="1"> <constant name="SELECT_ROW" value="1">
</constant> </constant>
<constant name="SELECT_MULTI" value="2"> <constant name="SELECT_MULTI" value="2">
Allow selection of multiple items at the same time.
</constant> </constant>
<constant name="DROP_MODE_DISABLED" value="0"> <constant name="DROP_MODE_DISABLED" value="0">
</constant> </constant>

View file

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="TreeItem" inherits="Object" category="Core" version="3.0.alpha.custom_build"> <class name="TreeItem" inherits="Object" category="Core" version="3.0.alpha.custom_build">
<brief_description> <brief_description>
Control for a single item inside a [Tree].
</brief_description> </brief_description>
<description> <description>
Control for a single item inside a [Tree]. May have child [TreeItem]\ s and be styled as well as contain buttons.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -23,6 +25,7 @@
<argument index="4" name="tooltip" type="String" default="&quot;&quot;"> <argument index="4" name="tooltip" type="String" default="&quot;&quot;">
</argument> </argument>
<description> <description>
Adds a button with [Texture] [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 [code]get_buton_count()[/code] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code].
</description> </description>
</method> </method>
<method name="clear_custom_bg_color"> <method name="clear_custom_bg_color">
@ -31,6 +34,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Resets the background color for the given column to default.
</description> </description>
</method> </method>
<method name="clear_custom_color"> <method name="clear_custom_color">
@ -39,6 +43,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Resets the color for the given column to default.
</description> </description>
</method> </method>
<method name="deselect"> <method name="deselect">
@ -47,6 +52,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Deselects the given column.
</description> </description>
</method> </method>
<method name="erase_button"> <method name="erase_button">
@ -57,6 +63,7 @@
<argument index="1" name="button_idx" type="int"> <argument index="1" name="button_idx" type="int">
</argument> </argument>
<description> <description>
Removes the button at index [code]button_idx[/code] in column [code]column[/code].
</description> </description>
</method> </method>
<method name="get_button" qualifiers="const"> <method name="get_button" qualifiers="const">
@ -67,6 +74,7 @@
<argument index="1" name="button_idx" type="int"> <argument index="1" name="button_idx" type="int">
</argument> </argument>
<description> <description>
Returns the [Texture] of the button at index [code]button_idx[/code] in column [code]column[/code].
</description> </description>
</method> </method>
<method name="get_button_count" qualifiers="const"> <method name="get_button_count" qualifiers="const">
@ -75,6 +83,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
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.
</description> </description>
</method> </method>
<method name="get_cell_mode" qualifiers="const"> <method name="get_cell_mode" qualifiers="const">
@ -83,12 +92,14 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns the column's cell mode. See [code]CELL_MODE_*[/code] constants.
</description> </description>
</method> </method>
<method name="get_children"> <method name="get_children">
<return type="TreeItem"> <return type="TreeItem">
</return> </return>
<description> <description>
Returns the TreeItem's child items.
</description> </description>
</method> </method>
<method name="get_custom_bg_color" qualifiers="const"> <method name="get_custom_bg_color" qualifiers="const">
@ -97,12 +108,14 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns the custom background color of column [code]column[/code].
</description> </description>
</method> </method>
<method name="get_custom_minimum_height" qualifiers="const"> <method name="get_custom_minimum_height" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Returns the custom minimum height.
</description> </description>
</method> </method>
<method name="get_expand_right" qualifiers="const"> <method name="get_expand_right" qualifiers="const">
@ -111,6 +124,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if [code]expand_right[/code] is set.
</description> </description>
</method> </method>
<method name="get_icon" qualifiers="const"> <method name="get_icon" qualifiers="const">
@ -119,6 +133,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns the given column's icon [Texture]. Error if no icon is set.
</description> </description>
</method> </method>
<method name="get_icon_max_width" qualifiers="const"> <method name="get_icon_max_width" qualifiers="const">
@ -127,6 +142,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns the column's icon's maximum width.
</description> </description>
</method> </method>
<method name="get_icon_region" qualifiers="const"> <method name="get_icon_region" qualifiers="const">
@ -135,6 +151,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns the icon [Texture] region as [Rect2].
</description> </description>
</method> </method>
<method name="get_metadata" qualifiers="const"> <method name="get_metadata" qualifiers="const">
@ -149,30 +166,35 @@
<return type="TreeItem"> <return type="TreeItem">
</return> </return>
<description> <description>
Returns the next TreeItem in the tree.
</description> </description>
</method> </method>
<method name="get_next_visible"> <method name="get_next_visible">
<return type="TreeItem"> <return type="TreeItem">
</return> </return>
<description> <description>
Returns the next visible TreeItem in the tree.
</description> </description>
</method> </method>
<method name="get_parent"> <method name="get_parent">
<return type="TreeItem"> <return type="TreeItem">
</return> </return>
<description> <description>
Returns the parent TreeItem.
</description> </description>
</method> </method>
<method name="get_prev"> <method name="get_prev">
<return type="TreeItem"> <return type="TreeItem">
</return> </return>
<description> <description>
Returns the previous TreeItem in the tree.
</description> </description>
</method> </method>
<method name="get_prev_visible"> <method name="get_prev_visible">
<return type="TreeItem"> <return type="TreeItem">
</return> </return>
<description> <description>
Returns the previous visible TreeItem in the tree.
</description> </description>
</method> </method>
<method name="get_range" qualifiers="const"> <method name="get_range" qualifiers="const">
@ -197,6 +219,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns the given column's text.
</description> </description>
</method> </method>
<method name="get_text_align" qualifiers="const"> <method name="get_text_align" qualifiers="const">
@ -205,6 +228,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns the given column's text alignment.
</description> </description>
</method> </method>
<method name="get_tooltip" qualifiers="const"> <method name="get_tooltip" qualifiers="const">
@ -213,6 +237,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns the given column's tooltip.
</description> </description>
</method> </method>
<method name="is_button_disabled" qualifiers="const"> <method name="is_button_disabled" qualifiers="const">
@ -223,6 +248,7 @@
<argument index="1" name="button_idx" type="int"> <argument index="1" name="button_idx" type="int">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the button at index [code]button_idx[/code] for the given column is disabled.
</description> </description>
</method> </method>
<method name="is_checked" qualifiers="const"> <method name="is_checked" qualifiers="const">
@ -231,12 +257,14 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the given column is checked.
</description> </description>
</method> </method>
<method name="is_collapsed"> <method name="is_collapsed">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Returns [code]true[/code] if this TreeItem is collapsed.
</description> </description>
</method> </method>
<method name="is_custom_set_as_button" qualifiers="const"> <method name="is_custom_set_as_button" qualifiers="const">
@ -253,12 +281,14 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if column [code]column[/code] is editable.
</description> </description>
</method> </method>
<method name="is_folding_disabled" qualifiers="const"> <method name="is_folding_disabled" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Returns [code]true[/code] if folding is disabled for this TreeItem.
</description> </description>
</method> </method>
<method name="is_selectable" qualifiers="const"> <method name="is_selectable" qualifiers="const">
@ -267,6 +297,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if column [code]column[/code] is selectable.
</description> </description>
</method> </method>
<method name="is_selected"> <method name="is_selected">
@ -275,18 +306,21 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if column [code]column[/code] is selected.
</description> </description>
</method> </method>
<method name="move_to_bottom"> <method name="move_to_bottom">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Moves this TreeItem to the bottom in the [Tree] hierarchy.
</description> </description>
</method> </method>
<method name="move_to_top"> <method name="move_to_top">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Moves this TreeItem to the top in the [Tree] hierarchy.
</description> </description>
</method> </method>
<method name="remove_child"> <method name="remove_child">
@ -295,6 +329,7 @@
<argument index="0" name="child" type="Object"> <argument index="0" name="child" type="Object">
</argument> </argument>
<description> <description>
Removes the child TreeItem at index [code]index[/code].
</description> </description>
</method> </method>
<method name="select"> <method name="select">
@ -303,6 +338,7 @@
<argument index="0" name="column" type="int"> <argument index="0" name="column" type="int">
</argument> </argument>
<description> <description>
Selects the column [code]column[/code].
</description> </description>
</method> </method>
<method name="set_button"> <method name="set_button">
@ -315,6 +351,7 @@
<argument index="2" name="button" type="Texture"> <argument index="2" name="button" type="Texture">
</argument> </argument>
<description> <description>
Sets the given column's button [Texture] at index [code]button_idx[/code] to [code]button[/code].
</description> </description>
</method> </method>
<method name="set_cell_mode"> <method name="set_cell_mode">
@ -325,6 +362,7 @@
<argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode"> <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode">
</argument> </argument>
<description> <description>
Sets the given column's cell mode to [code]mode[/code]. See [code]CELL_MODE_*[/code] constants.
</description> </description>
</method> </method>
<method name="set_checked"> <method name="set_checked">
@ -335,6 +373,7 @@
<argument index="1" name="checked" type="bool"> <argument index="1" name="checked" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code] the column [code]column[/code] is checked.
</description> </description>
</method> </method>
<method name="set_collapsed"> <method name="set_collapsed">
@ -343,6 +382,7 @@
<argument index="0" name="enable" type="bool"> <argument index="0" name="enable" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code] the TreeItem is collapsed.
</description> </description>
</method> </method>
<method name="set_custom_as_button"> <method name="set_custom_as_button">
@ -365,6 +405,7 @@
<argument index="2" name="just_outline" type="bool" default="false"> <argument index="2" name="just_outline" type="bool" default="false">
</argument> </argument>
<description> <description>
Sets the given column's custom background color and whether to just use it as an outline.
</description> </description>
</method> </method>
<method name="set_custom_color"> <method name="set_custom_color">
@ -375,6 +416,7 @@
<argument index="1" name="color" type="Color"> <argument index="1" name="color" type="Color">
</argument> </argument>
<description> <description>
Sets the given column's custom color.
</description> </description>
</method> </method>
<method name="set_custom_draw"> <method name="set_custom_draw">
@ -387,6 +429,7 @@
<argument index="2" name="callback" type="String"> <argument index="2" name="callback" type="String">
</argument> </argument>
<description> <description>
Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code].
</description> </description>
</method> </method>
<method name="set_custom_minimum_height"> <method name="set_custom_minimum_height">
@ -395,6 +438,7 @@
<argument index="0" name="height" type="int"> <argument index="0" name="height" type="int">
</argument> </argument>
<description> <description>
Sets the custom minimum height of this TreeItem.
</description> </description>
</method> </method>
<method name="set_disable_folding"> <method name="set_disable_folding">
@ -403,6 +447,7 @@
<argument index="0" name="disable" type="bool"> <argument index="0" name="disable" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code] folding is disabled for this TreeItem.
</description> </description>
</method> </method>
<method name="set_editable"> <method name="set_editable">
@ -413,6 +458,7 @@
<argument index="1" name="enabled" type="bool"> <argument index="1" name="enabled" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code] column [code]column[/code] is editable.
</description> </description>
</method> </method>
<method name="set_expand_right"> <method name="set_expand_right">
@ -423,6 +469,7 @@
<argument index="1" name="enable" type="bool"> <argument index="1" name="enable" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code] column [code]column[/code] is expanded to the right.
</description> </description>
</method> </method>
<method name="set_icon"> <method name="set_icon">
@ -433,6 +480,7 @@
<argument index="1" name="texture" type="Texture"> <argument index="1" name="texture" type="Texture">
</argument> </argument>
<description> <description>
Sets the given column's icon [Texture].
</description> </description>
</method> </method>
<method name="set_icon_max_width"> <method name="set_icon_max_width">
@ -443,6 +491,7 @@
<argument index="1" name="width" type="int"> <argument index="1" name="width" type="int">
</argument> </argument>
<description> <description>
Sets the given column's icon's maximum width.
</description> </description>
</method> </method>
<method name="set_icon_region"> <method name="set_icon_region">
@ -453,6 +502,7 @@
<argument index="1" name="region" type="Rect2"> <argument index="1" name="region" type="Rect2">
</argument> </argument>
<description> <description>
Sets the given column's icon's texture region.
</description> </description>
</method> </method>
<method name="set_metadata"> <method name="set_metadata">
@ -499,6 +549,7 @@
<argument index="1" name="selectable" type="bool"> <argument index="1" name="selectable" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code] the given column is selectable.
</description> </description>
</method> </method>
<method name="set_text"> <method name="set_text">
@ -519,6 +570,7 @@
<argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign"> <argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign">
</argument> </argument>
<description> <description>
Sets the given column's text alignment. See [code]ALIGN_*[/code] constants.
</description> </description>
</method> </method>
<method name="set_tooltip"> <method name="set_tooltip">
@ -529,27 +581,36 @@
<argument index="1" name="tooltip" type="String"> <argument index="1" name="tooltip" type="String">
</argument> </argument>
<description> <description>
Sets the given column's tooltip text.
</description> </description>
</method> </method>
</methods> </methods>
<constants> <constants>
<constant name="CELL_MODE_STRING" value="0"> <constant name="CELL_MODE_STRING" value="0">
Cell contains a string.
</constant> </constant>
<constant name="CELL_MODE_CHECK" value="1"> <constant name="CELL_MODE_CHECK" value="1">
Cell can be checked.
</constant> </constant>
<constant name="CELL_MODE_RANGE" value="2"> <constant name="CELL_MODE_RANGE" value="2">
Cell contains a range.
</constant> </constant>
<constant name="CELL_MODE_RANGE_EXPRESSION" value="3"> <constant name="CELL_MODE_RANGE_EXPRESSION" value="3">
Cell contains a range expression.
</constant> </constant>
<constant name="CELL_MODE_ICON" value="4"> <constant name="CELL_MODE_ICON" value="4">
Cell contains an icon.
</constant> </constant>
<constant name="CELL_MODE_CUSTOM" value="5"> <constant name="CELL_MODE_CUSTOM" value="5">
</constant> </constant>
<constant name="ALIGN_LEFT" value="0"> <constant name="ALIGN_LEFT" value="0">
Align text to the left. See [code]set_text_align()[/code].
</constant> </constant>
<constant name="ALIGN_CENTER" value="1"> <constant name="ALIGN_CENTER" value="1">
Center text. See [code]set_text_align()[/code].
</constant> </constant>
<constant name="ALIGN_RIGHT" value="2"> <constant name="ALIGN_RIGHT" value="2">
Align text to the right. See [code]set_text_align()[/code].
</constant> </constant>
</constants> </constants>
</class> </class>