|
@@ -12,14 +12,14 @@ DisplayServer
|
|
|
|
|
|
**Inherits:** :ref:`Object<class_Object>`
|
|
**Inherits:** :ref:`Object<class_Object>`
|
|
|
|
|
|
-Singleton for window management functions.
|
|
|
|
|
|
+A server interface for low-level window management.
|
|
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
|
|
Description
|
|
Description
|
|
-----------
|
|
-----------
|
|
|
|
|
|
-**DisplayServer** handles everything related to window management. This is separated from :ref:`OS<class_OS>` as a single operating system may support multiple display servers.
|
|
|
|
|
|
+**DisplayServer** handles everything related to window management. It is separated from :ref:`OS<class_OS>` as a single operating system may support multiple display servers.
|
|
|
|
|
|
\ **Headless mode:** Starting the engine with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` disables all rendering and window management functions. Most functions from **DisplayServer** will return dummy values in this case.
|
|
\ **Headless mode:** Starting the engine with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` disables all rendering and window management functions. Most functions from **DisplayServer** will return dummy values in this case.
|
|
|
|
|
|
@@ -758,7 +758,7 @@ I-beam cursor shape. This is used by default when hovering a control that accept
|
|
|
|
|
|
:ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_POINTING_HAND** = ``2``
|
|
:ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_POINTING_HAND** = ``2``
|
|
|
|
|
|
-Pointing hand cursor shape. This is used by default when hovering a :ref:`LinkButton<class_LinkButton>` or an URL tag in a :ref:`RichTextLabel<class_RichTextLabel>`.
|
|
|
|
|
|
+Pointing hand cursor shape. This is used by default when hovering a :ref:`LinkButton<class_LinkButton>` or a URL tag in a :ref:`RichTextLabel<class_RichTextLabel>`.
|
|
|
|
|
|
.. _class_DisplayServer_constant_CURSOR_CROSS:
|
|
.. _class_DisplayServer_constant_CURSOR_CROSS:
|
|
|
|
|
|
@@ -1018,7 +1018,7 @@ Use :ref:`window_set_window_buttons_offset<class_DisplayServer_method_window_set
|
|
|
|
|
|
Use :ref:`window_get_safe_title_margins<class_DisplayServer_method_window_get_safe_title_margins>` to determine area under the title bar that is not covered by decorations.
|
|
Use :ref:`window_get_safe_title_margins<class_DisplayServer_method_window_get_safe_title_margins>` to determine area under the title bar that is not covered by decorations.
|
|
|
|
|
|
-\ **Note:** This flag is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This flag is implemented only on macOS.
|
|
|
|
|
|
.. _class_DisplayServer_constant_WINDOW_FLAG_MOUSE_PASSTHROUGH:
|
|
.. _class_DisplayServer_constant_WINDOW_FLAG_MOUSE_PASSTHROUGH:
|
|
|
|
|
|
@@ -1094,7 +1094,7 @@ Sent when the user has attempted to close the window (e.g. close button is press
|
|
|
|
|
|
Sent when the device "Back" button is pressed, see :ref:`window_set_window_event_callback<class_DisplayServer_method_window_set_window_event_callback>`.
|
|
Sent when the device "Back" button is pressed, see :ref:`window_set_window_event_callback<class_DisplayServer_method_window_set_window_event_callback>`.
|
|
|
|
|
|
-\ **Note:** This event is implemented on Android.
|
|
|
|
|
|
+\ **Note:** This event is implemented only on Android.
|
|
|
|
|
|
.. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE:
|
|
.. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE:
|
|
|
|
|
|
@@ -1104,7 +1104,7 @@ Sent when the device "Back" button is pressed, see :ref:`window_set_window_event
|
|
|
|
|
|
Sent when the window is moved to the display with different DPI, or display DPI is changed, see :ref:`window_set_window_event_callback<class_DisplayServer_method_window_set_window_event_callback>`.
|
|
Sent when the window is moved to the display with different DPI, or display DPI is changed, see :ref:`window_set_window_event_callback<class_DisplayServer_method_window_set_window_event_callback>`.
|
|
|
|
|
|
-\ **Note:** This flag is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This flag is implemented only on macOS.
|
|
|
|
|
|
.. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE:
|
|
.. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE:
|
|
|
|
|
|
@@ -1114,7 +1114,7 @@ Sent when the window is moved to the display with different DPI, or display DPI
|
|
|
|
|
|
Sent when the window title bar decoration is changed (e.g. :ref:`WINDOW_FLAG_EXTEND_TO_TITLE<class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE>` is set or window entered/exited full screen mode), see :ref:`window_set_window_event_callback<class_DisplayServer_method_window_set_window_event_callback>`.
|
|
Sent when the window title bar decoration is changed (e.g. :ref:`WINDOW_FLAG_EXTEND_TO_TITLE<class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE>` is set or window entered/exited full screen mode), see :ref:`window_set_window_event_callback<class_DisplayServer_method_window_set_window_event_callback>`.
|
|
|
|
|
|
-\ **Note:** This flag is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This flag is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -1446,7 +1446,7 @@ Sets the default mouse cursor shape. The cursor's appearance will vary depending
|
|
|
|
|
|
Shows a text input dialog which uses the operating system's native look-and-feel. ``callback`` will be called with a :ref:`String<class_String>` argument equal to the text field's contents when the dialog is closed for any reason.
|
|
Shows a text input dialog which uses the operating system's native look-and-feel. ``callback`` will be called with a :ref:`String<class_String>` argument equal to the text field's contents when the dialog is closed for any reason.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -1460,7 +1460,7 @@ Shows a text input dialog which uses the operating system's native look-and-feel
|
|
|
|
|
|
Shows a text dialog which uses the operating system's native look-and-feel. ``callback`` will be called when the dialog is closed for any reason.
|
|
Shows a text dialog which uses the operating system's native look-and-feel. ``callback`` will be called when the dialog is closed for any reason.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -1474,7 +1474,7 @@ void **enable_for_stealing_focus** **(** :ref:`int<class_int>` process_id **)**
|
|
|
|
|
|
Allows the ``process_id`` PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID.
|
|
Allows the ``process_id`` PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID.
|
|
|
|
|
|
-\ **Note:** This method is implemented on Windows.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on Windows.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -1659,7 +1659,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
|
|
|
|
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
\ **Supported system menu IDs:**\
|
|
\ **Supported system menu IDs:**\
|
|
|
|
|
|
@@ -1686,7 +1686,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
|
|
|
|
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
\ **Supported system menu IDs:**\
|
|
\ **Supported system menu IDs:**\
|
|
|
|
|
|
@@ -1713,7 +1713,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
|
|
|
|
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
\ **Supported system menu IDs:**\
|
|
\ **Supported system menu IDs:**\
|
|
|
|
|
|
@@ -1742,7 +1742,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
|
|
|
|
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
\ **Supported system menu IDs:**\
|
|
\ **Supported system menu IDs:**\
|
|
|
|
|
|
@@ -1769,7 +1769,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
|
|
|
|
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
\ **Supported system menu IDs:**\
|
|
\ **Supported system menu IDs:**\
|
|
|
|
|
|
@@ -1800,7 +1800,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
|
|
|
|
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
\ **Supported system menu IDs:**\
|
|
\ **Supported system menu IDs:**\
|
|
|
|
|
|
@@ -1829,7 +1829,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
|
|
|
|
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
\ **Supported system menu IDs:**\
|
|
\ **Supported system menu IDs:**\
|
|
|
|
|
|
@@ -1852,7 +1852,7 @@ Adds a separator between items to the global menu with ID ``menu_root``. Separat
|
|
|
|
|
|
Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
|
|
Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
\ **Supported system menu IDs:**\
|
|
\ **Supported system menu IDs:**\
|
|
|
|
|
|
@@ -1875,7 +1875,7 @@ Adds an item that will act as a submenu of the global menu ``menu_root``. The ``
|
|
|
|
|
|
Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
|
|
Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
\ **Supported system menu IDs:**\
|
|
\ **Supported system menu IDs:**\
|
|
|
|
|
|
@@ -1896,7 +1896,7 @@ void **global_menu_clear** **(** :ref:`String<class_String>` menu_root **)**
|
|
|
|
|
|
Removes all items from the global menu with ID ``menu_root``.
|
|
Removes all items from the global menu with ID ``menu_root``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
\ **Supported system menu IDs:**\
|
|
\ **Supported system menu IDs:**\
|
|
|
|
|
|
@@ -1917,7 +1917,7 @@ Removes all items from the global menu with ID ``menu_root``.
|
|
|
|
|
|
Returns the accelerator of the item at index ``idx``. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
|
|
Returns the accelerator of the item at index ``idx``. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -1931,7 +1931,7 @@ Returns the accelerator of the item at index ``idx``. Accelerators are special c
|
|
|
|
|
|
Returns the callback of the item at index ``idx``.
|
|
Returns the callback of the item at index ``idx``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -1945,7 +1945,7 @@ Returns the callback of the item at index ``idx``.
|
|
|
|
|
|
Returns number of items in the global menu with ID ``menu_root``.
|
|
Returns number of items in the global menu with ID ``menu_root``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -1959,7 +1959,7 @@ Returns number of items in the global menu with ID ``menu_root``.
|
|
|
|
|
|
Returns the icon of the item at index ``idx``.
|
|
Returns the icon of the item at index ``idx``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -1973,7 +1973,7 @@ Returns the icon of the item at index ``idx``.
|
|
|
|
|
|
Returns the horizontal offset of the item at the given ``idx``.
|
|
Returns the horizontal offset of the item at the given ``idx``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -1987,7 +1987,7 @@ Returns the horizontal offset of the item at the given ``idx``.
|
|
|
|
|
|
Returns the index of the item with the specified ``tag``. Index is automatically assigned to each item by the engine. Index can not be set manually.
|
|
Returns the index of the item with the specified ``tag``. Index is automatically assigned to each item by the engine. Index can not be set manually.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2001,7 +2001,7 @@ Returns the index of the item with the specified ``tag``. Index is automatically
|
|
|
|
|
|
Returns the index of the item with the specified ``text``. Index is automatically assigned to each item by the engine. Index can not be set manually.
|
|
Returns the index of the item with the specified ``text``. Index is automatically assigned to each item by the engine. Index can not be set manually.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2015,7 +2015,7 @@ Returns the index of the item with the specified ``text``. Index is automaticall
|
|
|
|
|
|
Returns the callback of the item accelerator at index ``idx``.
|
|
Returns the callback of the item accelerator at index ``idx``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2029,7 +2029,7 @@ Returns the callback of the item accelerator at index ``idx``.
|
|
|
|
|
|
Returns number of states of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
|
|
Returns number of states of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2043,7 +2043,7 @@ Returns number of states of a multistate item. See :ref:`global_menu_add_multist
|
|
|
|
|
|
Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
|
|
Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2057,7 +2057,7 @@ Returns the state of a multistate item. See :ref:`global_menu_add_multistate_ite
|
|
|
|
|
|
Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_submenu_item<class_DisplayServer_method_global_menu_add_submenu_item>` for more info on how to add a submenu.
|
|
Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_submenu_item<class_DisplayServer_method_global_menu_add_submenu_item>` for more info on how to add a submenu.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2071,7 +2071,7 @@ Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_s
|
|
|
|
|
|
Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`global_menu_set_item_tag<class_DisplayServer_method_global_menu_set_item_tag>`, which provides a simple way of assigning context data to items.
|
|
Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`global_menu_set_item_tag<class_DisplayServer_method_global_menu_set_item_tag>`, which provides a simple way of assigning context data to items.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2085,7 +2085,7 @@ Returns the metadata of the specified item, which might be of any type. You can
|
|
|
|
|
|
Returns the text of the item at index ``idx``.
|
|
Returns the text of the item at index ``idx``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2099,7 +2099,7 @@ Returns the text of the item at index ``idx``.
|
|
|
|
|
|
Returns the tooltip associated with the specified index ``idx``.
|
|
Returns the tooltip associated with the specified index ``idx``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2113,7 +2113,7 @@ Returns the tooltip associated with the specified index ``idx``.
|
|
|
|
|
|
Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button.
|
|
Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2127,7 +2127,7 @@ Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if
|
|
|
|
|
|
Returns ``true`` if the item at index ``idx`` is checked.
|
|
Returns ``true`` if the item at index ``idx`` is checked.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2143,7 +2143,7 @@ Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled i
|
|
|
|
|
|
See :ref:`global_menu_set_item_disabled<class_DisplayServer_method_global_menu_set_item_disabled>` for more info on how to disable an item.
|
|
See :ref:`global_menu_set_item_disabled<class_DisplayServer_method_global_menu_set_item_disabled>` for more info on how to disable an item.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2159,7 +2159,7 @@ Returns ``true`` if the item at index ``idx`` has radio button-style checkabilit
|
|
|
|
|
|
\ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
|
|
\ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2175,7 +2175,7 @@ Removes the item at index ``idx`` from the global menu ``menu_root``.
|
|
|
|
|
|
\ **Note:** The indices of items after the removed item will be shifted by one.
|
|
\ **Note:** The indices of items after the removed item will be shifted by one.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2189,7 +2189,7 @@ void **global_menu_set_item_accelerator** **(** :ref:`String<class_String>` menu
|
|
|
|
|
|
Sets the accelerator of the item at index ``idx``. ``keycode`` can be a single :ref:`Key<enum_@GlobalScope_Key>`, or a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`).
|
|
Sets the accelerator of the item at index ``idx``. ``keycode`` can be a single :ref:`Key<enum_@GlobalScope_Key>`, or a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`).
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2205,7 +2205,7 @@ Sets the callback of the item at index ``idx``. Callback is emitted when an item
|
|
|
|
|
|
\ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created.
|
|
\ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2219,7 +2219,7 @@ void **global_menu_set_item_checkable** **(** :ref:`String<class_String>` menu_r
|
|
|
|
|
|
Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text.
|
|
Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2233,7 +2233,7 @@ void **global_menu_set_item_checked** **(** :ref:`String<class_String>` menu_roo
|
|
|
|
|
|
Sets the checkstate status of the item at index ``idx``.
|
|
Sets the checkstate status of the item at index ``idx``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2247,7 +2247,7 @@ void **global_menu_set_item_disabled** **(** :ref:`String<class_String>` menu_ro
|
|
|
|
|
|
Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked.
|
|
Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2261,7 +2261,7 @@ void **global_menu_set_item_icon** **(** :ref:`String<class_String>` menu_root,
|
|
|
|
|
|
Replaces the :ref:`Texture2D<class_Texture2D>` icon of the specified ``idx``.
|
|
Replaces the :ref:`Texture2D<class_Texture2D>` icon of the specified ``idx``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
\ **Note:** This method is not supported by macOS "_dock" menu items.
|
|
\ **Note:** This method is not supported by macOS "_dock" menu items.
|
|
|
|
|
|
@@ -2277,7 +2277,7 @@ void **global_menu_set_item_indentation_level** **(** :ref:`String<class_String>
|
|
|
|
|
|
Sets the horizontal offset of the item at the given ``idx``.
|
|
Sets the horizontal offset of the item at the given ``idx``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2293,7 +2293,7 @@ Sets the callback of the item at index ``idx``. Callback is emitted when its acc
|
|
|
|
|
|
\ **Note:** The ``key_callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created.
|
|
\ **Note:** The ``key_callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2307,7 +2307,7 @@ void **global_menu_set_item_max_states** **(** :ref:`String<class_String>` menu_
|
|
|
|
|
|
Sets number of state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
|
|
Sets number of state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2323,7 +2323,7 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f
|
|
|
|
|
|
\ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
|
|
\ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2337,7 +2337,7 @@ void **global_menu_set_item_state** **(** :ref:`String<class_String>` menu_root,
|
|
|
|
|
|
Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
|
|
Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2351,7 +2351,7 @@ void **global_menu_set_item_submenu** **(** :ref:`String<class_String>` menu_roo
|
|
|
|
|
|
Sets the submenu of the item at index ``idx``. The submenu is the ID of a global menu root that would be shown when the item is clicked.
|
|
Sets the submenu of the item at index ``idx``. The submenu is the ID of a global menu root that would be shown when the item is clicked.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2365,7 +2365,7 @@ void **global_menu_set_item_tag** **(** :ref:`String<class_String>` menu_root, :
|
|
|
|
|
|
Sets the metadata of an item, which may be of any type. You can later get it with :ref:`global_menu_get_item_tag<class_DisplayServer_method_global_menu_get_item_tag>`, which provides a simple way of assigning context data to items.
|
|
Sets the metadata of an item, which may be of any type. You can later get it with :ref:`global_menu_get_item_tag<class_DisplayServer_method_global_menu_get_item_tag>`, which provides a simple way of assigning context data to items.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2379,7 +2379,7 @@ void **global_menu_set_item_text** **(** :ref:`String<class_String>` menu_root,
|
|
|
|
|
|
Sets the text of the item at index ``idx``.
|
|
Sets the text of the item at index ``idx``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2393,7 +2393,7 @@ void **global_menu_set_item_tooltip** **(** :ref:`String<class_String>` menu_roo
|
|
|
|
|
|
Sets the :ref:`String<class_String>` tooltip of the item at the specified index ``idx``.
|
|
Sets the :ref:`String<class_String>` tooltip of the item at the specified index ``idx``.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2419,7 +2419,7 @@ Returns ``true`` if the specified ``feature`` is supported by the current **Disp
|
|
|
|
|
|
Returns the text selection in the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ composition string, with the :ref:`Vector2i<class_Vector2i>`'s ``x`` component being the caret position and ``y`` being the length of the selection.
|
|
Returns the text selection in the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ composition string, with the :ref:`Vector2i<class_Vector2i>`'s ``x`` component being the caret position and ``y`` being the length of the selection.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2433,7 +2433,7 @@ Returns the text selection in the `Input Method Editor <https://en.wikipedia.org
|
|
|
|
|
|
Returns the composition string contained within the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ window.
|
|
Returns the composition string contained within the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ window.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2676,7 +2676,7 @@ Returns the greatest scale factor of all screens.
|
|
|
|
|
|
\ **Note:** On macOS returned value is ``2.0`` if there is at least one hiDPI (Retina) screen in the system, and ``1.0`` in all other cases.
|
|
\ **Note:** On macOS returned value is ``2.0`` if there is at least one hiDPI (Retina) screen in the system, and ``1.0`` in all other cases.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2767,7 +2767,7 @@ Returns the scale factor of the specified screen by index.
|
|
|
|
|
|
\ **Note:** On macOS returned value is ``2.0`` for hiDPI (Retina) screen, and ``1.0`` for all other cases.
|
|
\ **Note:** On macOS returned value is ``2.0`` for hiDPI (Retina) screen, and ``1.0`` for all other cases.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2865,7 +2865,7 @@ Sets the window icon (usually displayed in the top-left corner) in the operating
|
|
|
|
|
|
Returns current active tablet driver name.
|
|
Returns current active tablet driver name.
|
|
|
|
|
|
-\ **Note:** This method is implemented on Windows.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on Windows.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2879,7 +2879,7 @@ Returns current active tablet driver name.
|
|
|
|
|
|
Returns the total number of available tablet drivers.
|
|
Returns the total number of available tablet drivers.
|
|
|
|
|
|
-\ **Note:** This method is implemented on Windows.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on Windows.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2893,7 +2893,7 @@ Returns the total number of available tablet drivers.
|
|
|
|
|
|
Returns the tablet driver name for the given index.
|
|
Returns the tablet driver name for the given index.
|
|
|
|
|
|
-\ **Note:** This method is implemented on Windows.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on Windows.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -2907,7 +2907,7 @@ void **tablet_set_current_driver** **(** :ref:`String<class_String>` name **)**
|
|
|
|
|
|
Set active tablet driver name.
|
|
Set active tablet driver name.
|
|
|
|
|
|
-\ **Note:** This method is implemented on Windows.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on Windows.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -3181,7 +3181,7 @@ Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID<class_DisplayS
|
|
|
|
|
|
:ref:`int<class_int>` **window_get_attached_instance_id** **(** :ref:`int<class_int>` window_id=0 **)** |const|
|
|
:ref:`int<class_int>` **window_get_attached_instance_id** **(** :ref:`int<class_int>` window_id=0 **)** |const|
|
|
|
|
|
|
-Returns the :ref:`Object.get_instance_id<class_Object_method_get_instance_id>` of the :ref:`Window<class_Window>` the ``window_id`` is attached to. also :ref:`window_get_attached_instance_id<class_DisplayServer_method_window_get_attached_instance_id>`.
|
|
|
|
|
|
+Returns the :ref:`Object.get_instance_id<class_Object_method_get_instance_id>` of the :ref:`Window<class_Window>` the ``window_id`` is attached to.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -3365,7 +3365,7 @@ Returns ``true`` if the given window can be maximized (the maximize button is en
|
|
|
|
|
|
Returns ``true``, if double-click on a window title should maximize it.
|
|
Returns ``true``, if double-click on a window title should maximize it.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -3379,7 +3379,7 @@ Returns ``true``, if double-click on a window title should maximize it.
|
|
|
|
|
|
Returns ``true``, if double-click on a window title should minimize it.
|
|
Returns ``true``, if double-click on a window title should minimize it.
|
|
|
|
|
|
-\ **Note:** This method is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This method is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
@@ -3725,7 +3725,7 @@ void **window_set_window_buttons_offset** **(** :ref:`Vector2i<class_Vector2i>`
|
|
|
|
|
|
When :ref:`WINDOW_FLAG_EXTEND_TO_TITLE<class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE>` flag is set, set offset to the center of the first titlebar button.
|
|
When :ref:`WINDOW_FLAG_EXTEND_TO_TITLE<class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE>` flag is set, set offset to the center of the first titlebar button.
|
|
|
|
|
|
-\ **Note:** This flag is implemented on macOS.
|
|
|
|
|
|
+\ **Note:** This flag is implemented only on macOS.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|