mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
1819 lines
150 KiB
ReStructuredText
1819 lines
150 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_TreeItem:
|
||
|
||
TreeItem
|
||
========
|
||
|
||
**Наследует:** :ref:`Object<class_Object>`
|
||
|
||
Внутренний control для одного элемента внутри :ref:`Tree<class_Tree>`.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Описание
|
||
----------------
|
||
|
||
Один элемент элемента управления :ref:`Tree<class_Tree>`. Он может содержать другие **TreeItem** в качестве дочерних элементов, что позволяет ему создавать иерархию. Он также может содержать текст и кнопки. **TreeItem** не является :ref:`Node<class_Node>`, он является внутренним для :ref:`Tree<class_Tree>`.
|
||
|
||
Чтобы создать **TreeItem**, используйте :ref:`Tree.create_item()<class_Tree_method_create_item>` или :ref:`create_child()<class_TreeItem_method_create_child>`. Чтобы удалить **TreeItem**, используйте :ref:`Object.free()<class_Object_method_free>`.
|
||
|
||
\ **Примечание:** Значения идентификаторов, используемые для кнопок, являются 32-битными, в отличие от :ref:`int<class_int>`, который всегда является 64-битным. Они идут от ``-2147483648`` до ``2147483647``.
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Свойства
|
||
----------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------+-----------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`collapsed<class_TreeItem_property_collapsed>` |
|
||
+-------------------------+-----------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`custom_minimum_height<class_TreeItem_property_custom_minimum_height>` |
|
||
+-------------------------+-----------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`disable_folding<class_TreeItem_property_disable_folding>` |
|
||
+-------------------------+-----------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`visible<class_TreeItem_property_visible>` |
|
||
+-------------------------+-----------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методы
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_button<class_TreeItem_method_add_button>`\ (\ column\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`, id\: :ref:`int<class_int>` = -1, disabled\: :ref:`bool<class_bool>` = false, tooltip_text\: :ref:`String<class_String>` = "", description\: :ref:`String<class_String>` = ""\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_child<class_TreeItem_method_add_child>`\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`call_recursive<class_TreeItem_method_call_recursive>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_buttons<class_TreeItem_method_clear_buttons>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_custom_bg_color<class_TreeItem_method_clear_custom_bg_color>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_custom_color<class_TreeItem_method_clear_custom_color>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`create_child<class_TreeItem_method_create_child>`\ (\ index\: :ref:`int<class_int>` = -1\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`deselect<class_TreeItem_method_deselect>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`erase_button<class_TreeItem_method_erase_button>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` | :ref:`get_auto_translate_mode<class_TreeItem_method_get_auto_translate_mode>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` | :ref:`get_autowrap_mode<class_TreeItem_method_get_autowrap_mode>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_button<class_TreeItem_method_get_button>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_button_by_id<class_TreeItem_method_get_button_by_id>`\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_button_color<class_TreeItem_method_get_button_color>`\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_button_count<class_TreeItem_method_get_button_count>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_button_id<class_TreeItem_method_get_button_id>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_button_tooltip_text<class_TreeItem_method_get_button_tooltip_text>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` | :ref:`get_cell_mode<class_TreeItem_method_get_cell_mode>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_child<class_TreeItem_method_get_child>`\ (\ index\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_child_count<class_TreeItem_method_get_child_count>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`TreeItem<class_TreeItem>`\] | :ref:`get_children<class_TreeItem_method_get_children>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_custom_bg_color<class_TreeItem_method_get_custom_bg_color>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_custom_color<class_TreeItem_method_get_custom_color>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Callable<class_Callable>` | :ref:`get_custom_draw_callback<class_TreeItem_method_get_custom_draw_callback>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Font<class_Font>` | :ref:`get_custom_font<class_TreeItem_method_get_custom_font>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_custom_font_size<class_TreeItem_method_get_custom_font_size>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`get_custom_stylebox<class_TreeItem_method_get_custom_stylebox>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_description<class_TreeItem_method_get_description>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`get_expand_right<class_TreeItem_method_get_expand_right>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_first_child<class_TreeItem_method_get_first_child>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon<class_TreeItem_method_get_icon>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_icon_max_width<class_TreeItem_method_get_icon_max_width>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_icon_modulate<class_TreeItem_method_get_icon_modulate>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon_overlay<class_TreeItem_method_get_icon_overlay>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Rect2<class_Rect2>` | :ref:`get_icon_region<class_TreeItem_method_get_icon_region>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_index<class_TreeItem_method_get_index>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_language<class_TreeItem_method_get_language>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`get_metadata<class_TreeItem_method_get_metadata>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_next<class_TreeItem_method_get_next>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_in_tree<class_TreeItem_method_get_next_in_tree>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_visible<class_TreeItem_method_get_next_visible>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_parent<class_TreeItem_method_get_parent>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev<class_TreeItem_method_get_prev>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev_in_tree<class_TreeItem_method_get_prev_in_tree>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev_visible<class_TreeItem_method_get_prev_visible>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_range<class_TreeItem_method_get_range>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`get_range_config<class_TreeItem_method_get_range_config>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` | :ref:`get_structured_text_bidi_override<class_TreeItem_method_get_structured_text_bidi_override>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>` | :ref:`get_structured_text_bidi_override_options<class_TreeItem_method_get_structured_text_bidi_override_options>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_suffix<class_TreeItem_method_get_suffix>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_text<class_TreeItem_method_get_text>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`get_text_alignment<class_TreeItem_method_get_text_alignment>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_text_direction<class_TreeItem_method_get_text_direction>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` | :ref:`get_text_overrun_behavior<class_TreeItem_method_get_text_overrun_behavior>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_tooltip_text<class_TreeItem_method_get_tooltip_text>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Tree<class_Tree>` | :ref:`get_tree<class_TreeItem_method_get_tree>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_any_collapsed<class_TreeItem_method_is_any_collapsed>`\ (\ only_visible\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_button_disabled<class_TreeItem_method_is_button_disabled>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_checked<class_TreeItem_method_is_checked>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_custom_set_as_button<class_TreeItem_method_is_custom_set_as_button>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_edit_multiline<class_TreeItem_method_is_edit_multiline>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_editable<class_TreeItem_method_is_editable>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_indeterminate<class_TreeItem_method_is_indeterminate>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_selectable<class_TreeItem_method_is_selectable>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_selected<class_TreeItem_method_is_selected>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_visible_in_tree<class_TreeItem_method_is_visible_in_tree>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`move_after<class_TreeItem_method_move_after>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`move_before<class_TreeItem_method_move_before>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`propagate_check<class_TreeItem_method_propagate_check>`\ (\ column\: :ref:`int<class_int>`, emit_signal\: :ref:`bool<class_bool>` = true\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_child<class_TreeItem_method_remove_child>`\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`select<class_TreeItem_method_select>`\ (\ column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_auto_translate_mode<class_TreeItem_method_set_auto_translate_mode>`\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_autowrap_mode<class_TreeItem_method_set_autowrap_mode>`\ (\ column\: :ref:`int<class_int>`, autowrap_mode\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_button<class_TreeItem_method_set_button>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_button_color<class_TreeItem_method_set_button_color>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_button_description<class_TreeItem_method_set_button_description>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, description\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_button_disabled<class_TreeItem_method_set_button_disabled>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_button_tooltip_text<class_TreeItem_method_set_button_tooltip_text>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_cell_mode<class_TreeItem_method_set_cell_mode>`\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_checked<class_TreeItem_method_set_checked>`\ (\ column\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_collapsed_recursive<class_TreeItem_method_set_collapsed_recursive>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_as_button<class_TreeItem_method_set_custom_as_button>`\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_bg_color<class_TreeItem_method_set_custom_bg_color>`\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`, just_outline\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_color<class_TreeItem_method_set_custom_color>`\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_draw<class_TreeItem_method_set_custom_draw>`\ (\ column\: :ref:`int<class_int>`, object\: :ref:`Object<class_Object>`, callback\: :ref:`StringName<class_StringName>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_draw_callback<class_TreeItem_method_set_custom_draw_callback>`\ (\ column\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_font<class_TreeItem_method_set_custom_font>`\ (\ column\: :ref:`int<class_int>`, font\: :ref:`Font<class_Font>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_font_size<class_TreeItem_method_set_custom_font_size>`\ (\ column\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_custom_stylebox<class_TreeItem_method_set_custom_stylebox>`\ (\ column\: :ref:`int<class_int>`, stylebox\: :ref:`StyleBox<class_StyleBox>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_description<class_TreeItem_method_set_description>`\ (\ column\: :ref:`int<class_int>`, description\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_edit_multiline<class_TreeItem_method_set_edit_multiline>`\ (\ column\: :ref:`int<class_int>`, multiline\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_editable<class_TreeItem_method_set_editable>`\ (\ column\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_expand_right<class_TreeItem_method_set_expand_right>`\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_icon<class_TreeItem_method_set_icon>`\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_icon_max_width<class_TreeItem_method_set_icon_max_width>`\ (\ column\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_icon_modulate<class_TreeItem_method_set_icon_modulate>`\ (\ column\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_icon_overlay<class_TreeItem_method_set_icon_overlay>`\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_icon_region<class_TreeItem_method_set_icon_region>`\ (\ column\: :ref:`int<class_int>`, region\: :ref:`Rect2<class_Rect2>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_indeterminate<class_TreeItem_method_set_indeterminate>`\ (\ column\: :ref:`int<class_int>`, indeterminate\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_language<class_TreeItem_method_set_language>`\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_metadata<class_TreeItem_method_set_metadata>`\ (\ column\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_range<class_TreeItem_method_set_range>`\ (\ column\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_range_config<class_TreeItem_method_set_range_config>`\ (\ column\: :ref:`int<class_int>`, min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`, step\: :ref:`float<class_float>`, expr\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_selectable<class_TreeItem_method_set_selectable>`\ (\ column\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_structured_text_bidi_override<class_TreeItem_method_set_structured_text_bidi_override>`\ (\ column\: :ref:`int<class_int>`, parser\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_structured_text_bidi_override_options<class_TreeItem_method_set_structured_text_bidi_override_options>`\ (\ column\: :ref:`int<class_int>`, args\: :ref:`Array<class_Array>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_suffix<class_TreeItem_method_set_suffix>`\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_text<class_TreeItem_method_set_text>`\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_text_alignment<class_TreeItem_method_set_text_alignment>`\ (\ column\: :ref:`int<class_int>`, text_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_text_direction<class_TreeItem_method_set_text_direction>`\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_text_overrun_behavior<class_TreeItem_method_set_text_overrun_behavior>`\ (\ column\: :ref:`int<class_int>`, overrun_behavior\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_tooltip_text<class_TreeItem_method_set_tooltip_text>`\ (\ column\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`uncollapse_tree<class_TreeItem_method_uncollapse_tree>`\ (\ ) |
|
||
+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Перечисления
|
||
------------------------
|
||
|
||
.. _enum_TreeItem_TreeCellMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **TreeCellMode**: :ref:`🔗<enum_TreeItem_TreeCellMode>`
|
||
|
||
.. _class_TreeItem_constant_CELL_MODE_STRING:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_STRING** = ``0``
|
||
|
||
Ячейка показывает строковую метку, опционально со значком. Если текст редактируемый, его можно редактировать с помощью :ref:`LineEdit<class_LineEdit>` или всплывающего окна :ref:`TextEdit<class_TextEdit>`, если используется :ref:`set_edit_multiline()<class_TreeItem_method_set_edit_multiline>`.
|
||
|
||
.. _class_TreeItem_constant_CELL_MODE_CHECK:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_CHECK** = ``1``
|
||
|
||
Ячейка показывает флажок, опционально с текстом и значком. Флажок можно нажать, отпустить или сделать неопределенным (через :ref:`set_indeterminate()<class_TreeItem_method_set_indeterminate>`). Флажок нельзя нажать, если ячейка не является редактируемой.
|
||
|
||
.. _class_TreeItem_constant_CELL_MODE_RANGE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_RANGE** = ``2``
|
||
|
||
Ячейка показывает числовой диапазон. Если он доступен для редактирования, его можно редактировать с помощью ползунка диапазона. Используйте :ref:`set_range()<class_TreeItem_method_set_range>` для установки значения и :ref:`set_range_config()<class_TreeItem_method_set_range_config>` для настройки диапазона.
|
||
|
||
Эту ячейку также можно использовать в режиме раскрывающегося списка текста, когда вы назначаете текст с помощью :ref:`set_text()<class_TreeItem_method_set_text>`. Разделяйте параметры запятыми, например, ``"Option1,Option2,Option3"``.
|
||
|
||
.. _class_TreeItem_constant_CELL_MODE_ICON:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_ICON** = ``3``
|
||
|
||
Ячейка показывает значок. Его нельзя редактировать или отображать текст. Значок всегда находится в центре ячейки.
|
||
|
||
.. _class_TreeItem_constant_CELL_MODE_CUSTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_CUSTOM** = ``4``
|
||
|
||
Ячейка отображается как нажимаемая кнопка. Она будет отображать стрелку, похожую на :ref:`OptionButton<class_OptionButton>`, но не имеет раскрывающегося списка (для этого вы можете использовать :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>`). Нажатие кнопки испускает сигнал :ref:`Tree.item_edited<class_Tree_signal_item_edited>`. Кнопка по умолчанию плоская, вы можете использовать :ref:`set_custom_as_button()<class_TreeItem_method_set_custom_as_button>`, чтобы отобразить ее с :ref:`StyleBox<class_StyleBox>`.
|
||
|
||
Этот режим также поддерживает пользовательское рисование с помощью :ref:`set_custom_draw_callback()<class_TreeItem_method_set_custom_draw_callback>`.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описания свойств
|
||
--------------------------------
|
||
|
||
.. _class_TreeItem_property_collapsed:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **collapsed** :ref:`🔗<class_TreeItem_property_collapsed>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_collapsed**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_collapsed**\ (\ )
|
||
|
||
Если ``true``, TreeItem сворачивается.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_property_custom_minimum_height:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **custom_minimum_height** :ref:`🔗<class_TreeItem_property_custom_minimum_height>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_custom_minimum_height**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_custom_minimum_height**\ (\ )
|
||
|
||
Минимальная высота, заданная пользователем.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_property_disable_folding:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **disable_folding** :ref:`🔗<class_TreeItem_property_disable_folding>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_disable_folding**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_folding_disabled**\ (\ )
|
||
|
||
Если ``true``, сворачивание для этого TreeItem отключено.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_property_visible:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **visible** :ref:`🔗<class_TreeItem_property_visible>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_visible**\ (\ )
|
||
|
||
Если ``true``, **TreeItem** виден (по умолчанию).
|
||
|
||
Обратите внимание, что если **TreeItem** установлен как невидимый, ни один из его дочерних элементов также не будет виден.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описания метода
|
||
------------------------------
|
||
|
||
.. _class_TreeItem_method_add_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_button**\ (\ column\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`, id\: :ref:`int<class_int>` = -1, disabled\: :ref:`bool<class_bool>` = false, tooltip_text\: :ref:`String<class_String>` = "", description\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_TreeItem_method_add_button>`
|
||
|
||
Добавляет кнопку с :ref:`Texture2D<class_Texture2D>` ``button`` в конец ячейки в столбце ``column``. Параметр ``id`` используется для идентификации кнопки в соответствующем сигнале :ref:`Tree.button_clicked<class_Tree_signal_button_clicked>` и может отличаться от индекса кнопки. Если не указан, используется следующий доступный индекс, который можно получить, вызвав :ref:`get_button_count()<class_TreeItem_method_get_button_count>` непосредственно перед этим методом. При желании кнопка может быть ``disable`` и иметь ``tooltip_text``. ``description`` используется в качестве описания кнопки для вспомогательных приложений.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_add_child:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_child**\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_add_child>`
|
||
|
||
Добавляет ранее не имеющий родителя **TreeItem** как прямой потомок этого элемента. Элемент ``child`` не должен быть частью какого-либо :ref:`Tree<class_Tree>` или быть родителем какого-либо **TreeItem**. См. также :ref:`remove_child()<class_TreeItem_method_remove_child>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_call_recursive:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **call_recursive**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_TreeItem_method_call_recursive>`
|
||
|
||
Вызывает ``method`` для фактического TreeItem и его потомков рекурсивно. Передайте параметры в виде списка, разделенного запятыми.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_clear_buttons:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_buttons**\ (\ ) :ref:`🔗<class_TreeItem_method_clear_buttons>`
|
||
|
||
Удаляет все кнопки из всех столбцов этого элемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_clear_custom_bg_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_custom_bg_color**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_clear_custom_bg_color>`
|
||
|
||
Сбрасывает цвет фона для указанного столбца на значение по умолчанию.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_clear_custom_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_custom_color**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_clear_custom_color>`
|
||
|
||
Сбрасывает цвет указанного столбца на значение по умолчанию.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_create_child:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **create_child**\ (\ index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TreeItem_method_create_child>`
|
||
|
||
Создает элемент и добавляет его как дочерний элемент.
|
||
|
||
Новый элемент будет вставлен как позиция ``index`` (значение по умолчанию ``-1`` означает последнюю позицию), или он будет последним дочерним элементом, если ``index`` больше количества дочерних элементов.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_deselect:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **deselect**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_deselect>`
|
||
|
||
Отменяет выбор указанного столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_erase_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **erase_button**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_erase_button>`
|
||
|
||
Удаляет кнопку с индексом ``button_index`` в столбце ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_auto_translate_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **get_auto_translate_mode**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_auto_translate_mode>`
|
||
|
||
Возвращает режим автоматического перевода столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_autowrap_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_autowrap_mode>`
|
||
|
||
Возвращает режим автопереноса текста в указанном ``column``. По умолчанию это :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **get_button**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button>`
|
||
|
||
Возвращает :ref:`Texture2D<class_Texture2D>` кнопки с индексом ``button_index`` в столбце ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button_by_id:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_button_by_id**\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_by_id>`
|
||
|
||
Возвращает индекс кнопки, если в столбце ``column`` есть кнопка с идентификатором ``id``, в противном случае возвращает -1.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_button_color**\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_color>`
|
||
|
||
Возвращает цвет кнопки с идентификатором ``id`` в столбце ``column``. Если указанная кнопка не существует, возвращает :ref:`Color.BLACK<class_Color_constant_BLACK>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_button_count**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_count>`
|
||
|
||
Возвращает количество кнопок в столбце ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button_id:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_button_id**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_id>`
|
||
|
||
Возвращает идентификатор кнопки с индексом ``button_index`` в столбце ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_button_tooltip_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_button_tooltip_text**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_tooltip_text>`
|
||
|
||
Возвращает текст всплывающей подсказки для кнопки с индексом ``button_index`` в столбце ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_cell_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **get_cell_mode**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_cell_mode>`
|
||
|
||
Возвращает режим ячейки столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_child:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_child**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_get_child>`
|
||
|
||
Возвращает дочерний элемент по его ``index`` (см. :ref:`get_child_count()<class_TreeItem_method_get_child_count>`). Этот метод часто используется для итерации всех дочерних элементов элемента.
|
||
|
||
Отрицательные индексы обращаются к дочерним элементам от последнего.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_child_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_child_count**\ (\ ) :ref:`🔗<class_TreeItem_method_get_child_count>`
|
||
|
||
Возвращает количество дочерних элементов.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_children:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`TreeItem<class_TreeItem>`\] **get_children**\ (\ ) :ref:`🔗<class_TreeItem_method_get_children>`
|
||
|
||
Возвращает массив ссылок на дочерние элементы элемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_bg_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_custom_bg_color**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_bg_color>`
|
||
|
||
Возвращает пользовательский цвет фона столбца ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_custom_color**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_color>`
|
||
|
||
Возвращает пользовательский цвет столбца ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_draw_callback:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Callable<class_Callable>` **get_custom_draw_callback**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_draw_callback>`
|
||
|
||
Возвращает пользовательский обратный вызов столбца ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_font:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Font<class_Font>` **get_custom_font**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_font>`
|
||
|
||
Возвращает пользовательский шрифт, используемый для отрисовки текста в столбце ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_font_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_custom_font_size**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_font_size>`
|
||
|
||
Возвращает пользовательский размер шрифта, используемый для отрисовки текста в столбце ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_custom_stylebox:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **get_custom_stylebox**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_stylebox>`
|
||
|
||
Returns the given column's custom :ref:`StyleBox<class_StyleBox>` used to draw the background.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_description:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_description**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_description>`
|
||
|
||
Возвращает описание заданного столбца для вспомогательных приложений.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_expand_right:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **get_expand_right**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_expand_right>`
|
||
|
||
Возвращает ``true``, если задано ``expand_right``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_first_child:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_first_child**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_first_child>`
|
||
|
||
Возвращает первый дочерний элемент TreeItem.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **get_icon**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon>`
|
||
|
||
Возвращает значок указанного столбца :ref:`Texture2D<class_Texture2D>`. Ошибка, если значок не установлен.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_icon_max_width:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_icon_max_width**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon_max_width>`
|
||
|
||
Возвращает максимально допустимую ширину значка в указанном ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_icon_modulate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_icon_modulate**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon_modulate>`
|
||
|
||
Возвращает :ref:`Color<class_Color>`, модулирующий значок столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_icon_overlay:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **get_icon_overlay**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon_overlay>`
|
||
|
||
Возвращает наложение значка указанного столбца :ref:`Texture2D<class_Texture2D>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_icon_region:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Rect2<class_Rect2>` **get_icon_region**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon_region>`
|
||
|
||
Возвращает область значка :ref:`Texture2D<class_Texture2D>` как :ref:`Rect2<class_Rect2>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_index:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_index**\ (\ ) :ref:`🔗<class_TreeItem_method_get_index>`
|
||
|
||
Возвращает порядок узла в дереве. Например, если вызывается для первого дочернего элемента, позиция будет ``0``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_language:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_language**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_language>`
|
||
|
||
Возвращает код языка текста элемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_metadata:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **get_metadata**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_metadata>`
|
||
|
||
Возвращает значение метаданных, которое было установлено для указанного столбца с помощью :ref:`set_metadata()<class_TreeItem_method_set_metadata>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_next:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_next**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_next>`
|
||
|
||
Возвращает следующий родственный элемент TreeItem в дереве или объект ``null``, если такового нет.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_next_in_tree:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_next_in_tree**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_next_in_tree>`
|
||
|
||
Возвращает следующий TreeItem в дереве (в контексте поиска в глубину) или объект ``null``, если его нет.
|
||
|
||
Если включен ``wrap``, метод перейдет к первому элементу в дереве при вызове для последнего элемента, в противном случае он возвращает ``null``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_next_visible:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_next_visible**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_next_visible>`
|
||
|
||
Возвращает следующий видимый TreeItem в дереве (в контексте поиска в глубину) или объект ``null``, если его нет.
|
||
|
||
Если включен ``wrap``, метод перейдет к первому видимому элементу в дереве при вызове для последнего видимого элемента, в противном случае он возвращает ``null``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_parent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_parent**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_parent>`
|
||
|
||
Возвращает родительский TreeItem или объект ``null``, если таковой отсутствует.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_prev:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_prev**\ (\ ) :ref:`🔗<class_TreeItem_method_get_prev>`
|
||
|
||
Возвращает предыдущий родственный элемент TreeItem в дереве или объект ``null``, если такового нет.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_prev_in_tree:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_prev_in_tree**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_prev_in_tree>`
|
||
|
||
Возвращает предыдущий TreeItem в дереве (в контексте поиска в глубину) или объект ``null``, если его нет.
|
||
|
||
Если включен ``wrap``, метод будет переходить к последнему элементу в дереве при вызове для первого видимого элемента, в противном случае он возвращает ``null``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_prev_visible:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_prev_visible**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_prev_visible>`
|
||
|
||
Возвращает предыдущий видимый родственный элемент TreeItem в дереве (в контексте поиска в глубину) или объект ``null``, если его нет.
|
||
|
||
Если включен ``wrap``, метод будет переходить к последнему видимому элементу в дереве при вызове для первого видимого элемента, в противном случае он возвращает ``null``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_range**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_range>`
|
||
|
||
Возвращает значение столбца :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_range_config:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **get_range_config**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_get_range_config>`
|
||
|
||
Возвращает словарь, содержащий параметры диапазона для заданного столбца. Ключи: "min", "max", "step" и "expr".
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_structured_text_bidi_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_structured_text_bidi_override>`
|
||
|
||
Возвращает переопределение алгоритма BiDi, установленное для этой ячейки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_structured_text_bidi_override_options:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_structured_text_bidi_override_options>`
|
||
|
||
Возвращает дополнительные параметры BiDi, установленные для этой ячейки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_suffix:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_suffix**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_suffix>`
|
||
|
||
Получает строку суффикса, отображаемую после значения столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_text**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text>`
|
||
|
||
Возвращает текст указанного столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_text_alignment:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_text_alignment**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text_alignment>`
|
||
|
||
Возвращает выравнивание текста указанного столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_text_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text_direction>`
|
||
|
||
Возвращает базовое направление написания текста элемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_text_overrun_behavior:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text_overrun_behavior>`
|
||
|
||
Возвращает поведение обрезки, когда текст выходит за пределы ограничивающего прямоугольника элемента в указанном ``column``. По умолчанию это :ref:`TextServer.OVERRUN_TRIM_ELLIPSIS<class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_tooltip_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_tooltip_text**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_tooltip_text>`
|
||
|
||
Возвращает текст подсказки указанного столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_get_tree:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Tree<class_Tree>` **get_tree**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_tree>`
|
||
|
||
Возвращает :ref:`Tree<class_Tree>`, которому принадлежит данный TreeItem.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_any_collapsed:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_any_collapsed**\ (\ only_visible\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_is_any_collapsed>`
|
||
|
||
Возвращает ``true``, если этот **TreeItem** или любой из его потомков свернут.
|
||
|
||
Если ``only_visible`` равен ``true``, он игнорирует невидимые **TreeItem**.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_button_disabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_button_disabled**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_button_disabled>`
|
||
|
||
Возвращает ``true``, если кнопка с индексом ``button_index`` для указанного ``column`` отключена.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_checked:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_checked**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_checked>`
|
||
|
||
Возвращает ``true``, если указанный ``column`` установлен.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_custom_set_as_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_custom_set_as_button**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_custom_set_as_button>`
|
||
|
||
Возвращает ``true``, если ячейка была преобразована в кнопку с помощью :ref:`set_custom_as_button()<class_TreeItem_method_set_custom_as_button>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_edit_multiline:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_edit_multiline**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_edit_multiline>`
|
||
|
||
Возвращает ``true``, если указанный ``column`` является многострочным редактируемым.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_editable:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_editable**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_is_editable>`
|
||
|
||
Возвращает ``true``, если указанный ``column`` доступен для редактирования.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_indeterminate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_indeterminate**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_indeterminate>`
|
||
|
||
Возвращает\ ``true``, если указанный ``column`` неопределен.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_selectable:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_selectable**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_selectable>`
|
||
|
||
Возвращает ``true``, если указанный ``column`` доступен для выбора.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_selected:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_selected**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_is_selected>`
|
||
|
||
Возвращает ``true``, если выбран указанный ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_is_visible_in_tree:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_visible_in_tree**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_is_visible_in_tree>`
|
||
|
||
Возвращает ``true``, если :ref:`visible<class_TreeItem_property_visible>` равен ``true`` и все его предки также видны.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_move_after:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **move_after**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_move_after>`
|
||
|
||
Перемещает этот TreeItem сразу после указанного ``item``.
|
||
|
||
\ **Примечание:** Вы не можете перейти к корню или переместить корень.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_move_before:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **move_before**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_move_before>`
|
||
|
||
Перемещает этот TreeItem прямо перед указанным ``item``.
|
||
|
||
\ **Примечание:** Вы не можете перейти к корню или переместить корень.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_propagate_check:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **propagate_check**\ (\ column\: :ref:`int<class_int>`, emit_signal\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_TreeItem_method_propagate_check>`
|
||
|
||
Распространяет отмеченный статус этого элемента на его дочерние и родительские элементы для указанного ``column``. Можно обработать элементы, затронутые вызовом этого метода, подключившись к :ref:`Tree.check_propagated_to_item<class_Tree_signal_check_propagated_to_item>`. Порядок обработки затронутых элементов следующий: элемент, вызывающий этот метод, дочерние элементы этого элемента и, наконец, родительские элементы этого элемента. Если ``emit_signal`` равен ``false``, то :ref:`Tree.check_propagated_to_item<class_Tree_signal_check_propagated_to_item>` не будет передан.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_remove_child:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_child**\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_remove_child>`
|
||
|
||
Удаляет заданный дочерний элемент **TreeItem** и все его дочерние элементы из :ref:`Tree<class_Tree>`. Обратите внимание, что это не освобождает элемент из памяти, поэтому его можно использовать повторно позже (см. :ref:`add_child()<class_TreeItem_method_add_child>`). Чтобы полностью удалить **TreeItem**, используйте :ref:`Object.free()<class_Object_method_free>`.
|
||
|
||
\ **Примечание:** Если вы хотите переместить дочерний элемент из одного :ref:`Tree<class_Tree>` в другой, то вместо того, чтобы удалять и добавлять его вручную, вы можете использовать :ref:`move_before()<class_TreeItem_method_move_before>` или :ref:`move_after()<class_TreeItem_method_move_after>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_select:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **select**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_select>`
|
||
|
||
Выбирает указанный ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_auto_translate_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_auto_translate_mode**\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) :ref:`🔗<class_TreeItem_method_set_auto_translate_mode>`
|
||
|
||
Устанавливает режим автоматического перевода указанного столбца на ``mode``.
|
||
|
||
Все столбцы используют :ref:`Node.AUTO_TRANSLATE_MODE_INHERIT<class_Node_constant_AUTO_TRANSLATE_MODE_INHERIT>` по умолчанию, который использует тот же режим автоматического перевода, что и само :ref:`Tree<class_Tree>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_autowrap_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_autowrap_mode**\ (\ column\: :ref:`int<class_int>`, autowrap_mode\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) :ref:`🔗<class_TreeItem_method_set_autowrap_mode>`
|
||
|
||
Устанавливает режим автопереноса в указанном ``column``. Если установлено значение, отличное от :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`, текст переносится внутрь ограничивающего прямоугольника ячейки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_button**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TreeItem_method_set_button>`
|
||
|
||
Устанавливает кнопку указанного столбца :ref:`Texture2D<class_Texture2D>` с индексом ``button_index`` в значение ``button``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_button_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_button_color**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TreeItem_method_set_button_color>`
|
||
|
||
Устанавливает цвет кнопки указанного столбца с индексом ``button_index`` на ``color``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_button_description:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_button_description**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, description\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_button_description>`
|
||
|
||
Устанавливает описание кнопки заданного столбца по индексу ``button_index`` для вспомогательных приложений.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_button_disabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_button_disabled**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_button_disabled>`
|
||
|
||
Если ``true``, отключает кнопку с индексом ``button_index`` в указанном ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_button_tooltip_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_button_tooltip_text**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_button_tooltip_text>`
|
||
|
||
Устанавливает текст всплывающей подсказки для кнопки с индексом ``button_index`` в указанном ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_cell_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_cell_mode**\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>`\ ) :ref:`🔗<class_TreeItem_method_set_cell_mode>`
|
||
|
||
Устанавливает режим ячейки указанного столбца на ``mode``. Это определяет, как ячейка отображается и редактируется.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_checked:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_checked**\ (\ column\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_checked>`
|
||
|
||
Если ``checked`` равен ``true``, указанный ``column`` отмечается. Очищает неопределенный статус столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_collapsed_recursive:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_collapsed_recursive**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_collapsed_recursive>`
|
||
|
||
Сворачивает или разворачивает этот **TreeItem** и всех его потомков.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_as_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_as_button**\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_as_button>`
|
||
|
||
Отображает ячейку с :ref:`CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` как неплоскую кнопку с :ref:`StyleBox<class_StyleBox>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_bg_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_bg_color**\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`, just_outline\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_set_custom_bg_color>`
|
||
|
||
Sets the given column's custom background color and whether to just use it as an outline.
|
||
|
||
\ **Note:** If a custom :ref:`StyleBox<class_StyleBox>` is set, the background color will be drawn behind it.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_color**\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_color>`
|
||
|
||
Устанавливает пользовательский цвет указанного столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_draw:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_draw**\ (\ column\: :ref:`int<class_int>`, object\: :ref:`Object<class_Object>`, callback\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_draw>`
|
||
|
||
**Устарело:** Use :ref:`set_custom_draw_callback()<class_TreeItem_method_set_custom_draw_callback>` instead.
|
||
|
||
Устанавливает пользовательский обратный вызов отрисовки заданного столбца на метод ``callback`` на ``object``.
|
||
|
||
Метод с именем ``callback`` должен принимать два аргумента: отрисовываемый **TreeItem** и его положение и размер как :ref:`Rect2<class_Rect2>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_draw_callback:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_draw_callback**\ (\ column\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_draw_callback>`
|
||
|
||
Устанавливает пользовательский обратный вызов отрисовки заданного столбца. Используйте пустой :ref:`Callable<class_Callable>` (``Callable()``), чтобы очистить пользовательский обратный вызов. Ячейка должна находиться в :ref:`CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>`, чтобы использовать эту функцию.
|
||
|
||
\ ``callback`` должен принимать два аргумента: **TreeItem**, который отрисовывается, и его положение и размер как :ref:`Rect2<class_Rect2>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_font:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_font**\ (\ column\: :ref:`int<class_int>`, font\: :ref:`Font<class_Font>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_font>`
|
||
|
||
Устанавливает пользовательский шрифт, используемый для отрисовки текста в указанном ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_font_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_font_size**\ (\ column\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_font_size>`
|
||
|
||
Устанавливает пользовательский размер шрифта, используемый для отрисовки текста в указанном ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_custom_stylebox:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_custom_stylebox**\ (\ column\: :ref:`int<class_int>`, stylebox\: :ref:`StyleBox<class_StyleBox>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_stylebox>`
|
||
|
||
Sets the given column's custom :ref:`StyleBox<class_StyleBox>` used to draw the background.
|
||
|
||
\ **Note:** If a custom background color is set, the :ref:`StyleBox<class_StyleBox>` will be drawn in front of it.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_description:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_description**\ (\ column\: :ref:`int<class_int>`, description\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_description>`
|
||
|
||
Задает описание заданного столбца для вспомогательных приложений.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_edit_multiline:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_edit_multiline**\ (\ column\: :ref:`int<class_int>`, multiline\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_edit_multiline>`
|
||
|
||
Если ``multiline`` равно ``true``, заданный ``column`` является многострочным редактируемым.
|
||
|
||
\ **Примечание:** Этот параметр влияет только на тип элемента управления (:ref:`LineEdit<class_LineEdit>` или :ref:`TextEdit<class_TextEdit>`), который отображается при редактировании столбца. Вы можете задать многострочные значения с помощью :ref:`set_text()<class_TreeItem_method_set_text>`, даже если столбец не является многострочным редактируемым.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_editable:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_editable**\ (\ column\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_editable>`
|
||
|
||
Если ``enabled`` имеет значение ``true``, указанный ``column`` можно редактировать.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_expand_right:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_expand_right**\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_expand_right>`
|
||
|
||
Если ``enable`` имеет значение ``true``, указанный ``column`` расширяется вправо.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_icon**\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TreeItem_method_set_icon>`
|
||
|
||
Устанавливает значок заданной ячейки :ref:`Texture2D<class_Texture2D>`. Если ячейка находится в режиме :ref:`CELL_MODE_ICON<class_TreeItem_constant_CELL_MODE_ICON>`, значок отображается в центре ячейки. В противном случае значок отображается перед текстом ячейки. :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` не отображает значок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_icon_max_width:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_icon_max_width**\ (\ column\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_set_icon_max_width>`
|
||
|
||
Устанавливает максимально допустимую ширину значка в указанном ``column``. Это ограничение применяется поверх размера значка по умолчанию и поверх :ref:`Tree.icon_max_width<class_Tree_theme_constant_icon_max_width>`. Высота регулируется в соответствии с соотношением значка.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_icon_modulate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_icon_modulate**\ (\ column\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TreeItem_method_set_icon_modulate>`
|
||
|
||
Изменяет цвет значка указанного столбца с помощью ``modulate``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_icon_overlay:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_icon_overlay**\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TreeItem_method_set_icon_overlay>`
|
||
|
||
Устанавливает наложение значка заданной ячейки :ref:`Texture2D<class_Texture2D>`. Ячейка должна находиться в режиме :ref:`CELL_MODE_ICON<class_TreeItem_constant_CELL_MODE_ICON>`, а значок должен быть установлен. Наложение рисуется поверх значка, в нижнем левом углу.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_icon_region:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_icon_region**\ (\ column\: :ref:`int<class_int>`, region\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_TreeItem_method_set_icon_region>`
|
||
|
||
Задает область текстуры значка указанного столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_indeterminate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_indeterminate**\ (\ column\: :ref:`int<class_int>`, indeterminate\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_indeterminate>`
|
||
|
||
Если ``indeterminate`` равно ``true``, данный ``column`` помечается как неопределенный.
|
||
|
||
\ **Примечание:** Если установить ``true`` из ``false``, то столбец очищается от проверенного статуса.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_language:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_language**\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_language>`
|
||
|
||
Sets the language code of the given ``column``'s text to ``language``. This is used for line-breaking and text shaping algorithms. If ``language`` is empty, the current locale is used.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_metadata:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_metadata**\ (\ column\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_TreeItem_method_set_metadata>`
|
||
|
||
Устанавливает значение метаданных для указанного столбца, которое может быть получено позже с помощью :ref:`get_metadata()<class_TreeItem_method_get_metadata>`. Это может быть использовано, например, для хранения ссылки на исходные данные.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_range**\ (\ column\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TreeItem_method_set_range>`
|
||
|
||
Устанавливает значение столбца :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_range_config:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_range_config**\ (\ column\: :ref:`int<class_int>`, min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`, step\: :ref:`float<class_float>`, expr\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_set_range_config>`
|
||
|
||
Устанавливает диапазон допустимых значений для столбца. Столбец должен находиться в режиме :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>`.
|
||
|
||
Если ``expr`` равен ``true``, ползунок режима редактирования будет использовать экспоненциальную шкалу, как и в случае с :ref:`Range.exp_edit<class_Range_property_exp_edit>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_selectable:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_selectable**\ (\ column\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_selectable>`
|
||
|
||
Если ``selectable`` равно ``true``, то указанный ``column`` можно выбрать.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_structured_text_bidi_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_structured_text_bidi_override**\ (\ column\: :ref:`int<class_int>`, parser\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) :ref:`🔗<class_TreeItem_method_set_structured_text_bidi_override>`
|
||
|
||
Установить переопределение алгоритма BiDi для структурированного текста. Действует для ячеек, отображающих текст.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_structured_text_bidi_override_options:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_structured_text_bidi_override_options**\ (\ column\: :ref:`int<class_int>`, args\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_TreeItem_method_set_structured_text_bidi_override_options>`
|
||
|
||
Установить дополнительные параметры для переопределения BiDi. Действует для ячеек, отображающих текст.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_suffix:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_suffix**\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_suffix>`
|
||
|
||
Задает строку, которая будет отображаться после значения столбца (например, аббревиатуру единицы измерения).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_text**\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_text>`
|
||
|
||
Устанавливает текстовое значение указанного столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_text_alignment:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_text_alignment**\ (\ column\: :ref:`int<class_int>`, text_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) :ref:`🔗<class_TreeItem_method_set_text_alignment>`
|
||
|
||
Устанавливает выравнивание текста указанного столбца на ``text_alignment``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_text_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_text_direction**\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_TreeItem_method_set_text_direction>`
|
||
|
||
Устанавливает базовое направление написания текста элемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_text_overrun_behavior:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_text_overrun_behavior**\ (\ column\: :ref:`int<class_int>`, overrun_behavior\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ ) :ref:`🔗<class_TreeItem_method_set_text_overrun_behavior>`
|
||
|
||
Устанавливает поведение обрезки, когда текст выходит за пределы ограничивающего прямоугольника элемента в указанном ``column``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_set_tooltip_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_tooltip_text**\ (\ column\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_tooltip_text>`
|
||
|
||
Задает текст подсказки для указанного столбца.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TreeItem_method_uncollapse_tree:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **uncollapse_tree**\ (\ ) :ref:`🔗<class_TreeItem_method_uncollapse_tree>`
|
||
|
||
Разворачивает все **TreeItem**, необходимые для отображения этого **TreeItem**, т.е. все предки **TreeItem**.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Этот метод обычно должен быть переопределен пользователем, чтобы иметь какой-либо эффект.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Этот метод не имеет побочных эффектов. Он не изменяет ни одну из переменных-членов экземпляра.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Этот метод принимает любое количество аргументов после описанных здесь.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Этот метод используется для создания типа.)`
|
||
.. |static| replace:: :abbr:`static (Этот метод не нуждается в вызове экземпляра, поэтому его можно вызвать напрямую, используя имя класса.)`
|
||
.. |operator| replace:: :abbr:`operator (Этот метод описывает допустимый оператор для использования с этим типом в качестве левого операнда.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Это значение является целым числом, составленным как битовая маска следующих флагов.)`
|
||
.. |void| replace:: :abbr:`void (Нет возвращаемого значения.)`
|