mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
2353 lines
117 KiB
ReStructuredText
2353 lines
117 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_Tree:
|
||
|
||
Tree
|
||
====
|
||
|
||
**繼承:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
用於以層級結構顯示一組內部 :ref:`TreeItem<class_TreeItem>` 的控制項。
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
說明
|
||
----
|
||
|
||
用於以層級結構顯示一組內部 :ref:`TreeItem<class_TreeItem>` 的控制項。樹專案可以選擇、展開、折疊。該樹可以有多列的自訂控制項,如 :ref:`LineEdit<class_LineEdit>`\ 、按鈕和快顯視窗。對於結構化顯示和互動很有用。
|
||
|
||
樹通過程式碼建立,使用 :ref:`TreeItem<class_TreeItem>` 物件來建構結構。根專案只有一個,但可以使用 :ref:`hide_root<class_Tree_property_hide_root>` 來模擬多個根專案。
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
func _ready():
|
||
var tree = Tree.new()
|
||
var root = tree.create_item()
|
||
tree.hide_root = true
|
||
var child1 = tree.create_item(root)
|
||
var child2 = tree.create_item(root)
|
||
var subchild1 = tree.create_item(child1)
|
||
subchild1.set_text(0, "Subchild1")
|
||
|
||
.. code-tab:: csharp
|
||
|
||
public override void _Ready()
|
||
{
|
||
var tree = new Tree();
|
||
TreeItem root = tree.CreateItem();
|
||
tree.HideRoot = true;
|
||
TreeItem child1 = tree.CreateItem(root);
|
||
TreeItem child2 = tree.CreateItem(root);
|
||
TreeItem subchild1 = tree.CreateItem(child1);
|
||
subchild1.SetText(0, "Subchild1");
|
||
}
|
||
|
||
|
||
|
||
要走訪 **Tree** 物件中的所有 :ref:`TreeItem<class_TreeItem>` 物件,請在通過 :ref:`get_root()<class_Tree_method_get_root>` 獲得根專案之後,使用 :ref:`TreeItem.get_next()<class_TreeItem_method_get_next>` 和 :ref:`TreeItem.get_children()<class_TreeItem_method_get_children>` 方法。你可以對 :ref:`TreeItem<class_TreeItem>` 使用 :ref:`Object.free()<class_Object_method_free>` 來把它從 **Tree** 中移除。
|
||
|
||
\ **差異量搜索:**\ 與 :ref:`ItemList<class_ItemList>` 和 :ref:`PopupMenu<class_PopupMenu>` 類似,\ **Tree** 也支援在聚焦控制項時在列表中進行搜索。按下與某個條目名稱首字母一致的按鍵,就會選中以該字母開頭的第一個條目。在此之後,進行差異量搜索的辦法有兩種:1)在超時前再次按下同一個按鍵,選中以該字母開頭的下一個條目。2)在超時前按下剩餘字母對應的按鍵,直接配對並選中所需的條目。這兩個動作都會在最後一次按鍵超時後重設回列表頂端。你可以通過 :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec<class_ProjectSettings_property_gui/timers/incremental_search_max_interval_msec>` 修改超時時長。
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
屬性
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`allow_reselect<class_Tree_property_allow_reselect>` | ``false`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`allow_rmb_select<class_Tree_property_allow_rmb_select>` | ``false`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`allow_search<class_Tree_property_allow_search>` | ``true`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`auto_tooltip<class_Tree_property_auto_tooltip>` | ``true`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | clip_contents | ``true`` (overrides :ref:`Control<class_Control_property_clip_contents>`) |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`column_titles_visible<class_Tree_property_column_titles_visible>` | ``false`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`columns<class_Tree_property_columns>` | ``1`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`drop_mode_flags<class_Tree_property_drop_mode_flags>` | ``0`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`enable_drag_unfolding<class_Tree_property_enable_drag_unfolding>` | ``true`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`enable_recursive_folding<class_Tree_property_enable_recursive_folding>` | ``true`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`hide_folding<class_Tree_property_hide_folding>` | ``false`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`hide_root<class_Tree_property_hide_root>` | ``false`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`ScrollHintMode<enum_Tree_ScrollHintMode>` | :ref:`scroll_hint_mode<class_Tree_property_scroll_hint_mode>` | ``0`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`scroll_horizontal_enabled<class_Tree_property_scroll_horizontal_enabled>` | ``true`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`scroll_vertical_enabled<class_Tree_property_scroll_vertical_enabled>` | ``true`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`SelectMode<enum_Tree_SelectMode>` | :ref:`select_mode<class_Tree_property_select_mode>` | ``0`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`tile_scroll_hint<class_Tree_property_tile_scroll_hint>` | ``false`` |
|
||
+-------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
方法
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear<class_Tree_method_clear>`\ (\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`create_item<class_Tree_method_create_item>`\ (\ parent\: :ref:`TreeItem<class_TreeItem>` = null, index\: :ref:`int<class_int>` = -1\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`deselect_all<class_Tree_method_deselect_all>`\ (\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`edit_selected<class_Tree_method_edit_selected>`\ (\ force_edit\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`ensure_cursor_is_visible<class_Tree_method_ensure_cursor_is_visible>`\ (\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_button_id_at_position<class_Tree_method_get_button_id_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_column_at_position<class_Tree_method_get_column_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_column_expand_ratio<class_Tree_method_get_column_expand_ratio>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_column_title<class_Tree_method_get_column_title>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`get_column_title_alignment<class_Tree_method_get_column_title_alignment>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_column_title_direction<class_Tree_method_get_column_title_direction>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_column_title_language<class_Tree_method_get_column_title_language>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_column_title_tooltip_text<class_Tree_method_get_column_title_tooltip_text>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_column_width<class_Tree_method_get_column_width>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Rect2<class_Rect2>` | :ref:`get_custom_popup_rect<class_Tree_method_get_custom_popup_rect>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_drop_section_at_position<class_Tree_method_get_drop_section_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_edited<class_Tree_method_get_edited>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_edited_column<class_Tree_method_get_edited_column>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Rect2<class_Rect2>` | :ref:`get_item_area_rect<class_Tree_method_get_item_area_rect>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>` = -1, button_index\: :ref:`int<class_int>` = -1\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_item_at_position<class_Tree_method_get_item_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_selected<class_Tree_method_get_next_selected>`\ (\ from\: :ref:`TreeItem<class_TreeItem>`\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_pressed_button<class_Tree_method_get_pressed_button>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_root<class_Tree_method_get_root>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`get_scroll<class_Tree_method_get_scroll>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TreeItem<class_TreeItem>` | :ref:`get_selected<class_Tree_method_get_selected>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_selected_column<class_Tree_method_get_selected_column>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_column_clipping_content<class_Tree_method_is_column_clipping_content>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_column_expanding<class_Tree_method_is_column_expanding>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`scroll_to_item<class_Tree_method_scroll_to_item>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`, center_on_item\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_column_clip_content<class_Tree_method_set_column_clip_content>`\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_column_custom_minimum_width<class_Tree_method_set_column_custom_minimum_width>`\ (\ column\: :ref:`int<class_int>`, min_width\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_column_expand<class_Tree_method_set_column_expand>`\ (\ column\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_column_expand_ratio<class_Tree_method_set_column_expand_ratio>`\ (\ column\: :ref:`int<class_int>`, ratio\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_column_title<class_Tree_method_set_column_title>`\ (\ column\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_column_title_alignment<class_Tree_method_set_column_title_alignment>`\ (\ column\: :ref:`int<class_int>`, title_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_column_title_direction<class_Tree_method_set_column_title_direction>`\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_column_title_language<class_Tree_method_set_column_title_language>`\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_column_title_tooltip_text<class_Tree_method_set_column_title_tooltip_text>`\ (\ column\: :ref:`int<class_int>`, tooltip_text\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_selected<class_Tree_method_set_selected>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
主題屬性
|
||
--------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`children_hl_line_color<class_Tree_theme_color_children_hl_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`custom_button_font_highlight<class_Tree_theme_color_custom_button_font_highlight>` | ``Color(0.95, 0.95, 0.95, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`drop_position_color<class_Tree_theme_color_drop_position_color>` | ``Color(1, 1, 1, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_color<class_Tree_theme_color_font_color>` | ``Color(0.7, 0.7, 0.7, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_Tree_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_Tree_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_hovered_dimmed_color<class_Tree_theme_color_font_hovered_dimmed_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_hovered_selected_color<class_Tree_theme_color_font_hovered_selected_color>` | ``Color(1, 1, 1, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_outline_color<class_Tree_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_selected_color<class_Tree_theme_color_font_selected_color>` | ``Color(1, 1, 1, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`guide_color<class_Tree_theme_color_guide_color>` | ``Color(0.7, 0.7, 0.7, 0.25)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`parent_hl_line_color<class_Tree_theme_color_parent_hl_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`relationship_line_color<class_Tree_theme_color_relationship_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`title_button_color<class_Tree_theme_color_title_button_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`button_margin<class_Tree_theme_constant_button_margin>` | ``4`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`children_hl_line_width<class_Tree_theme_constant_children_hl_line_width>` | ``1`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`dragging_unfold_wait_msec<class_Tree_theme_constant_dragging_unfold_wait_msec>` | ``500`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`draw_guides<class_Tree_theme_constant_draw_guides>` | ``1`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`draw_relationship_lines<class_Tree_theme_constant_draw_relationship_lines>` | ``0`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`h_separation<class_Tree_theme_constant_h_separation>` | ``4`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`icon_max_width<class_Tree_theme_constant_icon_max_width>` | ``0`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`inner_item_margin_bottom<class_Tree_theme_constant_inner_item_margin_bottom>` | ``0`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`inner_item_margin_left<class_Tree_theme_constant_inner_item_margin_left>` | ``0`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`inner_item_margin_right<class_Tree_theme_constant_inner_item_margin_right>` | ``0`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`inner_item_margin_top<class_Tree_theme_constant_inner_item_margin_top>` | ``0`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`item_margin<class_Tree_theme_constant_item_margin>` | ``16`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`outline_size<class_Tree_theme_constant_outline_size>` | ``0`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`parent_hl_line_margin<class_Tree_theme_constant_parent_hl_line_margin>` | ``0`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`parent_hl_line_width<class_Tree_theme_constant_parent_hl_line_width>` | ``1`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`relationship_line_width<class_Tree_theme_constant_relationship_line_width>` | ``1`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`scroll_border<class_Tree_theme_constant_scroll_border>` | ``4`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`scroll_speed<class_Tree_theme_constant_scroll_speed>` | ``12`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`scrollbar_h_separation<class_Tree_theme_constant_scrollbar_h_separation>` | ``4`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`scrollbar_margin_bottom<class_Tree_theme_constant_scrollbar_margin_bottom>` | ``-1`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`scrollbar_margin_left<class_Tree_theme_constant_scrollbar_margin_left>` | ``-1`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`scrollbar_margin_right<class_Tree_theme_constant_scrollbar_margin_right>` | ``-1`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`scrollbar_margin_top<class_Tree_theme_constant_scrollbar_margin_top>` | ``-1`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`scrollbar_v_separation<class_Tree_theme_constant_scrollbar_v_separation>` | ``4`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`v_separation<class_Tree_theme_constant_v_separation>` | ``4`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Font<class_Font>` | :ref:`font<class_Tree_theme_font_font>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Font<class_Font>` | :ref:`title_button_font<class_Tree_theme_font_title_button_font>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_size<class_Tree_theme_font_size_font_size>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`title_button_font_size<class_Tree_theme_font_size_title_button_font_size>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`arrow<class_Tree_theme_icon_arrow>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`arrow_collapsed<class_Tree_theme_icon_arrow_collapsed>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`arrow_collapsed_mirrored<class_Tree_theme_icon_arrow_collapsed_mirrored>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`checked<class_Tree_theme_icon_checked>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`checked_disabled<class_Tree_theme_icon_checked_disabled>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`indeterminate<class_Tree_theme_icon_indeterminate>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`indeterminate_disabled<class_Tree_theme_icon_indeterminate_disabled>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`scroll_hint<class_Tree_theme_icon_scroll_hint>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`select_arrow<class_Tree_theme_icon_select_arrow>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`unchecked<class_Tree_theme_icon_unchecked>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`unchecked_disabled<class_Tree_theme_icon_unchecked_disabled>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`updown<class_Tree_theme_icon_updown>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`button_hover<class_Tree_theme_style_button_hover>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`button_pressed<class_Tree_theme_style_button_pressed>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`cursor<class_Tree_theme_style_cursor>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`cursor_unfocused<class_Tree_theme_style_cursor_unfocused>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button<class_Tree_theme_style_custom_button>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button_hover<class_Tree_theme_style_custom_button_hover>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button_pressed<class_Tree_theme_style_custom_button_pressed>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_Tree_theme_style_focus>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`hovered<class_Tree_theme_style_hovered>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`hovered_dimmed<class_Tree_theme_style_hovered_dimmed>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`hovered_selected<class_Tree_theme_style_hovered_selected>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`hovered_selected_focus<class_Tree_theme_style_hovered_selected_focus>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_Tree_theme_style_panel>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`selected<class_Tree_theme_style_selected>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`selected_focus<class_Tree_theme_style_selected_focus>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_hover<class_Tree_theme_style_title_button_hover>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_normal<class_Tree_theme_style_title_button_normal>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_pressed<class_Tree_theme_style_title_button_pressed>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
訊號
|
||
----
|
||
|
||
.. _class_Tree_signal_button_clicked:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**button_clicked**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_button_clicked>`
|
||
|
||
按下樹中的某個按鈕時發出(見 :ref:`TreeItem.add_button()<class_TreeItem_method_add_button>`\ )。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_cell_selected:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**cell_selected**\ (\ ) :ref:`🔗<class_Tree_signal_cell_selected>`
|
||
|
||
選中某個儲存格時發出。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_check_propagated_to_item:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**check_propagated_to_item**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_check_propagated_to_item>`
|
||
|
||
呼叫 :ref:`TreeItem.propagate_check()<class_TreeItem_method_propagate_check>` 時發出。連接到該訊號可以處理在 :ref:`TreeItem.propagate_check()<class_TreeItem_method_propagate_check>` 被呼叫時受影響的項。受影響項的處理順序如下:呼叫該方法的項,該項的子項,最後是該項的父項。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_column_title_clicked:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**column_title_clicked**\ (\ column\: :ref:`int<class_int>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_column_title_clicked>`
|
||
|
||
使用 :ref:`@GlobalScope.MOUSE_BUTTON_LEFT<class_@GlobalScope_constant_MOUSE_BUTTON_LEFT>` 使用 :ref:`@GlobalScope.MOUSE_BUTTON_RIGHT<class_@GlobalScope_constant_MOUSE_BUTTON_RIGHT>` 點擊某一列的標題時發出。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_custom_item_clicked:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**custom_item_clicked**\ (\ mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_custom_item_clicked>`
|
||
|
||
使用滑鼠按鈕點擊某一 :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` 項時發出。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_custom_popup_edited:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**custom_popup_edited**\ (\ arrow_clicked\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_signal_custom_popup_edited>`
|
||
|
||
點擊某一 :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` 項進行編輯時發出。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_empty_clicked:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**empty_clicked**\ (\ click_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_empty_clicked>`
|
||
|
||
使用滑鼠按鈕點擊該樹中的空白區域時發出。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_item_activated:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**item_activated**\ (\ ) :ref:`🔗<class_Tree_signal_item_activated>`
|
||
|
||
按兩下某一項,或使用 ``ui_accept`` 輸入事件(例如鍵盤的\ :kbd:`確認`\ 或\ :kbd:`空格`\ 鍵)選中某一項時發出。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_item_collapsed:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**item_collapsed**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_Tree_signal_item_collapsed>`
|
||
|
||
Emitted when an item is expanded or collapsed by clicking on the folding arrow or through code.
|
||
|
||
\ **Note:** Despite its name, this signal is also emitted when an item is expanded.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_item_edited:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**item_edited**\ (\ ) :ref:`🔗<class_Tree_signal_item_edited>`
|
||
|
||
編輯某一項時發出。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_item_icon_double_clicked:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**item_icon_double_clicked**\ (\ ) :ref:`🔗<class_Tree_signal_item_icon_double_clicked>`
|
||
|
||
按兩下某一項的圖示時發出。按兩下該項的任意區域所發出的訊號見 :ref:`item_activated<class_Tree_signal_item_activated>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_item_mouse_selected:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**item_mouse_selected**\ (\ mouse_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_item_mouse_selected>`
|
||
|
||
使用滑鼠按鈕選中某一項時發出。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_item_selected:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**item_selected**\ (\ ) :ref:`🔗<class_Tree_signal_item_selected>`
|
||
|
||
選中某一項時發出。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_multi_selected:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**multi_selected**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`, selected\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_signal_multi_selected>`
|
||
|
||
Emitted instead of :ref:`item_selected<class_Tree_signal_item_selected>` if :ref:`select_mode<class_Tree_property_select_mode>` is set to :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_signal_nothing_selected:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**nothing_selected**\ (\ ) :ref:`🔗<class_Tree_signal_nothing_selected>`
|
||
|
||
滑鼠左鍵未選中任一項時發出。
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
列舉
|
||
----
|
||
|
||
.. _enum_Tree_SelectMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **SelectMode**: :ref:`🔗<enum_Tree_SelectMode>`
|
||
|
||
.. _class_Tree_constant_SELECT_SINGLE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SelectMode<enum_Tree_SelectMode>` **SELECT_SINGLE** = ``0``
|
||
|
||
允許一次選擇一個儲存格。從項的角度看,只允許選擇一個項。而且在所選項中只有一列被選中。
|
||
|
||
在這種模式下,焦點游標總被隱藏,被定位在目前的選擇處,使目前的選擇項成為目前的焦點項。
|
||
|
||
.. _class_Tree_constant_SELECT_ROW:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SelectMode<enum_Tree_SelectMode>` **SELECT_ROW** = ``1``
|
||
|
||
允許一次選擇單行。從項的角度看,只允許選擇單個項。而所有的列都被選擇在所選項中。
|
||
|
||
在這種模式下,焦點游標總被隱藏,被定位在目前選擇的第一列,使目前選擇項成為當前焦點項。
|
||
|
||
.. _class_Tree_constant_SELECT_MULTI:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SelectMode<enum_Tree_SelectMode>` **SELECT_MULTI** = ``2``
|
||
|
||
允許同時選擇多個儲存格。從項的角度看,允許選擇多個項。而且每個被選中的項中可以有多個列被選中。
|
||
|
||
在這種模式下,焦點游標可見,游標下的項或列不一定被選中。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Tree_DropModeFlags:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **DropModeFlags**: :ref:`🔗<enum_Tree_DropModeFlags>`
|
||
|
||
.. _class_Tree_constant_DROP_MODE_DISABLED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DropModeFlags<enum_Tree_DropModeFlags>` **DROP_MODE_DISABLED** = ``0``
|
||
|
||
禁用所有放置部分,但仍然允許通過 :ref:`get_drop_section_at_position()<class_Tree_method_get_drop_section_at_position>` 檢測“專案上”的放置部分。
|
||
|
||
\ **注意:**\ 這是預設的旗標,當與其他旗標結合時,它沒有效果。
|
||
|
||
.. _class_Tree_constant_DROP_MODE_ON_ITEM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DropModeFlags<enum_Tree_DropModeFlags>` **DROP_MODE_ON_ITEM** = ``1``
|
||
|
||
啟用“專案上”的放置部分。這個放置部分覆蓋整個項。
|
||
|
||
當與 :ref:`DROP_MODE_INBETWEEN<class_Tree_constant_DROP_MODE_INBETWEEN>` 結合使用時,這個放置部分的高度減半,並保持垂直居中。
|
||
|
||
.. _class_Tree_constant_DROP_MODE_INBETWEEN:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DropModeFlags<enum_Tree_DropModeFlags>` **DROP_MODE_INBETWEEN** = ``2``
|
||
|
||
啟用“專案上方”和“專案下方”的放置部分。“專案上方”的放置部分覆蓋專案的上半部分,“專案下方”的放置部分覆蓋下半部分。
|
||
|
||
當與 :ref:`DROP_MODE_ON_ITEM<class_Tree_constant_DROP_MODE_ON_ITEM>` 結合時,這些放置部分的高度減半,並相應地停留在頂部或底部。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Tree_ScrollHintMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **ScrollHintMode**: :ref:`🔗<enum_Tree_ScrollHintMode>`
|
||
|
||
.. _class_Tree_constant_SCROLL_HINT_MODE_DISABLED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ScrollHintMode<enum_Tree_ScrollHintMode>` **SCROLL_HINT_MODE_DISABLED** = ``0``
|
||
|
||
Scroll hints will never be shown.
|
||
|
||
.. _class_Tree_constant_SCROLL_HINT_MODE_BOTH:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ScrollHintMode<enum_Tree_ScrollHintMode>` **SCROLL_HINT_MODE_BOTH** = ``1``
|
||
|
||
Scroll hints will be shown at the top and bottom.
|
||
|
||
.. _class_Tree_constant_SCROLL_HINT_MODE_TOP:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ScrollHintMode<enum_Tree_ScrollHintMode>` **SCROLL_HINT_MODE_TOP** = ``2``
|
||
|
||
Only the top scroll hint will be shown.
|
||
|
||
.. _class_Tree_constant_SCROLL_HINT_MODE_BOTTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ScrollHintMode<enum_Tree_ScrollHintMode>` **SCROLL_HINT_MODE_BOTTOM** = ``3``
|
||
|
||
Only the bottom scroll hint will be shown.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
屬性說明
|
||
--------
|
||
|
||
.. _class_Tree_property_allow_reselect:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **allow_reselect** = ``false`` :ref:`🔗<class_Tree_property_allow_reselect>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_allow_reselect**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_allow_reselect**\ (\ )
|
||
|
||
如果為 ``true``\ ,可以再次選擇目前選定的單元。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_allow_rmb_select:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **allow_rmb_select** = ``false`` :ref:`🔗<class_Tree_property_allow_rmb_select>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_allow_rmb_select**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_allow_rmb_select**\ (\ )
|
||
|
||
如果為 ``true``\ ,滑鼠右鍵點擊可以選擇專案。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_allow_search:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **allow_search** = ``true`` :ref:`🔗<class_Tree_property_allow_search>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_allow_search**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_allow_search**\ (\ )
|
||
|
||
如果為 ``true``\ ,允許在 **Tree** 中以差異量搜索的形式使用字母鍵導覽。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_auto_tooltip:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **auto_tooltip** = ``true`` :ref:`🔗<class_Tree_property_auto_tooltip>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_auto_tooltip**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_auto_tooltip_enabled**\ (\ )
|
||
|
||
If ``true``, tree items with no tooltip assigned display their text as their tooltip. See also :ref:`TreeItem.get_tooltip_text()<class_TreeItem_method_get_tooltip_text>` and :ref:`TreeItem.get_button_tooltip_text()<class_TreeItem_method_get_button_tooltip_text>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_column_titles_visible:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **column_titles_visible** = ``false`` :ref:`🔗<class_Tree_property_column_titles_visible>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_column_titles_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **are_column_titles_visible**\ (\ )
|
||
|
||
如果為 ``true``\ ,列標題可見。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_columns:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **columns** = ``1`` :ref:`🔗<class_Tree_property_columns>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_columns**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_columns**\ (\ )
|
||
|
||
列數。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_drop_mode_flags:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **drop_mode_flags** = ``0`` :ref:`🔗<class_Tree_property_drop_mode_flags>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_drop_mode_flags**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_drop_mode_flags**\ (\ )
|
||
|
||
放置模式是旗標的按位元或(OR)組合。見 :ref:`DropModeFlags<enum_Tree_DropModeFlags>` 常數。放置完成後會恢復為 :ref:`DROP_MODE_DISABLED<class_Tree_constant_DROP_MODE_DISABLED>`\ 。建議在 :ref:`Control._can_drop_data()<class_Control_private_method__can_drop_data>` 期間設定。
|
||
|
||
控制的是放置區,即根據滑鼠的位置決定並繪製可能的放置位置。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_enable_drag_unfolding:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **enable_drag_unfolding** = ``true`` :ref:`🔗<class_Tree_property_enable_drag_unfolding>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_enable_drag_unfolding**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_drag_unfolding_enabled**\ (\ )
|
||
|
||
If ``true``, tree items will unfold when hovered over during a drag-and-drop. The delay for when this happens is dictated by :ref:`dragging_unfold_wait_msec<class_Tree_theme_constant_dragging_unfold_wait_msec>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_enable_recursive_folding:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **enable_recursive_folding** = ``true`` :ref:`🔗<class_Tree_property_enable_recursive_folding>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_enable_recursive_folding**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_recursive_folding_enabled**\ (\ )
|
||
|
||
If ``true``, recursive folding is enabled for this **Tree**. Holding down :kbd:`Shift` while clicking the fold arrow or using ``ui_right``/``ui_left`` shortcuts collapses or uncollapses the :ref:`TreeItem<class_TreeItem>` and all its descendants.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_hide_folding:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **hide_folding** = ``false`` :ref:`🔗<class_Tree_property_hide_folding>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_hide_folding**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_folding_hidden**\ (\ )
|
||
|
||
如果為 ``true``\ ,隱藏折疊箭頭。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_hide_root:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **hide_root** = ``false`` :ref:`🔗<class_Tree_property_hide_root>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_hide_root**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_root_hidden**\ (\ )
|
||
|
||
如果為 ``true``\ ,則隱藏樹的根節點。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_scroll_hint_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`ScrollHintMode<enum_Tree_ScrollHintMode>` **scroll_hint_mode** = ``0`` :ref:`🔗<class_Tree_property_scroll_hint_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_scroll_hint_mode**\ (\ value\: :ref:`ScrollHintMode<enum_Tree_ScrollHintMode>`\ )
|
||
- :ref:`ScrollHintMode<enum_Tree_ScrollHintMode>` **get_scroll_hint_mode**\ (\ )
|
||
|
||
The way which scroll hints (indicators that show that the content can still be scrolled in a certain direction) will be shown.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_scroll_horizontal_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **scroll_horizontal_enabled** = ``true`` :ref:`🔗<class_Tree_property_scroll_horizontal_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_h_scroll_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_h_scroll_enabled**\ (\ )
|
||
|
||
如果為 ``true``\ ,啟用水平滾動。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_scroll_vertical_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **scroll_vertical_enabled** = ``true`` :ref:`🔗<class_Tree_property_scroll_vertical_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_v_scroll_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_v_scroll_enabled**\ (\ )
|
||
|
||
如果為 ``true``\ ,則啟用垂直捲動。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_select_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`SelectMode<enum_Tree_SelectMode>` **select_mode** = ``0`` :ref:`🔗<class_Tree_property_select_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_select_mode**\ (\ value\: :ref:`SelectMode<enum_Tree_SelectMode>`\ )
|
||
- :ref:`SelectMode<enum_Tree_SelectMode>` **get_select_mode**\ (\ )
|
||
|
||
允許單選或多選。見 :ref:`SelectMode<enum_Tree_SelectMode>` 常數。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_property_tile_scroll_hint:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **tile_scroll_hint** = ``false`` :ref:`🔗<class_Tree_property_tile_scroll_hint>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tile_scroll_hint**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_scroll_hint_tiled**\ (\ )
|
||
|
||
If ``true``, the scroll hint texture will be tiled instead of stretched. See :ref:`scroll_hint_mode<class_Tree_property_scroll_hint_mode>`.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
方法說明
|
||
--------
|
||
|
||
.. _class_Tree_method_clear:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear**\ (\ ) :ref:`🔗<class_Tree_method_clear>`
|
||
|
||
清除樹。這將刪除所有專案。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_create_item:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **create_item**\ (\ parent\: :ref:`TreeItem<class_TreeItem>` = null, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_Tree_method_create_item>`
|
||
|
||
在樹中建立一個項,並將其新增為父項 ``parent`` 的子項,該父項可以是一個有效的 :ref:`TreeItem<class_TreeItem>` 或 ``null``\ 。
|
||
|
||
如果 ``parent`` 為 ``null``\ ,則根項將是父項;或者如果該樹為空,則該新項將是根本身。
|
||
|
||
新項將是父項的第 ``index`` 個子項,如果沒有足夠的同級項,它將是最後一個子項。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_deselect_all:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **deselect_all**\ (\ ) :ref:`🔗<class_Tree_method_deselect_all>`
|
||
|
||
取消選中樹中的所有專案(行和列)。在 :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>` 模式中還會移除選擇游標。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_edit_selected:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **edit_selected**\ (\ force_edit\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Tree_method_edit_selected>`
|
||
|
||
編輯選中的樹項,就像它被點擊一樣。
|
||
|
||
該項必須通過 :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>` 設定為可編輯,否則 ``force_edit`` 必須為 ``true``\ 。
|
||
|
||
如果該項可被編輯,則返回 ``true``\ 。如果沒有選中任何項則失敗。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_ensure_cursor_is_visible:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **ensure_cursor_is_visible**\ (\ ) :ref:`🔗<class_Tree_method_ensure_cursor_is_visible>`
|
||
|
||
使目前獲得焦點的單元可見。
|
||
|
||
如果有必要,將滾動樹。在 :ref:`SELECT_ROW<class_Tree_constant_SELECT_ROW>` 模式下,不會做水平滾動,因為所選行中的所有單元都按邏輯獲得焦點。
|
||
|
||
\ **注意:**\ 儘管這個方法的名稱是這樣的,但焦點游標本身只在 :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>` 模式下可見。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_button_id_at_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_button_id_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_button_id_at_position>`
|
||
|
||
返回位於 ``position`` 的按鈕 ID,如果沒有按鈕則返回 -1。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_column_at_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_column_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_at_position>`
|
||
|
||
返回位於 ``position`` 的列索引,如果沒有專案則返回 -1。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_column_expand_ratio:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_column_expand_ratio**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_expand_ratio>`
|
||
|
||
返回分配給該列的擴充比例。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_column_title:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_column_title**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title>`
|
||
|
||
返回該列的標題。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_column_title_alignment:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_column_title_alignment**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title_alignment>`
|
||
|
||
返回該列的標題對齊方式。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_column_title_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TextDirection<enum_Control_TextDirection>` **get_column_title_direction**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title_direction>`
|
||
|
||
返回列標題的基礎書寫方向。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_column_title_language:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_column_title_language**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title_language>`
|
||
|
||
返回列標題的語言程式碼。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_column_title_tooltip_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_column_title_tooltip_text**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title_tooltip_text>`
|
||
|
||
Returns the column title's tooltip text.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_column_width:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_column_width**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_width>`
|
||
|
||
返回列的寬度,單位是圖元。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_custom_popup_rect:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Rect2<class_Rect2>` **get_custom_popup_rect**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_custom_popup_rect>`
|
||
|
||
返回自訂快顯視窗的矩形。説明建立顯示彈出式的自訂儲存格控制項。見 :ref:`TreeItem.set_cell_mode()<class_TreeItem_method_set_cell_mode>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_drop_section_at_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_drop_section_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_drop_section_at_position>`
|
||
|
||
返回位於 ``position`` 的放置部分,如果沒有專案,則返回 -100。
|
||
|
||
在“專案上方”“專案之上”和“專案下方”的放置部分將分別返回 -1、0 或 1 的值。請參閱 :ref:`DropModeFlags<enum_Tree_DropModeFlags>` 以瞭解每個放置部分的描述。
|
||
|
||
要獲得返回的放置部分相對項,請使用 :ref:`get_item_at_position()<class_Tree_method_get_item_at_position>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_edited:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_edited**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_edited>`
|
||
|
||
返回目前編輯的項。可以與 :ref:`item_edited<class_Tree_signal_item_edited>` 一起使用以獲取被修改的項。
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
func _ready():
|
||
$Tree.item_edited.connect(on_Tree_item_edited)
|
||
|
||
func on_Tree_item_edited():
|
||
print($Tree.get_edited()) # 該項剛剛被編輯(例如被勾選)。
|
||
|
||
.. code-tab:: csharp
|
||
|
||
public override void _Ready()
|
||
{
|
||
GetNode<Tree>("Tree").ItemEdited += OnTreeItemEdited;
|
||
}
|
||
|
||
public void OnTreeItemEdited()
|
||
{
|
||
GD.Print(GetNode<Tree>("Tree").GetEdited()); // 該項剛剛被編輯(例如被勾選)。
|
||
}
|
||
|
||
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_edited_column:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_edited_column**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_edited_column>`
|
||
|
||
返回目前編輯項的列。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_item_area_rect:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Rect2<class_Rect2>` **get_item_area_rect**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>` = -1, button_index\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_Tree_method_get_item_area_rect>`
|
||
|
||
返回指定 :ref:`TreeItem<class_TreeItem>` 的矩形區域。如果指定了\ ``column``\ ,則只獲取該列的位置和大小,否則獲取包含所有列的矩形。如果指定了按鈕索引,則將返回該按鈕的矩形。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_item_at_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_item_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_item_at_position>`
|
||
|
||
返回指定位置,即相對於樹的原點位置的樹中項。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_next_selected:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_next_selected**\ (\ from\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_Tree_method_get_next_selected>`
|
||
|
||
返回給定的 :ref:`TreeItem<class_TreeItem>` 之後的下一個選中項,如果到達末尾,則返回 ``null``\ 。
|
||
|
||
如果 ``from`` 為 ``null``\ ,則將返回第一個被選中的項。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_pressed_button:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_pressed_button**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_pressed_button>`
|
||
|
||
返回最後按下的按鈕的索引。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_root:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_root**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_root>`
|
||
|
||
返回樹的根項,如果樹是空的,則返回 ``null``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_scroll:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **get_scroll**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_scroll>`
|
||
|
||
返回目前的滾動位置。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_selected:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TreeItem<class_TreeItem>` **get_selected**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_selected>`
|
||
|
||
返回目前的焦點項,如果沒有焦點項,則返回 ``null``\ 。
|
||
|
||
在 :ref:`SELECT_ROW<class_Tree_constant_SELECT_ROW>` 和 :ref:`SELECT_SINGLE<class_Tree_constant_SELECT_SINGLE>` 模式下,焦點項與選擇項相同。在 :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>` 模式下,焦點項是焦點游標下的專案,不一定被選中。
|
||
|
||
要獲得目前選中項,請使用 :ref:`get_next_selected()<class_Tree_method_get_next_selected>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_get_selected_column:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_selected_column**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_selected_column>`
|
||
|
||
返回目前獲得焦點的列,如果沒有焦點列,則返回 -1。
|
||
|
||
在 :ref:`SELECT_SINGLE<class_Tree_constant_SELECT_SINGLE>` 模式下,焦點列是被選中的列。在 :ref:`SELECT_ROW<class_Tree_constant_SELECT_ROW>` 模式下,如果有任意項被選中,焦點列總是 0。在 :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>` 模式下,焦點列是焦點游標下的列,但不一定有列被選中。
|
||
|
||
要判斷一個項的某一列是否被選中,請使用 :ref:`TreeItem.is_selected()<class_TreeItem_method_is_selected>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_is_column_clipping_content:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_column_clipping_content**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_is_column_clipping_content>`
|
||
|
||
如果該列啟用了裁剪,則返回 ``true``\ (見 :ref:`set_column_clip_content()<class_Tree_method_set_column_clip_content>`\ )。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_is_column_expanding:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_column_expanding**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_is_column_expanding>`
|
||
|
||
如果該列啟用了擴充,則返回 ``true``\ (見 :ref:`set_column_expand()<class_Tree_method_set_column_expand>`\ )。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_scroll_to_item:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **scroll_to_item**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, center_on_item\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Tree_method_scroll_to_item>`
|
||
|
||
使 **Tree** 跳轉到指定的 :ref:`TreeItem<class_TreeItem>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_set_column_clip_content:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_column_clip_content**\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_method_set_column_clip_content>`
|
||
|
||
允許對列的內容進行裁剪,會忽略內容大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_set_column_custom_minimum_width:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_column_custom_minimum_width**\ (\ column\: :ref:`int<class_int>`, min_width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_method_set_column_custom_minimum_width>`
|
||
|
||
覆蓋某一列的計算的最小寬度。它可以被設定為 ``0`` 以恢復預設行為。具有“擴充”旗標的列將以與 :ref:`Control.size_flags_stretch_ratio<class_Control_property_size_flags_stretch_ratio>` 類似的方式使用它們的最小寬度“min_width”。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_set_column_expand:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_column_expand**\ (\ column\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_method_set_column_expand>`
|
||
|
||
如果為 ``true``\ ,該列將具有 :ref:`Control<class_Control>` 的“Expand”旗標。具有“Expand”標志的列將以與 :ref:`Control.size_flags_stretch_ratio<class_Control_property_size_flags_stretch_ratio>` 類似的方式,使用它們的擴充比率(參見 :ref:`set_column_expand_ratio()<class_Tree_method_set_column_expand_ratio>`\ )。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_set_column_expand_ratio:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_column_expand_ratio**\ (\ column\: :ref:`int<class_int>`, ratio\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_method_set_column_expand_ratio>`
|
||
|
||
設定列的相對擴充比。見 :ref:`set_column_expand()<class_Tree_method_set_column_expand>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_set_column_title:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_column_title**\ (\ column\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Tree_method_set_column_title>`
|
||
|
||
設定某一列的標題。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_set_column_title_alignment:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_column_title_alignment**\ (\ column\: :ref:`int<class_int>`, title_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) :ref:`🔗<class_Tree_method_set_column_title_alignment>`
|
||
|
||
設定列標題的對齊方式。注意,列標題不支援 :ref:`@GlobalScope.HORIZONTAL_ALIGNMENT_FILL<class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_FILL>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_set_column_title_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_column_title_direction**\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_Tree_method_set_column_title_direction>`
|
||
|
||
設定列標題的基礎書寫方向。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_set_column_title_language:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_column_title_language**\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Tree_method_set_column_title_language>`
|
||
|
||
Sets the language code of the given ``column``'s title 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_Tree_method_set_column_title_tooltip_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_column_title_tooltip_text**\ (\ column\: :ref:`int<class_int>`, tooltip_text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Tree_method_set_column_title_tooltip_text>`
|
||
|
||
Sets the column title's tooltip text.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_method_set_selected:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_selected**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_method_set_selected>`
|
||
|
||
選中指定的 :ref:`TreeItem<class_TreeItem>` 和列。
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
主題屬性說明
|
||
------------
|
||
|
||
.. _class_Tree_theme_color_children_hl_line_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **children_hl_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` :ref:`🔗<class_Tree_theme_color_children_hl_line_color>`
|
||
|
||
被選中的 :ref:`TreeItem<class_TreeItem>` 與其子項之間的關係線的 :ref:`Color<class_Color>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_custom_button_font_highlight:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **custom_button_font_highlight** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_Tree_theme_color_custom_button_font_highlight>`
|
||
|
||
當 :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` 模式的儲存格被懸停時的文字 :ref:`Color<class_Color>` 顏色。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_drop_position_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **drop_position_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Tree_theme_color_drop_position_color>`
|
||
|
||
用於繪製可能的放置位置的 :ref:`Color<class_Color>` 顏色。有關放置位置的描述,參閱 :ref:`DropModeFlags<enum_Tree_DropModeFlags>` 常數。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_font_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_color** = ``Color(0.7, 0.7, 0.7, 1)`` :ref:`🔗<class_Tree_theme_color_font_color>`
|
||
|
||
專案的預設文字顏色 :ref:`Color<class_Color>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_font_disabled_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗<class_Tree_theme_color_font_disabled_color>`
|
||
|
||
Text :ref:`Color<class_Color>` for a :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell when it's non-editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_font_hovered_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_Tree_theme_color_font_hovered_color>`
|
||
|
||
專案處於懸停但未選中狀態時使用的文字 :ref:`Color<class_Color>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_font_hovered_dimmed_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_hovered_dimmed_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_Tree_theme_color_font_hovered_dimmed_color>`
|
||
|
||
Text :ref:`Color<class_Color>` used when the item is hovered, while a button of the same item is hovered as the same time.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_font_hovered_selected_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_hovered_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Tree_theme_color_font_hovered_selected_color>`
|
||
|
||
Text :ref:`Color<class_Color>` used when the item is hovered and selected.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_font_outline_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Tree_theme_color_font_outline_color>`
|
||
|
||
專案文字輪廓的色調。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_font_selected_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Tree_theme_color_font_selected_color>`
|
||
|
||
選擇專案時使用的文字顏色 :ref:`Color<class_Color>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_guide_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` :ref:`🔗<class_Tree_theme_color_guide_color>`
|
||
|
||
輔助線的 :ref:`Color<class_Color>` 顏色。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_parent_hl_line_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **parent_hl_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` :ref:`🔗<class_Tree_theme_color_parent_hl_line_color>`
|
||
|
||
被選中的 :ref:`TreeItem<class_TreeItem>` 與其父項之間的關係線的 :ref:`Color<class_Color>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_relationship_line_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **relationship_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` :ref:`🔗<class_Tree_theme_color_relationship_line_color>`
|
||
|
||
關係線的預設 :ref:`Color<class_Color>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_color_title_button_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **title_button_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_Tree_theme_color_title_button_color>`
|
||
|
||
標題按鈕的預設文字 :ref:`Color<class_Color>` 顏色。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_button_margin:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **button_margin** = ``4`` :ref:`🔗<class_Tree_theme_constant_button_margin>`
|
||
|
||
儲存格中按鈕之間的水平間距。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_children_hl_line_width:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **children_hl_line_width** = ``1`` :ref:`🔗<class_Tree_theme_constant_children_hl_line_width>`
|
||
|
||
被選中的 :ref:`TreeItem<class_TreeItem>` 與其子項之間的關係線的寬度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_dragging_unfold_wait_msec:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **dragging_unfold_wait_msec** = ``500`` :ref:`🔗<class_Tree_theme_constant_dragging_unfold_wait_msec>`
|
||
|
||
During a drag-and-drop, this is how many milliseconds to wait over a section before the section unfolds.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_draw_guides:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **draw_guides** = ``1`` :ref:`🔗<class_Tree_theme_constant_draw_guides>`
|
||
|
||
如果不為零就繪製輔助線,行為類似於布林值。輔助線是在每個項的底部畫的一條水平線。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_draw_relationship_lines:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **draw_relationship_lines** = ``0`` :ref:`🔗<class_Tree_theme_constant_draw_relationship_lines>`
|
||
|
||
如果不為零就繪製關係線,行為類似於布林值。關係線在子項的開始處繪製,以顯示層次結構。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_h_separation:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_h_separation>`
|
||
|
||
專案單元之間的水平空間。這也用作禁用折疊時專案開頭的邊距。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_icon_max_width:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **icon_max_width** = ``0`` :ref:`🔗<class_Tree_theme_constant_icon_max_width>`
|
||
|
||
專案儲存格所允許的最大圖示寬度。這是在圖示預設大小的基礎上的限制,在 :ref:`TreeItem.set_icon_max_width()<class_TreeItem_method_set_icon_max_width>` 所設定的值之前生效。高度會根據圖示的長寬比調整。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_inner_item_margin_bottom:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **inner_item_margin_bottom** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_bottom>`
|
||
|
||
The inner bottom margin of a cell.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_inner_item_margin_left:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **inner_item_margin_left** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_left>`
|
||
|
||
The inner left margin of a cell.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_inner_item_margin_right:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **inner_item_margin_right** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_right>`
|
||
|
||
The inner right margin of a cell.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_inner_item_margin_top:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **inner_item_margin_top** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_top>`
|
||
|
||
The inner top margin of a cell.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_item_margin:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **item_margin** = ``16`` :ref:`🔗<class_Tree_theme_constant_item_margin>`
|
||
|
||
專案開頭的水平邊距。在專案啟用折疊功能時使用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_outline_size:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_Tree_theme_constant_outline_size>`
|
||
|
||
文字輪廓的大小。
|
||
|
||
\ **注意:**\ 如果使用啟用了 :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` 的字形,其 :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` 必須至少設定為 :ref:`outline_size<class_Tree_theme_constant_outline_size>` 的\ *兩倍*\ ,輪廓算繪才能看起來正確。否則,輪廓可能會比預期的更早被切斷。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_parent_hl_line_margin:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **parent_hl_line_margin** = ``0`` :ref:`🔗<class_Tree_theme_constant_parent_hl_line_margin>`
|
||
|
||
被選中的 :ref:`TreeItem<class_TreeItem>` 的父關係線,與其未選中的同級的關係線,兩者之間的空間。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_parent_hl_line_width:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **parent_hl_line_width** = ``1`` :ref:`🔗<class_Tree_theme_constant_parent_hl_line_width>`
|
||
|
||
被選中的 :ref:`TreeItem<class_TreeItem>` 與其父項之間的關係線的寬度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_relationship_line_width:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **relationship_line_width** = ``1`` :ref:`🔗<class_Tree_theme_constant_relationship_line_width>`
|
||
|
||
關係線的預設寬度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_scroll_border:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **scroll_border** = ``4`` :ref:`🔗<class_Tree_theme_constant_scroll_border>`
|
||
|
||
拖動時,滑鼠指標與控制項邊框之間觸發邊框滾動的最大距離。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_scroll_speed:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **scroll_speed** = ``12`` :ref:`🔗<class_Tree_theme_constant_scroll_speed>`
|
||
|
||
邊框滾動的速度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_scrollbar_h_separation:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **scrollbar_h_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_scrollbar_h_separation>`
|
||
|
||
樹中內容與捲軸的水平間距。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_scrollbar_margin_bottom:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **scrollbar_margin_bottom** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_bottom>`
|
||
|
||
捲軸的底部邊距。為負數時會使用 :ref:`panel<class_Tree_theme_style_panel>` 的底部邊距。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_scrollbar_margin_left:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **scrollbar_margin_left** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_left>`
|
||
|
||
水平捲軸的左側邊距。為負數時會使用 :ref:`panel<class_Tree_theme_style_panel>` 的左側邊距。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_scrollbar_margin_right:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **scrollbar_margin_right** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_right>`
|
||
|
||
捲軸的右側邊距。為負數時會使用 :ref:`panel<class_Tree_theme_style_panel>` 的右側邊距。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_scrollbar_margin_top:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **scrollbar_margin_top** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_top>`
|
||
|
||
垂直捲動條的右側邊距。為負數時會使用 :ref:`panel<class_Tree_theme_style_panel>` 的頂部邊距。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_scrollbar_v_separation:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **scrollbar_v_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_scrollbar_v_separation>`
|
||
|
||
樹中內容與捲軸的垂直間距。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_constant_v_separation:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **v_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_v_separation>`
|
||
|
||
每個項內的垂直填充,即項內容與上或下邊框之間的距離。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_font_font:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Font<class_Font>` **font** :ref:`🔗<class_Tree_theme_font_font>`
|
||
|
||
專案文字的字形 :ref:`Font<class_Font>` 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_font_title_button_font:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Font<class_Font>` **title_button_font** :ref:`🔗<class_Tree_theme_font_title_button_font>`
|
||
|
||
標題按鈕文字的 :ref:`Font<class_Font>` 字形。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_font_size_font_size:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **font_size** :ref:`🔗<class_Tree_theme_font_size_font_size>`
|
||
|
||
專案文字的字形大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_font_size_title_button_font_size:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **title_button_font_size** :ref:`🔗<class_Tree_theme_font_size_title_button_font_size>`
|
||
|
||
標題按鈕文字的 :ref:`Font<class_Font>` 字形。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_arrow:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **arrow** :ref:`🔗<class_Tree_theme_icon_arrow>`
|
||
|
||
箭頭圖示,可折疊項未折疊時使用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_arrow_collapsed:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **arrow_collapsed** :ref:`🔗<class_Tree_theme_icon_arrow_collapsed>`
|
||
|
||
箭頭圖示,可折疊項已折疊時使用(用於從左至右佈局)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_arrow_collapsed_mirrored:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **arrow_collapsed_mirrored** :ref:`🔗<class_Tree_theme_icon_arrow_collapsed_mirrored>`
|
||
|
||
箭頭圖示,可折疊項已折疊時使用(用於從右至左佈局)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_checked:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **checked** :ref:`🔗<class_Tree_theme_icon_checked>`
|
||
|
||
The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is checked and editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_checked_disabled:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **checked_disabled** :ref:`🔗<class_Tree_theme_icon_checked_disabled>`
|
||
|
||
The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is checked and non-editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_indeterminate:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **indeterminate** :ref:`🔗<class_Tree_theme_icon_indeterminate>`
|
||
|
||
The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is indeterminate and editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_indeterminate_disabled:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **indeterminate_disabled** :ref:`🔗<class_Tree_theme_icon_indeterminate_disabled>`
|
||
|
||
The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is indeterminate and non-editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_scroll_hint:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **scroll_hint** :ref:`🔗<class_Tree_theme_icon_scroll_hint>`
|
||
|
||
The indicator that will be shown when the content can still be scrolled. See :ref:`scroll_hint_mode<class_Tree_property_scroll_hint_mode>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_select_arrow:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **select_arrow** :ref:`🔗<class_Tree_theme_icon_select_arrow>`
|
||
|
||
箭頭圖示,模式為 :ref:`TreeItem.CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` 的儲存格顯示。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_unchecked:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **unchecked** :ref:`🔗<class_Tree_theme_icon_unchecked>`
|
||
|
||
The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is unchecked and editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_unchecked_disabled:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **unchecked_disabled** :ref:`🔗<class_Tree_theme_icon_unchecked_disabled>`
|
||
|
||
The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is unchecked and non-editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_icon_updown:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **updown** :ref:`🔗<class_Tree_theme_icon_updown>`
|
||
|
||
上下箭頭圖示,模式為 :ref:`TreeItem.CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` 的儲存格顯示。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_button_hover:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **button_hover** :ref:`🔗<class_Tree_theme_style_button_hover>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` used when a button in the tree is hovered.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_button_pressed:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **button_pressed** :ref:`🔗<class_Tree_theme_style_button_pressed>`
|
||
|
||
樹中的按鈕處於按下狀態時使用的 :ref:`StyleBox<class_StyleBox>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_cursor:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **cursor** :ref:`🔗<class_Tree_theme_style_cursor>`
|
||
|
||
用作游標的 :ref:`StyleBox<class_StyleBox>`\ ,該 **Tree** 處於聚焦狀態時使用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_cursor_unfocused:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **cursor_unfocused** :ref:`🔗<class_Tree_theme_style_cursor_unfocused>`
|
||
|
||
用作游標的 :ref:`StyleBox<class_StyleBox>`\ ,該 **Tree** 處於失焦狀態時使用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_custom_button:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **custom_button** :ref:`🔗<class_Tree_theme_style_custom_button>`
|
||
|
||
Default :ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode cell when button is enabled with :ref:`TreeItem.set_custom_as_button()<class_TreeItem_method_set_custom_as_button>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_custom_button_hover:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **custom_button_hover** :ref:`🔗<class_Tree_theme_style_custom_button_hover>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode button cell when it's hovered.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_custom_button_pressed:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **custom_button_pressed** :ref:`🔗<class_Tree_theme_style_custom_button_pressed>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode button cell when it's pressed.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_focus:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_Tree_theme_style_focus>`
|
||
|
||
該 **Tree** 的聚焦樣式,繪製在所有東西之上。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_hovered:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **hovered** :ref:`🔗<class_Tree_theme_style_hovered>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` for the item being hovered, but not selected.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_hovered_dimmed:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **hovered_dimmed** :ref:`🔗<class_Tree_theme_style_hovered_dimmed>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` for the item being hovered, while a button of the same item is hovered as the same time.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_hovered_selected:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **hovered_selected** :ref:`🔗<class_Tree_theme_style_hovered_selected>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` for the hovered and selected items, used when the **Tree** is not being focused.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_hovered_selected_focus:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **hovered_selected_focus** :ref:`🔗<class_Tree_theme_style_hovered_selected_focus>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` for the hovered and selected items, used when the **Tree** is being focused.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_panel:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_Tree_theme_style_panel>`
|
||
|
||
該 **Tree** 的背景樣式。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_selected:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **selected** :ref:`🔗<class_Tree_theme_style_selected>`
|
||
|
||
所選專案的 :ref:`StyleBox<class_StyleBox>`\ ,在 **Tree** 沒有獲得焦點時使用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_selected_focus:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **selected_focus** :ref:`🔗<class_Tree_theme_style_selected_focus>`
|
||
|
||
所選專案的 :ref:`StyleBox<class_StyleBox>`\ ,在 **Tree** 獲得焦點時使用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_title_button_hover:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **title_button_hover** :ref:`🔗<class_Tree_theme_style_title_button_hover>`
|
||
|
||
當標題按鈕被懸停時使用的 :ref:`StyleBox<class_StyleBox>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_title_button_normal:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **title_button_normal** :ref:`🔗<class_Tree_theme_style_title_button_normal>`
|
||
|
||
標題按鈕的預設 :ref:`StyleBox<class_StyleBox>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Tree_theme_style_title_button_pressed:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **title_button_pressed** :ref:`🔗<class_Tree_theme_style_title_button_pressed>`
|
||
|
||
當標題按鈕被按下時使用的 :ref:`StyleBox<class_StyleBox>`\ 。
|
||
|
||
.. |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 (無回傳值。)`
|