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.xml97
1 files changed, 83 insertions, 14 deletions
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 27b26801f3..b498b9bb90 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -96,6 +96,14 @@
Returns the column index at [code]position[/code], or -1 if no item is there.
</description>
</method>
+ <method name="get_column_expand_ratio" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_column_title" qualifiers="const">
<return type="String">
</return>
@@ -232,7 +240,7 @@
Returns the last pressed button's index.
</description>
</method>
- <method name="get_root">
+ <method name="get_root" qualifiers="const">
<return type="TreeItem">
</return>
<description>
@@ -264,12 +272,50 @@
To tell whether a column of an item is selected, use [method TreeItem.is_selected].
</description>
</method>
+ <method name="is_column_clipping_content" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_column_expanding" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="scroll_to_item">
<return type="void">
</return>
<argument index="0" name="item" type="Object">
</argument>
<description>
+ Causes the [Tree] to jump to the specified item.
+ </description>
+ </method>
+ <method name="set_column_clip_content">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_column_custom_minimum_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="min_width" type="int">
+ </argument>
+ <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].
</description>
</method>
<method name="set_column_expand">
@@ -283,15 +329,14 @@
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].
</description>
</method>
- <method name="set_column_min_width">
+ <method name="set_column_expand_ratio">
<return type="void">
</return>
<argument index="0" name="column" type="int">
</argument>
- <argument index="1" name="min_width" type="int">
+ <argument index="1" name="ratio" type="int">
</argument>
<description>
- Sets the minimum width of a column. 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_title">
@@ -361,7 +406,7 @@
The number of columns.
</member>
<member name="drop_mode_flags" type="int" setter="set_drop_mode_flags" getter="get_drop_mode_flags" default="0">
- The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended.
+ The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control._can_drop_data] is recommended.
This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
@@ -372,6 +417,12 @@
If [code]true[/code], the tree's root is hidden.
</member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
+ <member name="scroll_horizontal_enabled" type="bool" setter="set_h_scroll_enabled" getter="is_h_scroll_enabled" default="true">
+ If [code]true[/code], enables horizontal scrolling.
+ </member>
+ <member name="scroll_vertical_enabled" type="bool" setter="set_v_scroll_enabled" getter="is_v_scroll_enabled" default="true">
+ If [code]true[/code], enables vertical scrolling.
+ </member>
<member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0">
Allows single or multiple selection. See the [enum SelectMode] constants.
</member>
@@ -533,6 +584,12 @@
<theme_item name="checked" type="Texture2D">
The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked.
</theme_item>
+ <theme_item name="children_hl_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
+ The [Color] of the relationship lines between the selected [TreeItem] and its children.
+ </theme_item>
+ <theme_item name="children_hl_line_width" type="int" default="1">
+ The width of the relationship lines between the selected [TreeItem] and its children.
+ </theme_item>
<theme_item name="cursor" type="StyleBox">
[StyleBox] used for the cursor, when the [Tree] is being focused.
</theme_item>
@@ -542,7 +599,7 @@
<theme_item name="custom_button" type="StyleBox">
Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell.
</theme_item>
- <theme_item name="custom_button_font_highlight" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="custom_button_font_highlight" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
</theme_item>
<theme_item name="custom_button_hover" type="StyleBox">
@@ -557,25 +614,25 @@
<theme_item name="draw_relationship_lines" type="int" default="0">
Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy.
</theme_item>
- <theme_item name="drop_position_color" type="Color" default="Color( 1, 0.3, 0.2, 1 )">
+ <theme_item name="drop_position_color" type="Color" default="Color(1, 0.3, 0.2, 1)">
[Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations.
</theme_item>
<theme_item name="font" type="Font">
[Font] of the item's text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
Default text [Color] of the item.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the item.
</theme_item>
- <theme_item name="font_selected_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_selected_color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the item is selected.
</theme_item>
<theme_item name="font_size" type="int">
Font size of the item's text.
</theme_item>
- <theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )">
+ <theme_item name="guide_color" type="Color" default="Color(0, 0, 0, 0.1)">
[Color] of the guideline.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
@@ -587,8 +644,20 @@
<theme_item name="outline_size" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )">
- [Color] of the relationship lines.
+ <theme_item name="parent_hl_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
+ The [Color] of the relationship lines between the selected [TreeItem] and its parents.
+ </theme_item>
+ <theme_item name="parent_hl_line_margin" 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.
+ </theme_item>
+ <theme_item name="parent_hl_line_width" type="int" default="1">
+ The width of the relationship lines between the selected [TreeItem] and its parents.
+ </theme_item>
+ <theme_item name="relationship_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
+ The default [Color] of the relationship lines.
+ </theme_item>
+ <theme_item name="relationship_line_width" type="int" default="1">
+ The default width of the relationship lines.
</theme_item>
<theme_item name="scroll_border" type="int" default="4">
The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging.
@@ -605,7 +674,7 @@
<theme_item name="selected_focus" type="StyleBox">
[StyleBox] for the selected items, used when the [Tree] is being focused.
</theme_item>
- <theme_item name="title_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="title_button_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default text [Color] of the title button.
</theme_item>
<theme_item name="title_button_font" type="Font">