summaryrefslogtreecommitdiff
path: root/doc/classes/Tree.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Tree.xml')
-rw-r--r--doc/classes/Tree.xml40
1 files changed, 30 insertions, 10 deletions
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 539ca38190..cf28dafcc9 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -45,11 +45,17 @@
<method name="create_item">
<return type="TreeItem" />
<param index="0" name="parent" type="TreeItem" default="null" />
- <param index="1" name="idx" type="int" default="-1" />
+ <param index="1" name="index" type="int" default="-1" />
<description>
Creates an item in the tree and adds it as a child of [param parent], which can be either a valid [TreeItem] or [code]null[/code].
If [param parent] is [code]null[/code], the root item will be the parent, or the new item will be the root itself if the tree is empty.
- The new item will be the [param idx]th child of parent, or it will be the last child if there are not enough siblings.
+ The new item will be the [param index]-th child of parent, or it will be the last child if there are not enough siblings.
+ </description>
+ </method>
+ <method name="deselect_all">
+ <return type="void" />
+ <description>
+ Deselects all tree items (rows and columns). In [constant SELECT_MULTI] mode also removes selection cursor.
</description>
</method>
<method name="edit_selected">
@@ -70,7 +76,7 @@
<return type="int" />
<param index="0" name="position" type="Vector2" />
<description>
- Returns the button id at [param position], or -1 if no button is there.
+ Returns the button ID at [param position], or -1 if no button is there.
</description>
</method>
<method name="get_column_at_position" qualifiers="const">
@@ -84,6 +90,7 @@
<return type="int" />
<param index="0" name="column" type="int" />
<description>
+ Returns the expand ratio assigned to the column.
</description>
</method>
<method name="get_column_title" qualifiers="const">
@@ -223,12 +230,14 @@
<return type="bool" />
<param index="0" name="column" type="int" />
<description>
+ Returns [code]true[/code] if the column has enabled clipping (see [method set_column_clip_content]).
</description>
</method>
<method name="is_column_expanding" qualifiers="const">
<return type="bool" />
<param index="0" name="column" type="int" />
<description>
+ Returns [code]true[/code] if the column has enabled expanding (see [method set_column_expand]).
</description>
</method>
<method name="scroll_to_item">
@@ -244,6 +253,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="enable" type="bool" />
<description>
+ Allows to enable clipping for column's content, making the content size ignored.
</description>
</method>
<method name="set_column_custom_minimum_width">
@@ -251,7 +261,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="min_width" type="int" />
<description>
- Overrides the calculated minimum width of a column. It can be set to `0` to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].
+ Overrides the calculated minimum width of a column. It can be set to [code]0[/code] to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].
</description>
</method>
<method name="set_column_expand">
@@ -259,7 +269,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="expand" type="bool" />
<description>
- If [code]true[/code], the column will have the "Expand" flag of [Control]. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].
+ If [code]true[/code], the column will have the "Expand" flag of [Control]. Columns that have the "Expand" flag will use their expand ratio in a similar fashion to [member Control.size_flags_stretch_ratio] (see [method set_column_expand_ratio]).
</description>
</method>
<method name="set_column_expand_ratio">
@@ -267,6 +277,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="ratio" type="int" />
<description>
+ Sets the relative expand ratio for a column. See [method set_column_expand].
</description>
</method>
<method name="set_column_title">
@@ -293,6 +304,14 @@
Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</description>
</method>
+ <method name="set_selected">
+ <return type="void" />
+ <param index="0" name="item" type="TreeItem" />
+ <param index="1" name="column" type="int" />
+ <description>
+ Selects the specified [TreeItem] and column.
+ </description>
+ </method>
</methods>
<members>
<member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false">
@@ -382,7 +401,7 @@
</signal>
<signal name="item_activated">
<description>
- Emitted when an item's label is double-clicked.
+ Emitted when an item is double-clicked, or selected with a [code]ui_accept[/code] input event (e.g. using [kbd]Enter[/kbd] or [kbd]Space[/kbd] on the keyboard).
</description>
</signal>
<signal name="item_collapsed">
@@ -396,14 +415,14 @@
Emitted when a custom button is pressed (i.e. in a [constant TreeItem.CELL_MODE_CUSTOM] mode cell).
</description>
</signal>
- <signal name="item_double_clicked">
+ <signal name="item_edited">
<description>
- Emitted when an item's icon is double-clicked.
+ Emitted when an item is edited.
</description>
</signal>
- <signal name="item_edited">
+ <signal name="item_icon_double_clicked">
<description>
- Emitted when an item is edited.
+ Emitted when an item's icon is double-clicked. For a signal that emits when any part of the item is double-clicked, see [signal item_activated].
</description>
</signal>
<signal name="item_mouse_selected">
@@ -509,6 +528,7 @@
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
+ [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
</theme_item>
<theme_item name="parent_hl_line_margin" data_type="constant" type="int" default="0">
The space between the parent relationship lines for the selected [TreeItem] and the relationship lines to its siblings that are not selected.