classref: Sync with current master branch (17e7f85)

This commit is contained in:
Godot Organization
2024-01-27 03:18:33 +00:00
parent 515d22d2b4
commit fcfc613357
29 changed files with 837 additions and 495 deletions

View File

@@ -92,6 +92,8 @@ Methods
+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`get_custom_color<class_TreeItem_method_get_custom_color>` **(** :ref:`int<class_int>` column **)** |const| |
+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Callable<class_Callable>` | :ref:`get_custom_draw_callback<class_TreeItem_method_get_custom_draw_callback>` **(** :ref:`int<class_int>` column **)** |const| |
+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Font<class_Font>` | :ref:`get_custom_font<class_TreeItem_method_get_custom_font>` **(** :ref:`int<class_int>` column **)** |const| |
+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_custom_font_size<class_TreeItem_method_get_custom_font_size>` **(** :ref:`int<class_int>` column **)** |const| |
@@ -202,6 +204,8 @@ Methods
+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_custom_draw<class_TreeItem_method_set_custom_draw>` **(** :ref:`int<class_int>` column, :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` callback **)** |
+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_custom_draw_callback<class_TreeItem_method_set_custom_draw_callback>` **(** :ref:`int<class_int>` column, :ref:`Callable<class_Callable>` callback **)** |
+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_custom_font<class_TreeItem_method_set_custom_font>` **(** :ref:`int<class_int>` column, :ref:`Font<class_Font>` font **)** |
+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_custom_font_size<class_TreeItem_method_set_custom_font_size>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` font_size **)** |
@@ -638,6 +642,18 @@ Returns the custom color of column ``column``.
----
.. _class_TreeItem_method_get_custom_draw_callback:
.. rst-class:: classref-method
:ref:`Callable<class_Callable>` **get_custom_draw_callback** **(** :ref:`int<class_int>` column **)** |const|
Returns the custom callback of column ``column``.
.. rst-class:: classref-item-separator
----
.. _class_TreeItem_method_get_custom_font:
.. rst-class:: classref-method
@@ -1320,6 +1336,22 @@ Sets the given column's custom draw callback to ``callback`` method on ``object`
The ``callback`` should accept two arguments: the **TreeItem** that is drawn and its position and size as a :ref:`Rect2<class_Rect2>`.
\ *Deprecated.* Use :ref:`set_custom_draw_callback<class_TreeItem_method_set_custom_draw_callback>` instead.
.. rst-class:: classref-item-separator
----
.. _class_TreeItem_method_set_custom_draw_callback:
.. rst-class:: classref-method
void **set_custom_draw_callback** **(** :ref:`int<class_int>` column, :ref:`Callable<class_Callable>` callback **)**
Sets the given column's custom draw callback. Use an empty :ref:`Callable<class_Callable>` (``Callable()``) to clear the custom callback.
The ``callback`` should accept two arguments: the **TreeItem** that is drawn and its position and size as a :ref:`Rect2<class_Rect2>`.
.. rst-class:: classref-item-separator
----