Debian Codegraph @

doc/classes/Tree.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="Tree" inherits="Control" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A control used to show a set of internal [TreeItem]s in a hierarchical structure.
5 </brief_description>
6 <description>
7 A control used to show a set of internal [TreeItem]s in a hierarchical structure. The tree items can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like [LineEdit]s, buttons and popups. It can be useful for structured displays and interactions.
8 Trees are built via code, using [TreeItem] objects to create the structure. They have a single root, but multiple roots can be simulated with [member hide_root]:
9 [codeblocks]
10 [gdscript]
11 func _ready():
12 var tree = Tree.new()
13 var root = tree.create_item()
14 tree.hide_root = true
15 var child1 = tree.create_item(root)
16 var child2 = tree.create_item(root)
17 var subchild1 = tree.create_item(child1)
18 subchild1.set_text(0, "Subchild1")
19 [/gdscript]
20 [csharp]
21 public override void _Ready()
22 {
23 var tree = new Tree();
24 TreeItem root = tree.CreateItem();
25 tree.HideRoot = true;
26 TreeItem child1 = tree.CreateItem(root);
27 TreeItem child2 = tree.CreateItem(root);
28 TreeItem subchild1 = tree.CreateItem(child1);
29 subchild1.SetText(0, "Subchild1");
30 }
31 [/csharp]
32 [/codeblocks]
33 To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_first_child] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree].
34 [b]Incremental search:[/b] Like [ItemList] and [PopupMenu], [Tree] supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing [member ProjectSettings.gui/timers/incremental_search_max_interval_msec].
35 </description>
36 <tutorials>
37 </tutorials>
38 <methods>
39 <method name="clear">
40 <return type="void" />
41 <description>
42 Clears the tree. This removes all items.
43 </description>
44 </method>
45 <method name="create_item">
46 <return type="TreeItem" />
47 <param index="0" name="parent" type="TreeItem" default="null" />
48 <param index="1" name="index" type="int" default="-1" />
49 <description>
50 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].
51 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.
52 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.
53 </description>
54 </method>
55 <method name="deselect_all">
56 <return type="void" />
57 <description>
58 Deselects all tree items (rows and columns). In [constant SELECT_MULTI] mode also removes selection cursor.
59 </description>
60 </method>
61 <method name="edit_selected">
62 <return type="bool" />
63 <param index="0" name="force_edit" type="bool" default="false" />
64 <description>
65 Edits the selected tree item as if it was clicked.
66 Either the item must be set editable with [method TreeItem.set_editable] or [param force_edit] must be [code]true[/code].
67 Returns [code]true[/code] if the item could be edited. Fails if no item is selected.
68 </description>
69 </method>
70 <method name="ensure_cursor_is_visible">
71 <return type="void" />
72 <description>
73 Makes the currently focused cell visible.
74 This will scroll the tree if necessary. In [constant SELECT_ROW] mode, this will not do horizontal scrolling, as all the cells in the selected row is focused logically.
75 [b]Note:[/b] Despite the name of this method, the focus cursor itself is only visible in [constant SELECT_MULTI] mode.
76 </description>
77 </method>
78 <method name="get_button_id_at_position" qualifiers="const">
79 <return type="int" />
80 <param index="0" name="position" type="Vector2" />
81 <description>
82 Returns the button ID at [param position], or -1 if no button is there.
83 </description>
84 </method>
85 <method name="get_column_at_position" qualifiers="const">
86 <return type="int" />
87 <param index="0" name="position" type="Vector2" />
88 <description>
89 Returns the column index at [param position], or -1 if no item is there.
90 </description>
91 </method>
92 <method name="get_column_expand_ratio" qualifiers="const">
93 <return type="int" />
94 <param index="0" name="column" type="int" />
95 <description>
96 Returns the expand ratio assigned to the column.
97 </description>
98 </method>
99 <method name="get_column_title" qualifiers="const">
100 <return type="String" />
101 <param index="0" name="column" type="int" />
102 <description>
103 Returns the column's title.
104 </description>
105 </method>
106 <method name="get_column_title_alignment" qualifiers="const">
107 <return type="int" enum="HorizontalAlignment" />
108 <param index="0" name="column" type="int" />
109 <description>
110 Returns the column title alignment.
111 </description>
112 </method>
113 <method name="get_column_title_direction" qualifiers="const">
114 <return type="int" enum="Control.TextDirection" />
115 <param index="0" name="column" type="int" />
116 <description>
117 Returns column title base writing direction.
118 </description>
119 </method>
120 <method name="get_column_title_language" qualifiers="const">
121 <return type="String" />
122 <param index="0" name="column" type="int" />
123 <description>
124 Returns column title language code.
125 </description>
126 </method>
127 <method name="get_column_title_tooltip_text" qualifiers="const">
128 <return type="String" />
129 <param index="0" name="column" type="int" />
130 <description>
131 Returns the column title's tooltip text.
132 </description>
133 </method>
134 <method name="get_column_width" qualifiers="const">
135 <return type="int" />
136 <param index="0" name="column" type="int" />
137 <description>
138 Returns the column's width in pixels.
139 </description>
140 </method>
141 <method name="get_custom_popup_rect" qualifiers="const">
142 <return type="Rect2" />
143 <description>
144 Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode].
145 </description>
146 </method>
147 <method name="get_drop_section_at_position" qualifiers="const">
148 <return type="int" />
149 <param index="0" name="position" type="Vector2" />
150 <description>
151 Returns the drop section at [param position], or -100 if no item is there.
152 Values -1, 0, or 1 will be returned for the "above item", "on item", and "below item" drop sections, respectively. See [enum DropModeFlags] for a description of each drop section.
153 To get the item which the returned drop section is relative to, use [method get_item_at_position].
154 </description>
155 </method>
156 <method name="get_edited" qualifiers="const">
157 <return type="TreeItem" />
158 <description>
159 Returns the currently edited item. Can be used with [signal item_edited] to get the item that was modified.
160 [codeblocks]
161 [gdscript]
162 func _ready():
163 $Tree.item_edited.connect(on_Tree_item_edited)
164
165 func on_Tree_item_edited():
166 print($Tree.get_edited()) # This item just got edited (e.g. checked).
167 [/gdscript]
168 [csharp]
169 public override void _Ready()
170 {
171 GetNode&lt;Tree&gt;("Tree").ItemEdited += OnTreeItemEdited;
172 }
173
174 public void OnTreeItemEdited()
175 {
176 GD.Print(GetNode&lt;Tree&gt;("Tree").GetEdited()); // This item just got edited (e.g. checked).
177 }
178 [/csharp]
179 [/codeblocks]
180 </description>
181 </method>
182 <method name="get_edited_column" qualifiers="const">
183 <return type="int" />
184 <description>
185 Returns the column for the currently edited item.
186 </description>
187 </method>
188 <method name="get_item_area_rect" qualifiers="const">
189 <return type="Rect2" />
190 <param index="0" name="item" type="TreeItem" />
191 <param index="1" name="column" type="int" default="-1" />
192 <param index="2" name="button_index" type="int" default="-1" />
193 <description>
194 Returns the rectangle area for the specified [TreeItem]. If [param column] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. If a button index is specified, the rectangle of that button will be returned.
195 </description>
196 </method>
197 <method name="get_item_at_position" qualifiers="const">
198 <return type="TreeItem" />
199 <param index="0" name="position" type="Vector2" />
200 <description>
201 Returns the tree item at the specified position (relative to the tree origin position).
202 </description>
203 </method>
204 <method name="get_next_selected">
205 <return type="TreeItem" />
206 <param index="0" name="from" type="TreeItem" />
207 <description>
208 Returns the next selected [TreeItem] after the given one, or [code]null[/code] if the end is reached.
209 If [param from] is [code]null[/code], this returns the first selected item.
210 </description>
211 </method>
212 <method name="get_pressed_button" qualifiers="const">
213 <return type="int" />
214 <description>
215 Returns the last pressed button's index.
216 </description>
217 </method>
218 <method name="get_root" qualifiers="const">
219 <return type="TreeItem" />
220 <description>
221 Returns the tree's root item, or [code]null[/code] if the tree is empty.
222 </description>
223 </method>
224 <method name="get_scroll" qualifiers="const">
225 <return type="Vector2" />
226 <description>
227 Returns the current scrolling position.
228 </description>
229 </method>
230 <method name="get_selected" qualifiers="const">
231 <return type="TreeItem" />
232 <description>
233 Returns the currently focused item, or [code]null[/code] if no item is focused.
234 In [constant SELECT_ROW] and [constant SELECT_SINGLE] modes, the focused item is same as the selected item. In [constant SELECT_MULTI] mode, the focused item is the item under the focus cursor, not necessarily selected.
235 To get the currently selected item(s), use [method get_next_selected].
236 </description>
237 </method>
238 <method name="get_selected_column" qualifiers="const">
239 <return type="int" />
240 <description>
241 Returns the currently focused column, or -1 if no column is focused.
242 In [constant SELECT_SINGLE] mode, the focused column is the selected column. In [constant SELECT_ROW] mode, the focused column is always 0 if any item is selected. In [constant SELECT_MULTI] mode, the focused column is the column under the focus cursor, and there are not necessarily any column selected.
243 To tell whether a column of an item is selected, use [method TreeItem.is_selected].
244 </description>
245 </method>
246 <method name="is_column_clipping_content" qualifiers="const">
247 <return type="bool" />
248 <param index="0" name="column" type="int" />
249 <description>
250 Returns [code]true[/code] if the column has enabled clipping (see [method set_column_clip_content]).
251 </description>
252 </method>
253 <method name="is_column_expanding" qualifiers="const">
254 <return type="bool" />
255 <param index="0" name="column" type="int" />
256 <description>
257 Returns [code]true[/code] if the column has enabled expanding (see [method set_column_expand]).
258 </description>
259 </method>
260 <method name="scroll_to_item">
261 <return type="void" />
262 <param index="0" name="item" type="TreeItem" />
263 <param index="1" name="center_on_item" type="bool" default="false" />
264 <description>
265 Causes the [Tree] to jump to the specified [TreeItem].
266 </description>
267 </method>
268 <method name="set_column_clip_content">
269 <return type="void" />
270 <param index="0" name="column" type="int" />
271 <param index="1" name="enable" type="bool" />
272 <description>
273 Allows to enable clipping for column's content, making the content size ignored.
274 </description>
275 </method>
276 <method name="set_column_custom_minimum_width">
277 <return type="void" />
278 <param index="0" name="column" type="int" />
279 <param index="1" name="min_width" type="int" />
280 <description>
281 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].
282 </description>
283 </method>
284 <method name="set_column_expand">
285 <return type="void" />
286 <param index="0" name="column" type="int" />
287 <param index="1" name="expand" type="bool" />
288 <description>
289 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]).
290 </description>
291 </method>
292 <method name="set_column_expand_ratio">
293 <return type="void" />
294 <param index="0" name="column" type="int" />
295 <param index="1" name="ratio" type="int" />
296 <description>
297 Sets the relative expand ratio for a column. See [method set_column_expand].
298 </description>
299 </method>
300 <method name="set_column_title">
301 <return type="void" />
302 <param index="0" name="column" type="int" />
303 <param index="1" name="title" type="String" />
304 <description>
305 Sets the title of a column.
306 </description>
307 </method>
308 <method name="set_column_title_alignment">
309 <return type="void" />
310 <param index="0" name="column" type="int" />
311 <param index="1" name="title_alignment" type="int" enum="HorizontalAlignment" />
312 <description>
313 Sets the column title alignment. Note that [constant @GlobalScope.HORIZONTAL_ALIGNMENT_FILL] is not supported for column titles.
314 </description>
315 </method>
316 <method name="set_column_title_direction">
317 <return type="void" />
318 <param index="0" name="column" type="int" />
319 <param index="1" name="direction" type="int" enum="Control.TextDirection" />
320 <description>
321 Sets column title base writing direction.
322 </description>
323 </method>
324 <method name="set_column_title_language">
325 <return type="void" />
326 <param index="0" name="column" type="int" />
327 <param index="1" name="language" type="String" />
328 <description>
329 Sets the language code of the given [param column]'s title to [param language]. This is used for line-breaking and text shaping algorithms. If [param language] is empty, the current locale is used.
330 </description>
331 </method>
332 <method name="set_column_title_tooltip_text">
333 <return type="void" />
334 <param index="0" name="column" type="int" />
335 <param index="1" name="tooltip_text" type="String" />
336 <description>
337 Sets the column title's tooltip text.
338 </description>
339 </method>
340 <method name="set_selected">
341 <return type="void" />
342 <param index="0" name="item" type="TreeItem" />
343 <param index="1" name="column" type="int" />
344 <description>
345 Selects the specified [TreeItem] and column.
346 </description>
347 </method>
348 </methods>
349 <members>
350 <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false">
351 If [code]true[/code], the currently selected cell may be selected again.
352 </member>
353 <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select" default="false">
354 If [code]true[/code], a right mouse button click can select items.
355 </member>
356 <member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search" default="true">
357 If [code]true[/code], allows navigating the [Tree] with letter keys through incremental search.
358 </member>
359 <member name="auto_tooltip" type="bool" setter="set_auto_tooltip" getter="is_auto_tooltip_enabled" default="true">
360 If [code]true[/code], tree items with no tooltip assigned display their text as their tooltip. See also [method TreeItem.get_tooltip_text] and [method TreeItem.get_button_tooltip_text].
361 </member>
362 <member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
363 <member name="column_titles_visible" type="bool" setter="set_column_titles_visible" getter="are_column_titles_visible" default="false">
364 If [code]true[/code], column titles are visible.
365 </member>
366 <member name="columns" type="int" setter="set_columns" getter="get_columns" default="1">
367 The number of columns.
368 </member>
369 <member name="drop_mode_flags" type="int" setter="set_drop_mode_flags" getter="get_drop_mode_flags" default="0">
370 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.
371 This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position.
372 </member>
373 <member name="enable_drag_unfolding" type="bool" setter="set_enable_drag_unfolding" getter="is_drag_unfolding_enabled" default="true">
374 If [code]true[/code], tree items will unfold when hovered over during a drag-and-drop. The delay for when this happens is dictated by [theme_item dragging_unfold_wait_msec].
375 </member>
376 <member name="enable_recursive_folding" type="bool" setter="set_enable_recursive_folding" getter="is_recursive_folding_enabled" default="true">
377 If [code]true[/code], recursive folding is enabled for this [Tree]. Holding down [kbd]Shift[/kbd] while clicking the fold arrow or using [code]ui_right[/code]/[code]ui_left[/code] shortcuts collapses or uncollapses the [TreeItem] and all its descendants.
378 </member>
379 <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
380 <member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden" default="false">
381 If [code]true[/code], the folding arrow is hidden.
382 </member>
383 <member name="hide_root" type="bool" setter="set_hide_root" getter="is_root_hidden" default="false">
384 If [code]true[/code], the tree's root is hidden.
385 </member>
386 <member name="scroll_hint_mode" type="int" setter="set_scroll_hint_mode" getter="get_scroll_hint_mode" enum="Tree.ScrollHintMode" default="0">
387 The way which scroll hints (indicators that show that the content can still be scrolled in a certain direction) will be shown.
388 </member>
389 <member name="scroll_horizontal_enabled" type="bool" setter="set_h_scroll_enabled" getter="is_h_scroll_enabled" default="true">
390 If [code]true[/code], enables horizontal scrolling.
391 </member>
392 <member name="scroll_vertical_enabled" type="bool" setter="set_v_scroll_enabled" getter="is_v_scroll_enabled" default="true">
393 If [code]true[/code], enables vertical scrolling.
394 </member>
395 <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0">
396 Allows single or multiple selection. See the [enum SelectMode] constants.
397 </member>
398 <member name="tile_scroll_hint" type="bool" setter="set_tile_scroll_hint" getter="is_scroll_hint_tiled" default="false">
399 If [code]true[/code], the scroll hint texture will be tiled instead of stretched. See [member scroll_hint_mode].
400 </member>
401 </members>
402 <signals>
403 <signal name="button_clicked">
404 <param index="0" name="item" type="TreeItem" />
405 <param index="1" name="column" type="int" />
406 <param index="2" name="id" type="int" />
407 <param index="3" name="mouse_button_index" type="int" />
408 <description>
409 Emitted when a button on the tree was pressed (see [method TreeItem.add_button]).
410 </description>
411 </signal>
412 <signal name="cell_selected">
413 <description>
414 Emitted when a cell is selected.
415 </description>
416 </signal>
417 <signal name="check_propagated_to_item">
418 <param index="0" name="item" type="TreeItem" />
419 <param index="1" name="column" type="int" />
420 <description>
421 Emitted when [method TreeItem.propagate_check] is called. Connect to this signal to process the items that are affected when [method TreeItem.propagate_check] is invoked. The order that the items affected will be processed is as follows: the item that invoked the method, children of that item, and finally parents of that item.
422 </description>
423 </signal>
424 <signal name="column_title_clicked">
425 <param index="0" name="column" type="int" />
426 <param index="1" name="mouse_button_index" type="int" />
427 <description>
428 Emitted when a column's title is clicked with either [constant MOUSE_BUTTON_LEFT] or [constant MOUSE_BUTTON_RIGHT].
429 </description>
430 </signal>
431 <signal name="custom_item_clicked">
432 <param index="0" name="mouse_button_index" type="int" />
433 <description>
434 Emitted when an item with [constant TreeItem.CELL_MODE_CUSTOM] is clicked with a mouse button.
435 </description>
436 </signal>
437 <signal name="custom_popup_edited">
438 <param index="0" name="arrow_clicked" type="bool" />
439 <description>
440 Emitted when a cell with the [constant TreeItem.CELL_MODE_CUSTOM] is clicked to be edited.
441 </description>
442 </signal>
443 <signal name="empty_clicked">
444 <param index="0" name="click_position" type="Vector2" />
445 <param index="1" name="mouse_button_index" type="int" />
446 <description>
447 Emitted when a mouse button is clicked in the empty space of the tree.
448 </description>
449 </signal>
450 <signal name="item_activated">
451 <description>
452 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).
453 </description>
454 </signal>
455 <signal name="item_collapsed">
456 <param index="0" name="item" type="TreeItem" />
457 <description>
458 Emitted when an item is expanded or collapsed by clicking on the folding arrow or through code.
459 [b]Note:[/b] Despite its name, this signal is also emitted when an item is expanded.
460 </description>
461 </signal>
462 <signal name="item_edited">
463 <description>
464 Emitted when an item is edited.
465 </description>
466 </signal>
467 <signal name="item_icon_double_clicked">
468 <description>
469 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].
470 </description>
471 </signal>
472 <signal name="item_mouse_selected">
473 <param index="0" name="mouse_position" type="Vector2" />
474 <param index="1" name="mouse_button_index" type="int" />
475 <description>
476 Emitted when an item is selected with a mouse button.
477 </description>
478 </signal>
479 <signal name="item_selected">
480 <description>
481 Emitted when an item is selected.
482 </description>
483 </signal>
484 <signal name="multi_selected">
485 <param index="0" name="item" type="TreeItem" />
486 <param index="1" name="column" type="int" />
487 <param index="2" name="selected" type="bool" />
488 <description>
489 Emitted instead of [signal item_selected] if [member select_mode] is set to [constant SELECT_MULTI].
490 </description>
491 </signal>
492 <signal name="nothing_selected">
493 <description>
494 Emitted when a left mouse button click does not select any item.
495 </description>
496 </signal>
497 </signals>
498 <constants>
499 <constant name="SELECT_SINGLE" value="0" enum="SelectMode">
500 Allows selection of a single cell at a time. From the perspective of items, only a single item is allowed to be selected. And there is only one column selected in the selected item.
501 The focus cursor is always hidden in this mode, but it is positioned at the current selection, making the currently selected item the currently focused item.
502 </constant>
503 <constant name="SELECT_ROW" value="1" enum="SelectMode">
504 Allows selection of a single row at a time. From the perspective of items, only a single items is allowed to be selected. And all the columns are selected in the selected item.
505 The focus cursor is always hidden in this mode, but it is positioned at the first column of the current selection, making the currently selected item the currently focused item.
506 </constant>
507 <constant name="SELECT_MULTI" value="2" enum="SelectMode">
508 Allows selection of multiple cells at the same time. From the perspective of items, multiple items are allowed to be selected. And there can be multiple columns selected in each selected item.
509 The focus cursor is visible in this mode, the item or column under the cursor is not necessarily selected.
510 </constant>
511 <constant name="DROP_MODE_DISABLED" value="0" enum="DropModeFlags">
512 Disables all drop sections, but still allows to detect the "on item" drop section by [method get_drop_section_at_position].
513 [b]Note:[/b] This is the default flag, it has no effect when combined with other flags.
514 </constant>
515 <constant name="DROP_MODE_ON_ITEM" value="1" enum="DropModeFlags">
516 Enables the "on item" drop section. This drop section covers the entire item.
517 When combined with [constant DROP_MODE_INBETWEEN], this drop section halves the height and stays centered vertically.
518 </constant>
519 <constant name="DROP_MODE_INBETWEEN" value="2" enum="DropModeFlags">
520 Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item, and the "below item" drop section covers the bottom half.
521 When combined with [constant DROP_MODE_ON_ITEM], these drop sections halves the height and stays on top / bottom accordingly.
522 </constant>
523 <constant name="SCROLL_HINT_MODE_DISABLED" value="0" enum="ScrollHintMode">
524 Scroll hints will never be shown.
525 </constant>
526 <constant name="SCROLL_HINT_MODE_BOTH" value="1" enum="ScrollHintMode">
527 Scroll hints will be shown at the top and bottom.
528 </constant>
529 <constant name="SCROLL_HINT_MODE_TOP" value="2" enum="ScrollHintMode">
530 Only the top scroll hint will be shown.
531 </constant>
532 <constant name="SCROLL_HINT_MODE_BOTTOM" value="3" enum="ScrollHintMode">
533 Only the bottom scroll hint will be shown.
534 </constant>
535 </constants>
536 <theme_items>
537 <theme_item name="children_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
538 The [Color] of the relationship lines between the selected [TreeItem] and its children.
539 </theme_item>
540 <theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
541 Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
542 </theme_item>
543 <theme_item name="drop_position_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
544 [Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations.
545 </theme_item>
546 <theme_item name="font_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)">
547 Default text [Color] of the item.
548 </theme_item>
549 <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
550 Text [Color] for a [constant TreeItem.CELL_MODE_CHECK] mode cell when it's non-editable (see [method TreeItem.set_editable]).
551 </theme_item>
552 <theme_item name="font_hovered_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
553 Text [Color] used when the item is hovered and not selected yet.
554 </theme_item>
555 <theme_item name="font_hovered_dimmed_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
556 Text [Color] used when the item is hovered, while a button of the same item is hovered as the same time.
557 </theme_item>
558 <theme_item name="font_hovered_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
559 Text [Color] used when the item is hovered and selected.
560 </theme_item>
561 <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
562 The tint of text outline of the item.
563 </theme_item>
564 <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
565 Text [Color] used when the item is selected.
566 </theme_item>
567 <theme_item name="guide_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.25)">
568 [Color] of the guideline.
569 </theme_item>
570 <theme_item name="parent_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
571 The [Color] of the relationship lines between the selected [TreeItem] and its parents.
572 </theme_item>
573 <theme_item name="relationship_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
574 The default [Color] of the relationship lines.
575 </theme_item>
576 <theme_item name="scroll_hint_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
577 [Color] used to modulate the [theme_item scroll_hint] texture.
578 </theme_item>
579 <theme_item name="title_button_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
580 Default text [Color] of the title button.
581 </theme_item>
582 <theme_item name="button_margin" data_type="constant" type="int" default="4">
583 The horizontal space between each button in a cell.
584 </theme_item>
585 <theme_item name="check_h_separation" data_type="constant" type="int" default="4">
586 The horizontal space between the checkbox and the text in a [constant TreeItem.CELL_MODE_CHECK] mode cell.
587 </theme_item>
588 <theme_item name="children_hl_line_width" data_type="constant" type="int" default="1">
589 The width of the relationship lines between the selected [TreeItem] and its children.
590 </theme_item>
591 <theme_item name="dragging_unfold_wait_msec" data_type="constant" type="int" default="500">
592 During a drag-and-drop, this is how many milliseconds to wait over a section before the section unfolds.
593 </theme_item>
594 <theme_item name="draw_guides" data_type="constant" type="int" default="1">
595 Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item.
596 </theme_item>
597 <theme_item name="draw_relationship_lines" data_type="constant" type="int" default="0">
598 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.
599 </theme_item>
600 <theme_item name="h_separation" data_type="constant" type="int" default="4">
601 The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled.
602 </theme_item>
603 <theme_item name="icon_h_separation" data_type="constant" type="int" default="4">
604 The horizontal space between the icon and the text in item's cells.
605 </theme_item>
606 <theme_item name="icon_max_width" data_type="constant" type="int" default="0">
607 The maximum allowed width of the icon in item's cells. This limit is applied on top of the default size of the icon, but before the value set with [method TreeItem.set_icon_max_width]. The height is adjusted according to the icon's ratio.
608 </theme_item>
609 <theme_item name="inner_item_margin_bottom" data_type="constant" type="int" default="0">
610 The inner bottom margin of a cell.
611 </theme_item>
612 <theme_item name="inner_item_margin_left" data_type="constant" type="int" default="0">
613 The inner left margin of a cell.
614 </theme_item>
615 <theme_item name="inner_item_margin_right" data_type="constant" type="int" default="0">
616 The inner right margin of a cell.
617 </theme_item>
618 <theme_item name="inner_item_margin_top" data_type="constant" type="int" default="0">
619 The inner top margin of a cell.
620 </theme_item>
621 <theme_item name="item_margin" data_type="constant" type="int" default="16">
622 The horizontal margin at the start of an item. This is used when folding is enabled for the item.
623 </theme_item>
624 <theme_item name="outline_size" data_type="constant" type="int" default="0">
625 The size of the text outline.
626 [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.
627 </theme_item>
628 <theme_item name="parent_hl_line_margin" data_type="constant" type="int" default="0">
629 The space between the parent relationship lines for the selected [TreeItem] and the relationship lines to its siblings that are not selected.
630 </theme_item>
631 <theme_item name="parent_hl_line_width" data_type="constant" type="int" default="1">
632 The width of the relationship lines between the selected [TreeItem] and its parents.
633 </theme_item>
634 <theme_item name="relationship_line_width" data_type="constant" type="int" default="1">
635 The default width of the relationship lines.
636 </theme_item>
637 <theme_item name="scroll_border" data_type="constant" type="int" default="4">
638 The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging.
639 </theme_item>
640 <theme_item name="scroll_speed" data_type="constant" type="int" default="12">
641 The speed of border scrolling.
642 </theme_item>
643 <theme_item name="scrollbar_h_separation" data_type="constant" type="int" default="4">
644 The horizontal separation of tree content and scrollbar.
645 </theme_item>
646 <theme_item name="scrollbar_margin_bottom" data_type="constant" type="int" default="-1">
647 The bottom margin of the scrollbars. When negative, uses [theme_item panel] bottom margin.
648 </theme_item>
649 <theme_item name="scrollbar_margin_left" data_type="constant" type="int" default="-1">
650 The left margin of the horizontal scrollbar. When negative, uses [theme_item panel] left margin.
651 </theme_item>
652 <theme_item name="scrollbar_margin_right" data_type="constant" type="int" default="-1">
653 The right margin of the scrollbars. When negative, uses [theme_item panel] right margin.
654 </theme_item>
655 <theme_item name="scrollbar_margin_top" data_type="constant" type="int" default="-1">
656 The top margin of the vertical scrollbar. When negative, uses [theme_item panel] top margin.
657 </theme_item>
658 <theme_item name="scrollbar_v_separation" data_type="constant" type="int" default="4">
659 The vertical separation of tree content and scrollbar.
660 </theme_item>
661 <theme_item name="v_separation" data_type="constant" type="int" default="4">
662 The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border.
663 </theme_item>
664 <theme_item name="font" data_type="font" type="Font">
665 [Font] of the item's text.
666 </theme_item>
667 <theme_item name="title_button_font" data_type="font" type="Font">
668 [Font] of the title button's text.
669 </theme_item>
670 <theme_item name="font_size" data_type="font_size" type="int">
671 Font size of the item's text.
672 </theme_item>
673 <theme_item name="title_button_font_size" data_type="font_size" type="int">
674 Font size of the title button's text.
675 </theme_item>
676 <theme_item name="arrow" data_type="icon" type="Texture2D">
677 The arrow icon used when a foldable item is not collapsed.
678 </theme_item>
679 <theme_item name="arrow_collapsed" data_type="icon" type="Texture2D">
680 The arrow icon used when a foldable item is collapsed (for left-to-right layouts).
681 </theme_item>
682 <theme_item name="arrow_collapsed_mirrored" data_type="icon" type="Texture2D">
683 The arrow icon used when a foldable item is collapsed (for right-to-left layouts).
684 </theme_item>
685 <theme_item name="checked" data_type="icon" type="Texture2D">
686 The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked and editable (see [method TreeItem.set_editable]).
687 </theme_item>
688 <theme_item name="checked_disabled" data_type="icon" type="Texture2D">
689 The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked and non-editable (see [method TreeItem.set_editable]).
690 </theme_item>
691 <theme_item name="indeterminate" data_type="icon" type="Texture2D">
692 The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate and editable (see [method TreeItem.set_editable]).
693 </theme_item>
694 <theme_item name="indeterminate_disabled" data_type="icon" type="Texture2D">
695 The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate and non-editable (see [method TreeItem.set_editable]).
696 </theme_item>
697 <theme_item name="scroll_hint" data_type="icon" type="Texture2D">
698 The indicator that will be shown when the content can still be scrolled. See [member scroll_hint_mode].
699 </theme_item>
700 <theme_item name="select_arrow" data_type="icon" type="Texture2D">
701 The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
702 </theme_item>
703 <theme_item name="unchecked" data_type="icon" type="Texture2D">
704 The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked and editable (see [method TreeItem.set_editable]).
705 </theme_item>
706 <theme_item name="unchecked_disabled" data_type="icon" type="Texture2D">
707 The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked and non-editable (see [method TreeItem.set_editable]).
708 </theme_item>
709 <theme_item name="updown" data_type="icon" type="Texture2D">
710 The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
711 </theme_item>
712 <theme_item name="button_hover" data_type="style" type="StyleBox">
713 [StyleBox] used when a button in the tree is hovered.
714 </theme_item>
715 <theme_item name="button_pressed" data_type="style" type="StyleBox">
716 [StyleBox] used when a button in the tree is pressed.
717 </theme_item>
718 <theme_item name="cursor" data_type="style" type="StyleBox">
719 [StyleBox] used for the cursor, when the [Tree] is being focused.
720 </theme_item>
721 <theme_item name="cursor_unfocused" data_type="style" type="StyleBox">
722 [StyleBox] used for the cursor, when the [Tree] is not being focused.
723 </theme_item>
724 <theme_item name="custom_button" data_type="style" type="StyleBox">
725 Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when button is enabled with [method TreeItem.set_custom_as_button].
726 </theme_item>
727 <theme_item name="custom_button_hover" data_type="style" type="StyleBox">
728 [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode button cell when it's hovered.
729 </theme_item>
730 <theme_item name="custom_button_pressed" data_type="style" type="StyleBox">
731 [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode button cell when it's pressed.
732 </theme_item>
733 <theme_item name="focus" data_type="style" type="StyleBox">
734 The focused style for the [Tree], drawn on top of everything.
735 </theme_item>
736 <theme_item name="hovered" data_type="style" type="StyleBox">
737 [StyleBox] for the item being hovered, but not selected.
738 </theme_item>
739 <theme_item name="hovered_dimmed" data_type="style" type="StyleBox">
740 [StyleBox] for the item being hovered, while a button of the same item is hovered as the same time.
741 </theme_item>
742 <theme_item name="hovered_selected" data_type="style" type="StyleBox">
743 [StyleBox] for the hovered and selected items, used when the [Tree] is not being focused.
744 </theme_item>
745 <theme_item name="hovered_selected_focus" data_type="style" type="StyleBox">
746 [StyleBox] for the hovered and selected items, used when the [Tree] is being focused.
747 </theme_item>
748 <theme_item name="panel" data_type="style" type="StyleBox">
749 The background style for the [Tree].
750 </theme_item>
751 <theme_item name="selected" data_type="style" type="StyleBox">
752 [StyleBox] for the selected items, used when the [Tree] is not being focused.
753 </theme_item>
754 <theme_item name="selected_focus" data_type="style" type="StyleBox">
755 [StyleBox] for the selected items, used when the [Tree] is being focused.
756 </theme_item>
757 <theme_item name="title_button_hover" data_type="style" type="StyleBox">
758 [StyleBox] used when the title button is being hovered.
759 </theme_item>
760 <theme_item name="title_button_normal" data_type="style" type="StyleBox">
761 Default [StyleBox] for the title button.
762 </theme_item>
763 <theme_item name="title_button_pressed" data_type="style" type="StyleBox">
764 [StyleBox] used when the title button is being pressed.
765 </theme_item>
766 </theme_items>
767 </class>