Files
godot-docs-l10n/classes/uk/class_window.rst
Rémi Verschelde c3f2364c10 Sync classref with 4.6 branch
Lots of translations invalidated (fuzzied) as we just synced Weblate.
2025-12-19 16:39:51 +01:00

2937 lines
181 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_Window:
Window
======
**Успадковує:** :ref:`Viewport<class_Viewport>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
**Успадковано від:** :ref:`AcceptDialog<class_AcceptDialog>`, :ref:`Popup<class_Popup>`
Базовий клас для всіх вікон, діалогів та спливаючих вікон.
.. rst-class:: classref-introduction-group
Опис
--------
Вузол, який створює вікно. Вікно може бути або власним системним вікном, або вбудованим в інше **Window** (див. :ref:`Viewport.gui_embed_subwindows<class_Viewport_property_gui_embed_subwindows>`).
Під час виконання **Window** не закриваються автоматично за запитом. Вам потрібно керувати цим вручну за допомогою сигналу :ref:`close_requested<class_Window_signal_close_requested>` (це стосується як натискання кнопки закриття, так і кліку за межами спливаючого вікна).
.. rst-class:: classref-reftable-group
Властивості
----------------------
.. table::
:widths: auto
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`String<class_String>` | :ref:`accessibility_description<class_Window_property_accessibility_description>` | ``""`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`String<class_String>` | :ref:`accessibility_name<class_Window_property_accessibility_name>` | ``""`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`always_on_top<class_Window_property_always_on_top>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`auto_translate<class_Window_property_auto_translate>` | |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`borderless<class_Window_property_borderless>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` | :ref:`content_scale_aspect<class_Window_property_content_scale_aspect>` | ``0`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`float<class_float>` | :ref:`content_scale_factor<class_Window_property_content_scale_factor>` | ``1.0`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` | :ref:`content_scale_mode<class_Window_property_content_scale_mode>` | ``0`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`Vector2i<class_Vector2i>` | :ref:`content_scale_size<class_Window_property_content_scale_size>` | ``Vector2i(0, 0)`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` | :ref:`content_scale_stretch<class_Window_property_content_scale_stretch>` | ``0`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`int<class_int>` | :ref:`current_screen<class_Window_property_current_screen>` | |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`exclude_from_capture<class_Window_property_exclude_from_capture>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`exclusive<class_Window_property_exclusive>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`extend_to_title<class_Window_property_extend_to_title>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`force_native<class_Window_property_force_native>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` | :ref:`initial_position<class_Window_property_initial_position>` | ``0`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`keep_title_visible<class_Window_property_keep_title_visible>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`Vector2i<class_Vector2i>` | :ref:`max_size<class_Window_property_max_size>` | ``Vector2i(0, 0)`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`maximize_disabled<class_Window_property_maximize_disabled>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`Vector2i<class_Vector2i>` | :ref:`min_size<class_Window_property_min_size>` | ``Vector2i(0, 0)`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`minimize_disabled<class_Window_property_minimize_disabled>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`Mode<enum_Window_Mode>` | :ref:`mode<class_Window_property_mode>` | ``0`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`mouse_passthrough<class_Window_property_mouse_passthrough>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`mouse_passthrough_polygon<class_Window_property_mouse_passthrough_polygon>` | ``PackedVector2Array()`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`Rect2i<class_Rect2i>` | :ref:`nonclient_area<class_Window_property_nonclient_area>` | ``Rect2i(0, 0, 0, 0)`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`popup_window<class_Window_property_popup_window>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`popup_wm_hint<class_Window_property_popup_wm_hint>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`Vector2i<class_Vector2i>` | :ref:`position<class_Window_property_position>` | ``Vector2i(0, 0)`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`sharp_corners<class_Window_property_sharp_corners>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`Vector2i<class_Vector2i>` | :ref:`size<class_Window_property_size>` | ``Vector2i(100, 100)`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`Theme<class_Theme>` | :ref:`theme<class_Window_property_theme>` | |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`StringName<class_StringName>` | :ref:`theme_type_variation<class_Window_property_theme_type_variation>` | ``&""`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`String<class_String>` | :ref:`title<class_Window_property_title>` | ``""`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`transient<class_Window_property_transient>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`transient_to_focused<class_Window_property_transient_to_focused>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`transparent<class_Window_property_transparent>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`unfocusable<class_Window_property_unfocusable>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`unresizable<class_Window_property_unresizable>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`visible<class_Window_property_visible>` | ``true`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`wrap_controls<class_Window_property_wrap_controls>` | ``false`` |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
.. rst-class:: classref-reftable-group
Методи
------------
.. table::
:widths: auto
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`_get_contents_minimum_size<class_Window_private_method__get_contents_minimum_size>`\ (\ ) |virtual| |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_theme_color_override<class_Window_method_add_theme_color_override>`\ (\ name\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_theme_constant_override<class_Window_method_add_theme_constant_override>`\ (\ name\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_theme_font_override<class_Window_method_add_theme_font_override>`\ (\ name\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_theme_font_size_override<class_Window_method_add_theme_font_size_override>`\ (\ name\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_theme_icon_override<class_Window_method_add_theme_icon_override>`\ (\ name\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_theme_stylebox_override<class_Window_method_add_theme_stylebox_override>`\ (\ name\: :ref:`StringName<class_StringName>`, stylebox\: :ref:`StyleBox<class_StyleBox>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`begin_bulk_theme_override<class_Window_method_begin_bulk_theme_override>`\ (\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`can_draw<class_Window_method_can_draw>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`child_controls_changed<class_Window_method_child_controls_changed>`\ (\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`end_bulk_theme_override<class_Window_method_end_bulk_theme_override>`\ (\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`get_contents_minimum_size<class_Window_method_get_contents_minimum_size>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_flag<class_Window_method_get_flag>`\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Window<class_Window>` | :ref:`get_focused_window<class_Window_method_get_focused_window>`\ (\ ) |static| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`LayoutDirection<enum_Window_LayoutDirection>` | :ref:`get_layout_direction<class_Window_method_get_layout_direction>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2i<class_Vector2i>` | :ref:`get_position_with_decorations<class_Window_method_get_position_with_decorations>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2i<class_Vector2i>` | :ref:`get_size_with_decorations<class_Window_method_get_size_with_decorations>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`get_theme_color<class_Window_method_get_theme_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_theme_constant<class_Window_method_get_theme_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_theme_default_base_scale<class_Window_method_get_theme_default_base_scale>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Font<class_Font>` | :ref:`get_theme_default_font<class_Window_method_get_theme_default_font>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_theme_default_font_size<class_Window_method_get_theme_default_font_size>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Font<class_Font>` | :ref:`get_theme_font<class_Window_method_get_theme_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_theme_font_size<class_Window_method_get_theme_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_theme_icon<class_Window_method_get_theme_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`get_theme_stylebox<class_Window_method_get_theme_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_window_id<class_Window_method_get_window_id>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`grab_focus<class_Window_method_grab_focus>`\ (\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_focus<class_Window_method_has_focus>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_color<class_Window_method_has_theme_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_color_override<class_Window_method_has_theme_color_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_constant<class_Window_method_has_theme_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_constant_override<class_Window_method_has_theme_constant_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_font<class_Window_method_has_theme_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_font_override<class_Window_method_has_theme_font_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_font_size<class_Window_method_has_theme_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_font_size_override<class_Window_method_has_theme_font_size_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_icon<class_Window_method_has_theme_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_icon_override<class_Window_method_has_theme_icon_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_stylebox<class_Window_method_has_theme_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_stylebox_override<class_Window_method_has_theme_stylebox_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`hide<class_Window_method_hide>`\ (\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_embedded<class_Window_method_is_embedded>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_layout_rtl<class_Window_method_is_layout_rtl>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_maximize_allowed<class_Window_method_is_maximize_allowed>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_using_font_oversampling<class_Window_method_is_using_font_oversampling>`\ (\ ) |const| |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`move_to_center<class_Window_method_move_to_center>`\ (\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`move_to_foreground<class_Window_method_move_to_foreground>`\ (\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup<class_Window_method_popup>`\ (\ rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_centered<class_Window_method_popup_centered>`\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_centered_clamped<class_Window_method_popup_centered_clamped>`\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_centered_ratio<class_Window_method_popup_centered_ratio>`\ (\ ratio\: :ref:`float<class_float>` = 0.8\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_exclusive<class_Window_method_popup_exclusive>`\ (\ from_node\: :ref:`Node<class_Node>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_exclusive_centered<class_Window_method_popup_exclusive_centered>`\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_exclusive_centered_clamped<class_Window_method_popup_exclusive_centered_clamped>`\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_exclusive_centered_ratio<class_Window_method_popup_exclusive_centered_ratio>`\ (\ from_node\: :ref:`Node<class_Node>`, ratio\: :ref:`float<class_float>` = 0.8\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_exclusive_on_parent<class_Window_method_popup_exclusive_on_parent>`\ (\ from_node\: :ref:`Node<class_Node>`, parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_on_parent<class_Window_method_popup_on_parent>`\ (\ parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_theme_color_override<class_Window_method_remove_theme_color_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_theme_constant_override<class_Window_method_remove_theme_constant_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_theme_font_override<class_Window_method_remove_theme_font_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_theme_font_size_override<class_Window_method_remove_theme_font_size_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_theme_icon_override<class_Window_method_remove_theme_icon_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_theme_stylebox_override<class_Window_method_remove_theme_stylebox_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`request_attention<class_Window_method_request_attention>`\ (\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`reset_size<class_Window_method_reset_size>`\ (\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_flag<class_Window_method_set_flag>`\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_ime_active<class_Window_method_set_ime_active>`\ (\ active\: :ref:`bool<class_bool>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_ime_position<class_Window_method_set_ime_position>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_layout_direction<class_Window_method_set_layout_direction>`\ (\ direction\: :ref:`LayoutDirection<enum_Window_LayoutDirection>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when_invisible>`\ (\ unparent\: :ref:`bool<class_bool>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_use_font_oversampling<class_Window_method_set_use_font_oversampling>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`show<class_Window_method_show>`\ (\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`start_drag<class_Window_method_start_drag>`\ (\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`start_resize<class_Window_method_start_resize>`\ (\ edge\: :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>`\ ) |
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-reftable-group
Властивості теми
--------------------------------
.. table::
:widths: auto
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Color<class_Color>` | :ref:`title_color<class_Window_theme_color_title_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Color<class_Color>` | :ref:`title_outline_modulate<class_Window_theme_color_title_outline_modulate>` | ``Color(0, 0, 0, 1)`` |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`int<class_int>` | :ref:`close_h_offset<class_Window_theme_constant_close_h_offset>` | ``18`` |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`int<class_int>` | :ref:`close_v_offset<class_Window_theme_constant_close_v_offset>` | ``24`` |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`int<class_int>` | :ref:`resize_margin<class_Window_theme_constant_resize_margin>` | ``4`` |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`int<class_int>` | :ref:`title_height<class_Window_theme_constant_title_height>` | ``36`` |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`int<class_int>` | :ref:`title_outline_size<class_Window_theme_constant_title_outline_size>` | ``0`` |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Font<class_Font>` | :ref:`title_font<class_Window_theme_font_title_font>` | |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`int<class_int>` | :ref:`title_font_size<class_Window_theme_font_size_title_font_size>` | |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`close<class_Window_theme_icon_close>` | |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`close_pressed<class_Window_theme_icon_close_pressed>` | |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`embedded_border<class_Window_theme_style_embedded_border>` | |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`embedded_unfocused_border<class_Window_theme_style_embedded_unfocused_border>` | |
+-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Сигнали
--------------
.. _class_Window_signal_about_to_popup:
.. rst-class:: classref-signal
**about_to_popup**\ (\ ) :ref:`🔗<class_Window_signal_about_to_popup>`
Викликається одразу після виклику :ref:`popup()<class_Window_method_popup>`, перед тим, як з'явиться **Window** або виконати будь-які дії.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_close_requested:
.. rst-class:: classref-signal
**close_requested**\ (\ ) :ref:`🔗<class_Window_signal_close_requested>`
Увімкнено, коли натиснута кнопка **Window** або при включенні :ref:`popup_window<class_Window_property_popup_window>` та натискає на вікно.
Цей сигнал можна використовувати для обробки вікон, наприклад, за допомогою підключення його до :ref:`hide()<class_Window_method_hide>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_dpi_changed:
.. rst-class:: classref-signal
**dpi_changed**\ (\ ) :ref:`🔗<class_Window_signal_dpi_changed>`
Видається, коли роздільна здатність **Window** змінюється в результаті змін на рівні ОС (наприклад, переміщення вікна з дисплея Retina на дисплей з нижчою роздільною здатністю).
\ **Примітка:** Реалізовано лише на macOS та Linux (Wayland).
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_files_dropped:
.. rst-class:: classref-signal
**files_dropped**\ (\ files\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_Window_signal_files_dropped>`
Видається, коли файли перетягуються з диспетчера файлів ОС і скидаються у вікно гри. Аргументом є список шляхів до файлів.
::
func _ready():
get_window().files_dropped.connect(on_files_dropped)
func on_files_dropped(file):
друк (file)
\ **Примітка: ** Цей сигнал працює лише з рідними вікнами, тобто головним вікном і вузлами, похідними від **Window**, коли :ref:`Viewport.gui_embed_subwindows<class_Viewport_property_gui_embed_subwindows>` вимкнено в головному вікні перегляду.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_focus_entered:
.. rst-class:: classref-signal
**focus_entered**\ (\ ) :ref:`🔗<class_Window_signal_focus_entered>`
Увімкніть, коли **Window** отримує фокус.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_focus_exited:
.. rst-class:: classref-signal
**focus_exited**\ (\ ) :ref:`🔗<class_Window_signal_focus_exited>`
Увімкніть, коли **Window** втратить свою увагу.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_go_back_requested:
.. rst-class:: classref-signal
**go_back_requested**\ (\ ) :ref:`🔗<class_Window_signal_go_back_requested>`
Увімкнено, коли відправиться запит назад (наприклад, натискання кнопки "Back" на Андроїд), прямо після [constant Node. УВАГА.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_mouse_entered:
.. rst-class:: classref-signal
**mouse_entered**\ (\ ) :ref:`🔗<class_Window_signal_mouse_entered>`
Увімкнено, коли курсор мишки входить до видимої області **Window**, що не входить до інших :ref:`Control<class_Control>` або вікна, що надавалися його :ref:`Viewport.gui_disable_input<class_Viewport_property_gui_disable_input>` ``false`` і незалежно від того, чи зараз він зосередився або ні.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_mouse_exited:
.. rst-class:: classref-signal
**mouse_exited**\ (\ ) :ref:`🔗<class_Window_signal_mouse_exited>`
Увімкнено, коли курсор мишки залишає видиму площу **Window**, яка не входить за межі інших :ref:`Control<class_Control>` або вікна, надавалася його :ref:`Viewport._guiable_input<class_Viewport_property__guiable_input>` ``false`` і незалежно від того, чи зараз він зосередився або ні.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_nonclient_window_input:
.. rst-class:: classref-signal
**nonclient_window_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) :ref:`🔗<class_Window_signal_nonclient_window_input>`
Emitted when the mouse event is received by the custom decoration area defined by :ref:`nonclient_area<class_Window_property_nonclient_area>`, and normal input to the window is blocked (such as when it has an exclusive child opened). ``event``'s position is in the embedder's coordinate system.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_theme_changed:
.. rst-class:: classref-signal
**theme_changed**\ (\ ) :ref:`🔗<class_Window_signal_theme_changed>`
Увімкнено, коли надсилається повідомлення про невідповідність :ref:`NOTIFICATION_THEME_CHANGED<class_Window_constant_NOTIFICATION_THEME_CHANGED>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_title_changed:
.. rst-class:: classref-signal
**title_changed**\ (\ ) :ref:`🔗<class_Window_signal_title_changed>`
Видається під час зміни тексту рядка заголовка вікна.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_titlebar_changed:
.. rst-class:: classref-signal
**titlebar_changed**\ (\ ) :ref:`🔗<class_Window_signal_titlebar_changed>`
Увімкнено при зміні віконного титулу штрихів, наприклад, вікна MacOS вводять/випускають повноекранний режим, або змінено розширений до назви.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_visibility_changed:
.. rst-class:: classref-signal
**visibility_changed**\ (\ ) :ref:`🔗<class_Window_signal_visibility_changed>`
Увімкнено, коли **Window** видно або зникає.
.. rst-class:: classref-item-separator
----
.. _class_Window_signal_window_input:
.. rst-class:: classref-signal
**window_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) :ref:`🔗<class_Window_signal_window_input>`
Увімкнути, коли **Window** в даний час зосереджено і отримує будь-який вхід, пройшовши отриманий захід як аргумент. Посада заходу, якщо присутній, знаходиться в координатній системі посольства.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Переліки
----------------
.. _enum_Window_Mode:
.. rst-class:: classref-enumeration
enum **Mode**: :ref:`🔗<enum_Window_Mode>`
.. _class_Window_constant_MODE_WINDOWED:
.. rst-class:: classref-enumeration-constant
:ref:`Mode<enum_Window_Mode>` **MODE_WINDOWED** = ``0``
Ввімкнений режим, тобто **Window** не займає всього екрана (незалежно від розміру екрана).
.. _class_Window_constant_MODE_MINIMIZED:
.. rst-class:: classref-enumeration-constant
:ref:`Mode<enum_Window_Mode>` **MODE_MINIMIZED** = ``1``
Мінімізований віконний режим, тобто **Window** не видно і доступний у віконному списку вікон. Зазвичай відбувається при натисканні кнопки мінімізації.
.. _class_Window_constant_MODE_MAXIMIZED:
.. rst-class:: classref-enumeration-constant
:ref:`Mode<enum_Window_Mode>` **MODE_MAXIMIZED** = ``2``
Максимальний режим вікна, тобто **Window** буде займати всю площу екрана, крім бару завдання і ще відображати її кордони. Зазвичай відбувається при натисканні кнопки максимальна кнопка.
.. _class_Window_constant_MODE_FULLSCREEN:
.. rst-class:: classref-enumeration-constant
:ref:`Mode<enum_Window_Mode>` **MODE_FULLSCREEN** = ``3``
Повноекранний режим з повною підтримкою кількох вікон.
Повноекранне вікно охоплює всю площу екрана та не має жодних декорацій. Відеоекранний режим дисплея не змінюється.
\ **На Android:** Це вмикає режим занурення.
\ **На macOS:** Для відображення запущеного проекту використовується новий робочий стіл.
\ **Примітка:** Незалежно від платформи, увімкнення повноекранного режиму змінить розмір вікна відповідно до розміру монітора. Тому переконайтеся, що ваш проект підтримує :doc:`кілька роздільних здатностей <../tutorials/rendering/multiple_resolutions>` під час увімкнення повноекранного режиму.
.. _class_Window_constant_MODE_EXCLUSIVE_FULLSCREEN:
.. rst-class:: classref-enumeration-constant
:ref:`Mode<enum_Window_Mode>` **MODE_EXCLUSIVE_FULLSCREEN** = ``4``
Повноекранний режим одного вікна. Цей режим має менше накладних витрат, але на даному екрані одночасно може бути відкрито лише одне вікно (відкриття дочірнього вікна або перемикання програм призведе до переходу на весь екран).
Повноекранне вікно охоплює всю область відображення екрана та не має рамок чи декорацій. Відеоекранний режим дисплея не змінюється.
\ **Примітка:** Цей режим може не працювати з програмним забезпеченням для запису екрана.
\ **На Android:** Це вмикає режим занурення.
\ **На Windows:** Залежно від відеодрайвера, перехід на весь екран може призвести до того, що екрани на мить стануть чорними.
\ **На macOS:** Для відображення запущеного проекту використовується новий робочий стіл. Ексклюзивний повноекранний режим запобігає відображенню Dock та Menu, коли вказівник миші знаходиться на краю екрана.
\ **На Linux (X11):** Ексклюзивний повноекранний режим обходить композитор.
\ **На Linux (Wayland):** Еквівалентно :ref:`MODE_FULLSCREEN<class_Window_constant_MODE_FULLSCREEN>`.
\ **Примітка:** Незалежно від платформи, увімкнення повноекранного режиму змінить розмір вікна відповідно до розміру монітора. Тому переконайтеся, що ваш проект підтримує :doc:`кілька роздільних здатностей <../tutorials/rendering/multiple_resolutions>` під час увімкнення повноекранного режиму.
.. rst-class:: classref-item-separator
----
.. _enum_Window_Flags:
.. rst-class:: classref-enumeration
enum **Flags**: :ref:`🔗<enum_Window_Flags>`
.. _class_Window_constant_FLAG_RESIZE_DISABLED:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_RESIZE_DISABLED** = ``0``
Розмір вікна не можна змінити, перетягнувши його ручку зміни розміру. Розмір вікна все ще можна змінити за допомогою :ref:`size<class_Window_property_size>`. Цей прапорець ігнорується для повноекранних вікон. Встановлюється за допомогою :ref:`unresizable<class_Window_property_unresizable>`.
.. _class_Window_constant_FLAG_BORDERLESS:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_BORDERLESS** = ``1``
Вікно не має рідних титульних барів та інших прикрас. Цей прапор ігнорується для повноекранних вікон. Набір з :ref:`borderless<class_Window_property_borderless>`.
.. _class_Window_constant_FLAG_ALWAYS_ON_TOP:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_ALWAYS_ON_TOP** = ``2``
Вікно пливе поверх всіх інших вікон. Цей прапор ігнорується для повноекранних вікон. Набір з :ref:`always_on_top<class_Window_property_always_on_top>`.
.. _class_Window_constant_FLAG_TRANSPARENT:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_TRANSPARENT** = ``3``
Віковий фон може бути прозорим. Набір з :ref:`transparent<class_Window_property_transparent>`.
\ **Примітка:** Цей прапор не має ефекту, якщо або :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>`, або вікна :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` встановлюється на ``false``.
.. _class_Window_constant_FLAG_NO_FOCUS:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_NO_FOCUS** = ``4``
Вікно не може бути зосередженим. Безконтактне вікно ігнорує всі вводи, крім кліків миші. Набір з :ref:`unfocusable<class_Window_property_unfocusable>`.
.. _class_Window_constant_FLAG_POPUP:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_POPUP** = ``5``
Вікно є частиною меню або ``Налаштування кнопки`` випадання. Цей прапор не може бути змінений, коли вікно видно. Активний спливаючий вікно буде отримувати тільки всі вхідні, не вкрасивши фокус від свого батька. При використанні натиснути за її межами, або при вимкненні програми. Вікна попуп повинна мати хідний набір батьків (див. :ref:`transient<class_Window_property_transient>`).
\ **Примітка:** Цей прапор не впливає на вбудовані вікна (безкоштовно зазначене вікно є :ref:`Popup<class_Popup>`).
.. _class_Window_constant_FLAG_EXTEND_TO_TITLE:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_EXTEND_TO_TITLE** = ``6``
Вміст вікон розширюється до повного розміру вікна. На відміну від без кордонів вікно, рама залишається неактуальним і може бути використана для зміни вікна, рядок заголовка прозора, але мають мінімізацію/максимізувати/закривати кнопки. Набір з :ref:`extend_to_title<class_Window_property_extend_to_title>`.
\ **Примітка:** Цей прапор реалізується тільки на macOS.
\ **Примітка:** Цей прапор не впливає на вбудовані вікна.
.. _class_Window_constant_FLAG_MOUSE_PASSTHROUGH:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_MOUSE_PASSTHROUGH** = ``7``
Всі події мишки пропускаються до основного вікна того ж програми.
\ **Примітка:** Цей прапор не впливає на вбудовані вікна.
.. _class_Window_constant_FLAG_SHARP_CORNERS:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_SHARP_CORNERS** = ``8``
Стиль вікна перевизначено, створюючи гострі кути.
\ **Примітка:** цей прапорець не діє на вбудовані вікна.
\ **Примітка:** цей прапор реалізований лише у Windows (11).
.. _class_Window_constant_FLAG_EXCLUDE_FROM_CAPTURE:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_EXCLUDE_FROM_CAPTURE** = ``9``
Windows виключається зі знімків екрана, зроблених за допомогою :ref:`DisplayServer.screen_get_image()<class_DisplayServer_method_screen_get_image>`, :ref:`DisplayServer.screen_get_image_rect()<class_DisplayServer_method_screen_get_image_rect>` та :ref:`DisplayServer.screen_get_pixel()<class_DisplayServer_method_screen_get_pixel>`.
\ **Примітка:** Цей прапор не діє у вбудованих вікнах.
\ **Примітка:** Цей прапор реалізований в macOS і Windows (10, 20H1).
\ **Примітка:** Встановлення цього прапора запобігає захопленню зображення вікна стандартними методами створення знімків екрана, але **НЕ** гарантує, що інші програми не зможуть захопити зображення. Його не слід використовувати як засіб DRM або заходи безпеки.
.. _class_Window_constant_FLAG_POPUP_WM_HINT:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_POPUP_WM_HINT** = ``10``
Сигналізує менеджеру вікон, що це вікно має бути визначеним реалізацією "спливаючим вікном" (зазвичай плаваючим, безрамковим, незнімним дочірнім вікном).
.. _class_Window_constant_FLAG_MINIMIZE_DISABLED:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_MINIMIZE_DISABLED** = ``11``
Кнопка мінімізації вікна вимкнена.
\ **Примітка:** Цей прапорець реалізовано в macOS та Windows.
.. _class_Window_constant_FLAG_MAXIMIZE_DISABLED:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_MAXIMIZE_DISABLED** = ``12``
Кнопка розгортання вікна вимкнена.
\ **Примітка:** Цей прапорець реалізовано в macOS та Windows.
.. _class_Window_constant_FLAG_MAX:
.. rst-class:: classref-enumeration-constant
:ref:`Flags<enum_Window_Flags>` **FLAG_MAX** = ``13``
Макс. значення :ref:`Flags<enum_Window_Flags>`.
.. rst-class:: classref-item-separator
----
.. _enum_Window_ContentScaleMode:
.. rst-class:: classref-enumeration
enum **ContentScaleMode**: :ref:`🔗<enum_Window_ContentScaleMode>`
.. _class_Window_constant_CONTENT_SCALE_MODE_DISABLED:
.. rst-class:: classref-enumeration-constant
:ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **CONTENT_SCALE_MODE_DISABLED** = ``0``
Зміст не буде масштабовано відповідно до розміру **Window**.
.. _class_Window_constant_CONTENT_SCALE_MODE_CANVAS_ITEMS:
.. rst-class:: classref-enumeration-constant
:ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **CONTENT_SCALE_MODE_CANVAS_ITEMS** = ``1``
Зміст буде надано за розміром цілі. Це більше продуктивності, ніж :ref:`CONTENT_SCALE_MODE_VIEWPORT<class_Window_constant_CONTENT_SCALE_MODE_VIEWPORT>`, але забезпечує кращі результати.
.. _class_Window_constant_CONTENT_SCALE_MODE_VIEWPORT:
.. rst-class:: classref-enumeration-constant
:ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **CONTENT_SCALE_MODE_VIEWPORT** = ``2``
Зміст буде надано в базовому розмірі, а потім масштабовано до розміру цілі. Більшість виконавців, ніж :ref:`CONTENT_SCALE_MODE_CANVAS_ITEMS<class_Window_constant_CONTENT_SCALE_MODE_CANVAS_ITEMS>`, але результати у зображеннях, що напилюється.
.. rst-class:: classref-item-separator
----
.. _enum_Window_ContentScaleAspect:
.. rst-class:: classref-enumeration
enum **ContentScaleAspect**: :ref:`🔗<enum_Window_ContentScaleAspect>`
.. _class_Window_constant_CONTENT_SCALE_ASPECT_IGNORE:
.. rst-class:: classref-enumeration-constant
:ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_IGNORE** = ``0``
Аспект буде ігноруватися. Скальлінг просто розтягувати вміст, щоб відповідати розміру цілі.
.. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP:
.. rst-class:: classref-enumeration-constant
:ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_KEEP** = ``1``
Збережений контент. Якщо розмір цілі має різний аспект з підстави, зображення буде відцентровано і з’явиться на лівих і правих сторонах.
.. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_WIDTH:
.. rst-class:: classref-enumeration-constant
:ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_KEEP_WIDTH** = ``2``
Зміст може бути розширений вертикально. Скальцій горизонтально призведе до збереження коефіцієнта ширини, а потім на лівих і правих сторонах.
.. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_HEIGHT:
.. rst-class:: classref-enumeration-constant
:ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_KEEP_HEIGHT** = ``3``
Зміст може бути розширений горизонтально. Скальлінг вертикально призведе до збереження коефіцієнта висоти, а потім чорні стовпчики зверху і вниз.
.. _class_Window_constant_CONTENT_SCALE_ASPECT_EXPAND:
.. rst-class:: classref-enumeration-constant
:ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_EXPAND** = ``4``
Збережений контент. Якщо розмір цілі має різний аспект від бази, вміст буде триматися в верхньому куті і додати додаткову видиму площу в розтягнутому просторі.
.. rst-class:: classref-item-separator
----
.. _enum_Window_ContentScaleStretch:
.. rst-class:: classref-enumeration
enum **ContentScaleStretch**: :ref:`🔗<enum_Window_ContentScaleStretch>`
.. _class_Window_constant_CONTENT_SCALE_STRETCH_FRACTIONAL:
.. rst-class:: classref-enumeration-constant
:ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **CONTENT_SCALE_STRETCH_FRACTIONAL** = ``0``
Зміст буде розтягувати за фракційним фактором. Це заповнює весь простір, доступний у вікні, але дозволяє "піксельний wobble" відбуватися через нерівномірне масштабування пікселів.
.. _class_Window_constant_CONTENT_SCALE_STRETCH_INTEGER:
.. rst-class:: classref-enumeration-constant
:ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **CONTENT_SCALE_STRETCH_INTEGER** = ``1``
Зміст буде розтягувати тільки за цілим фактором, зберігаючи гострі пікселів. Це може залишити чорний фон, видимий на краях вікна в залежності від розміру вікна.
.. rst-class:: classref-item-separator
----
.. _enum_Window_LayoutDirection:
.. rst-class:: classref-enumeration
enum **LayoutDirection**: :ref:`🔗<enum_Window_LayoutDirection>`
.. _class_Window_constant_LAYOUT_DIRECTION_INHERITED:
.. rst-class:: classref-enumeration-constant
:ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_INHERITED** = ``0``
Автоматичний напрямок макета, визначений з батьківського напрямку макетування вікна.
.. _class_Window_constant_LAYOUT_DIRECTION_APPLICATION_LOCALE:
.. rst-class:: classref-enumeration-constant
:ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_APPLICATION_LOCALE** = ``1``
Автоматичний напрямок макета, визначений з поточного локального напрямку.
.. _class_Window_constant_LAYOUT_DIRECTION_LTR:
.. rst-class:: classref-enumeration-constant
:ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_LTR** = ``2``
Вліво-правовий напрямок макета.
.. _class_Window_constant_LAYOUT_DIRECTION_RTL:
.. rst-class:: classref-enumeration-constant
:ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_RTL** = ``3``
Прямий напрямок макета.
.. _class_Window_constant_LAYOUT_DIRECTION_SYSTEM_LOCALE:
.. rst-class:: classref-enumeration-constant
:ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_SYSTEM_LOCALE** = ``4``
Автоматичний напрямок макета, визначений на основі локалі системи.
.. _class_Window_constant_LAYOUT_DIRECTION_MAX:
.. rst-class:: classref-enumeration-constant
:ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_MAX** = ``5``
Представляє розмір переліку :ref:`LayoutDirection<enum_Window_LayoutDirection>`.
.. _class_Window_constant_LAYOUT_DIRECTION_LOCALE:
.. rst-class:: classref-enumeration-constant
:ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_LOCALE** = ``1``
**Застаріло:** Use :ref:`LAYOUT_DIRECTION_APPLICATION_LOCALE<class_Window_constant_LAYOUT_DIRECTION_APPLICATION_LOCALE>` instead.
.. rst-class:: classref-item-separator
----
.. _enum_Window_WindowInitialPosition:
.. rst-class:: classref-enumeration
enum **WindowInitialPosition**: :ref:`🔗<enum_Window_WindowInitialPosition>`
.. _class_Window_constant_WINDOW_INITIAL_POSITION_ABSOLUTE:
.. rst-class:: classref-enumeration-constant
:ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_ABSOLUTE** = ``0``
Початкова позиція вікна визначається положенням :ref:`position<class_Window_property_position>`.
.. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_PRIMARY_SCREEN:
.. rst-class:: classref-enumeration-constant
:ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_PRIMARY_SCREEN** = ``1``
Початкова позиція вікна - центр основного екрана.
.. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN:
.. rst-class:: classref-enumeration-constant
:ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN** = ``2``
Початкова позиція вікна - центр головного вікна.
.. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN:
.. rst-class:: classref-enumeration-constant
:ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN** = ``3``
Початкова позиція вікна - центр :ref:`current_screen<class_Window_property_current_screen>` екран.
.. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS:
.. rst-class:: classref-enumeration-constant
:ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS** = ``4``
Початкова позиція вікна - центр екрана, що містить тостер мишки.
.. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS:
.. rst-class:: classref-enumeration-constant
:ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS** = ``5``
Початкова позиція вікна - центр екрана, що містить вікно з фокусом клавіатури.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Константи
------------------
.. _class_Window_constant_NOTIFICATION_VISIBILITY_CHANGED:
.. rst-class:: classref-constant
**NOTIFICATION_VISIBILITY_CHANGED** = ``30`` :ref:`🔗<class_Window_constant_NOTIFICATION_VISIBILITY_CHANGED>`
Увімкнено при зміні видимості **Window**, прямо перед :ref:`visibility_changed<class_Window_signal_visibility_changed>`.
.. _class_Window_constant_NOTIFICATION_THEME_CHANGED:
.. rst-class:: classref-constant
**NOTIFICATION_THEME_CHANGED** = ``32`` :ref:`🔗<class_Window_constant_NOTIFICATION_THEME_CHANGED>`
Надсилається, коли вузлу потрібно оновити елементи теми. Це відбувається в одному з таких випадків:
- Властивість :ref:`theme<class_Window_property_theme>` змінюється на цьому вузлі або будь-якому з його предків.
- Властивість :ref:`theme_type_variation<class_Window_property_theme_type_variation>` змінюється на цьому вузлі.
- Вузол входить до дерева сцен.
\ **Примітка:** Для оптимізації це сповіщення не надсилатиметься про зміни, які відбуваються, коли цей вузол знаходиться поза деревом сцен. Натомість, усі оновлення елементів теми можна застосувати одночасно, коли вузол входить до дерева сцен.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описи властивостей
------------------------------------
.. _class_Window_property_accessibility_description:
.. rst-class:: classref-property
:ref:`String<class_String>` **accessibility_description** = ``""`` :ref:`🔗<class_Window_property_accessibility_description>`
.. rst-class:: classref-property-setget
- |void| **set_accessibility_description**\ (\ value\: :ref:`String<class_String>`\ )
- :ref:`String<class_String>` **get_accessibility_description**\ (\ )
Опис вузла, який може читати людина, і який повідомляється допоміжним програмам.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_accessibility_name:
.. rst-class:: classref-property
:ref:`String<class_String>` **accessibility_name** = ``""`` :ref:`🔗<class_Window_property_accessibility_name>`
.. rst-class:: classref-property-setget
- |void| **set_accessibility_name**\ (\ value\: :ref:`String<class_String>`\ )
- :ref:`String<class_String>` **get_accessibility_name**\ (\ )
Зрозуміле для людини ім'я вузла, яке повідомляється допоміжним програмам.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_always_on_top:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **always_on_top** = ``false`` :ref:`🔗<class_Window_property_always_on_top>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, вікно буде поверх усіх інших вікон. Не працює, якщо ввімкнено :ref:`transient<class_Window_property_transient>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_auto_translate:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **auto_translate** :ref:`🔗<class_Window_property_auto_translate>`
.. rst-class:: classref-property-setget
- |void| **set_auto_translate**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_auto_translating**\ (\ )
**Застаріло:** Use :ref:`Node.auto_translate_mode<class_Node_property_auto_translate_mode>` and :ref:`Node.can_auto_translate()<class_Node_method_can_auto_translate>` instead.
Якщо будь-який текст повинен автоматично змінюватися до його перекладу в залежності від поточного локального.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_borderless:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **borderless** = ``false`` :ref:`🔗<class_Window_property_borderless>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, вікно не буде кордонів.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_content_scale_aspect:
.. rst-class:: classref-property
:ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **content_scale_aspect** = ``0`` :ref:`🔗<class_Window_property_content_scale_aspect>`
.. rst-class:: classref-property-setget
- |void| **set_content_scale_aspect**\ (\ value\: :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>`\ )
- :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **get_content_scale_aspect**\ (\ )
Визначає поведінку аспекту вмісту під час зміни розміру **Window**. Базовий аспект визначається параметром :ref:`content_scale_size<class_Window_property_content_scale_size>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_content_scale_factor:
.. rst-class:: classref-property
:ref:`float<class_float>` **content_scale_factor** = ``1.0`` :ref:`🔗<class_Window_property_content_scale_factor>`
.. rst-class:: classref-property-setget
- |void| **set_content_scale_factor**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_content_scale_factor**\ (\ )
Визначає базовий масштаб вмісту **Window**, коли його :ref:`size<class_Window_property_size>` дорівнює :ref:`content_scale_size<class_Window_property_content_scale_size>`. Дивіться також :ref:`Viewport.get_stretch_transform()<class_Viewport_method_get_stretch_transform>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_content_scale_mode:
.. rst-class:: classref-property
:ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **content_scale_mode** = ``0`` :ref:`🔗<class_Window_property_content_scale_mode>`
.. rst-class:: classref-property-setget
- |void| **set_content_scale_mode**\ (\ value\: :ref:`ContentScaleMode<enum_Window_ContentScaleMode>`\ )
- :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **get_content_scale_mode**\ (\ )
Вкажіть, як вміст масштабується при перерахуванні **Window**.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_content_scale_size:
.. rst-class:: classref-property
:ref:`Vector2i<class_Vector2i>` **content_scale_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_content_scale_size>`
.. rst-class:: classref-property-setget
- |void| **set_content_scale_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
- :ref:`Vector2i<class_Vector2i>` **get_content_scale_size**\ (\ )
Базовий розмір вмісту (тобто вузлів, які намальовані всередині вікна). Якщо незеро, вміст **Window** буде масштабовано, коли вікно не відрізняється різним розміром.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_content_scale_stretch:
.. rst-class:: classref-property
:ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **content_scale_stretch** = ``0`` :ref:`🔗<class_Window_property_content_scale_stretch>`
.. rst-class:: classref-property-setget
- |void| **set_content_scale_stretch**\ (\ value\: :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>`\ )
- :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **get_content_scale_stretch**\ (\ )
Політика, яка використовується для визначення остаточного коефіцієнта масштабування для 2D-елементів. Це впливає на те, як застосовується :ref:`content_scale_factor<class_Window_property_content_scale_factor>`, на додаток до автоматичного коефіцієнта масштабування, визначеного :ref:`content_scale_size<class_Window_property_content_scale_size>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_current_screen:
.. rst-class:: classref-property
:ref:`int<class_int>` **current_screen** :ref:`🔗<class_Window_property_current_screen>`
.. rst-class:: classref-property-setget
- |void| **set_current_screen**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_current_screen**\ (\ )
В даний час екран вікна.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_exclude_from_capture:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **exclude_from_capture** = ``false`` :ref:`🔗<class_Window_property_exclude_from_capture>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо значення ``true``, **Window** виключається зі знімків екрана, зроблених методами :ref:`DisplayServer.screen_get_image()<class_DisplayServer_method_screen_get_image>`, :ref:`DisplayServer.screen_get_image_rect()<class_DisplayServer_method_screen_get_image_rect>` та :ref:`DisplayServer.screen_get_pixel()<class_DisplayServer_method_screen_get_pixel>`.
\ **Примітка:** Ця властивість реалізована в macOS та Windows.
\ **Примітка:** Увімкнення цього параметра запобігатиме стандартним методам знімків екрана захопленню зображення вікна, але **НЕ** гарантує, що інші програми не зможуть захопити зображення. Його не слід використовувати як DRM або засіб безпеки.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_exclusive:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **exclusive** = ``false`` :ref:`🔗<class_Window_property_exclusive>`
.. rst-class:: classref-property-setget
- |void| **set_exclusive**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_exclusive**\ (\ )
Якщо ``true``, то **Window** буде в ексклюзивному режимі. Виключні вікна завжди знаходяться на вершині свого батька і заблокувати всі вводи, що йдуть до батька **Window**.
Потрібні :ref:`transient<class_Window_property_transient>` ввімкнуті до роботи.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_extend_to_title:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **extend_to_title** = ``false`` :ref:`🔗<class_Window_property_extend_to_title>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, вміст **Window** розгортається на весь розмір вікна, а рядок заголовка вікна стає прозорим.
\ **Примітка:** Ця властивість реалізована лише у macOS.
\ **Примітка:** Ця властивість працює лише з нативними вікнами.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_force_native:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **force_native** = ``false`` :ref:`🔗<class_Window_property_force_native>`
.. rst-class:: classref-property-setget
- |void| **set_force_native**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_force_native**\ (\ )
Якщо ``true``, рідне вікно буде використовуватися незалежно від параметрів батьківського огляду та проекту.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_initial_position:
.. rst-class:: classref-property
:ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **initial_position** = ``0`` :ref:`🔗<class_Window_property_initial_position>`
.. rst-class:: classref-property-setget
- |void| **set_initial_position**\ (\ value\: :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>`\ )
- :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **get_initial_position**\ (\ )
Визначає початковий тип позиції для **Window**.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_keep_title_visible:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **keep_title_visible** = ``false`` :ref:`🔗<class_Window_property_keep_title_visible>`
.. rst-class:: classref-property-setget
- |void| **set_keep_title_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_keep_title_visible**\ (\ )
Якщо ``true``, то ширина **Window** розширюється, щоб зберегти текст заголовка повністю видимим.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_max_size:
.. rst-class:: classref-property
:ref:`Vector2i<class_Vector2i>` **max_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_max_size>`
.. rst-class:: classref-property-setget
- |void| **set_max_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
- :ref:`Vector2i<class_Vector2i>` **get_max_size**\ (\ )
Якщо незеро, то **Window** не може бути більшим, ніж цей розмір.
\ **Примітка:** Ця властивість буде ігноруватися, якщо значення нижче :ref:`min_size<class_Window_property_min_size>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_maximize_disabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **maximize_disabled** = ``false`` :ref:`🔗<class_Window_property_maximize_disabled>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, кнопка розгортання **Window** вимкнена.
\ **Примітка:** Якщо обидві кнопки, як згортання, так і розгортання, вимкнені, кнопки повністю приховані, і видно лише кнопку закриття.
\ **Примітка:** Ця властивість реалізована лише в macOS та Windows.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_min_size:
.. rst-class:: classref-property
:ref:`Vector2i<class_Vector2i>` **min_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_min_size>`
.. rst-class:: classref-property-setget
- |void| **set_min_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
- :ref:`Vector2i<class_Vector2i>` **get_min_size**\ (\ )
Якщо незеро, то **Window** не може бути меншим, ніж цей розмір.
\ **Примітка:** Ця властивість буде ігноруватися на користь :ref:`get_contents_minimum_size()<class_Window_method_get_contents_minimum_size>`, якщо ввімкнено :ref:`wrap_controls<class_Window_property_wrap_controls>` і якщо його розмір більший.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_minimize_disabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **minimize_disabled** = ``false`` :ref:`🔗<class_Window_property_minimize_disabled>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, кнопка згортання вікна **Window** вимкнена.
\ **Примітка:** Якщо обидві кнопки згортання та розгортання вимкнені, кнопки повністю приховані, і видно лише кнопку закриття.
\ **Примітка:** Ця властивість реалізована лише в macOS та Windows.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_mode:
.. rst-class:: classref-property
:ref:`Mode<enum_Window_Mode>` **mode** = ``0`` :ref:`🔗<class_Window_property_mode>`
.. rst-class:: classref-property-setget
- |void| **set_mode**\ (\ value\: :ref:`Mode<enum_Window_Mode>`\ )
- :ref:`Mode<enum_Window_Mode>` **get_mode**\ (\ )
Встановіть поточний режим вікна.
\ **Note:** Fullscreen режим не ексклюзивний повноекранний екран на Windows і Linux.
\ **Примітка:** Цей метод працює тільки з рідними вікнами, тобто основним вікном та **Window**-захищеними вузлами, коли :ref:`Viewport.gui_embed_subwindows<class_Viewport_property_gui_embed_subwindows>` вимкнено в головному порту.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_mouse_passthrough:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **mouse_passthrough** = ``false`` :ref:`🔗<class_Window_property_mouse_passthrough>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, всі події мишки будуть передані до основного вікна тієї ж програми. Дивись ще :ref:`mouse_passthrough_polygon<class_Window_property_mouse_passthrough_polygon>`.
\ **Примітка:** Дана нерухомість реалізується на Linux (X11), macOS і Windows.
\ **Примітка:** Зручності та умови для роботи з вікнами.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_mouse_passthrough_polygon:
.. rst-class:: classref-property
:ref:`PackedVector2Array<class_PackedVector2Array>` **mouse_passthrough_polygon** = ``PackedVector2Array()`` :ref:`🔗<class_Window_property_mouse_passthrough_polygon>`
.. rst-class:: classref-property-setget
- |void| **set_mouse_passthrough_polygon**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ )
- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_mouse_passthrough_polygon**\ (\ )
Встановлює багатокутну область вікна, яка приймає події миші. Події миші за межами регіону будуть проходити.
Передача порожнього масиву вимкне підтримку проходження (усі події миші перехоплюватимуться вікном, що є типовою поведінкою).
.. tabs::
.. code-tab:: gdscript
# Встановити регіон, використовуючи вузол Path2D.
$Window.mouse_passthrough_polygon = $Path2D.curve.get_baked_points()
# Встановити область, використовуючи вузол Polygon2D.
$Window.mouse_passthrough_polygon = $Polygon2D.polygon
# Скинути регіон до стандартних.
$Window.mouse_passthrough_polygon = []
.. code-tab:: csharp
// Встановити регіон, використовуючи вузол Path2D.
GetNode<Window>("Вікно").MousePassthroughPolygon = GetNode<Path2D>("Path2D").Curve.GetBakedPoints();
// Встановити область, використовуючи вузол Polygon2D.
GetNode<Window>("Вікно").MousePassthroughPolygon = GetNode<Polygon2D>("Polygon2D").Polygon;
// Скидання регіону до типового.
GetNode<Window>("Window").MousePassthroughPolygon = [];
\ **Примітка:** Ця властивість ігнорується, якщо :ref:`mouse_passthrough<class_Window_property_mouse_passthrough>` має значення ``true``.
\ **Примітка.** У Windows частина вікна, яка лежить за межами області, не малюється, тоді як у Linux (X11) і macOS це так.
\ **Примітка.** Ця властивість реалізована в Linux (X11), macOS і Windows.
**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_nonclient_area:
.. rst-class:: classref-property
:ref:`Rect2i<class_Rect2i>` **nonclient_area** = ``Rect2i(0, 0, 0, 0)`` :ref:`🔗<class_Window_property_nonclient_area>`
.. rst-class:: classref-property-setget
- |void| **set_nonclient_area**\ (\ value\: :ref:`Rect2i<class_Rect2i>`\ )
- :ref:`Rect2i<class_Rect2i>` **get_nonclient_area**\ (\ )
If set, defines the window's custom decoration area which will receive mouse input, even if normal input to the window is blocked (such as when it has an exclusive child opened). See also :ref:`nonclient_window_input<class_Window_signal_nonclient_window_input>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_popup_window:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **popup_window** = ``false`` :ref:`🔗<class_Window_property_popup_window>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, то **Window** буде вважатися спливаючою. Поповнення - це підвіконня, які не відображаються як окремі вікна в списку віконного менеджера системи, а також надішлемо запит, коли все натискається поза ними (безкоштовно ``пам'ятний ексклюзивний``.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_popup_wm_hint:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **popup_wm_hint** = ``false`` :ref:`🔗<class_Window_property_popup_wm_hint>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, **Window** сигналізуватиме менеджеру вікон, що воно має бути визначеним реалізацією "спливаючим вікном" (зазвичай плаваючим, безрамковим, незнімним дочірнім вікном).
.. rst-class:: classref-item-separator
----
.. _class_Window_property_position:
.. rst-class:: classref-property
:ref:`Vector2i<class_Vector2i>` **position** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_position>`
.. rst-class:: classref-property-setget
- |void| **set_position**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
- :ref:`Vector2i<class_Vector2i>` **get_position**\ (\ )
Положення вікна в пікселях.
Якщо :ref:`ProjectSettings.Виберіть/window/subwindows/embed_subwindows<class_ProjectSettings_property_Виберіть/window/subwindows/embed_subwindows>` ``false``, позиція в абсолютних координатах екрана. Зазвичай це стосується додатків редактора. Якщо налаштування ``true``, позиція вікна знаходиться в координати його батька :ref:`Viewport<class_Viewport>`.
\ **Примітка:** Ця властивість тільки працює, якщо :ref:`initial_position<class_Window_property_initial_position>` встановлюється на :ref:`WINDOW_INITIAL_SETTING_ABSOLUTE<class_Window_constant_WINDOW_INITIAL_SETTING_ABSOLUTE>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_sharp_corners:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **sharp_corners** = ``false`` :ref:`🔗<class_Window_property_sharp_corners>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, **Window** замінить стиль вікна ОС, щоб відображати гострі кути.
\ **Примітка:** Ця властивість реалізована лише у Windows (11).
\ **Примітка:** Ця властивість працює лише з рідними вікнами.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_size:
.. rst-class:: classref-property
:ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(100, 100)`` :ref:`🔗<class_Window_property_size>`
.. rst-class:: classref-property-setget
- |void| **set_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
- :ref:`Vector2i<class_Vector2i>` **get_size**\ (\ )
Розмір вікна в пікселів.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_theme:
.. rst-class:: classref-property
:ref:`Theme<class_Theme>` **theme** :ref:`🔗<class_Window_property_theme>`
.. rst-class:: classref-property-setget
- |void| **set_theme**\ (\ value\: :ref:`Theme<class_Theme>`\ )
- :ref:`Theme<class_Theme>` **get_theme**\ (\ )
:ref:`Theme<class_Theme>` ресурс цієї вершини і всі її :ref:`Control<class_Control>` і **Window** діти використовують. Якщо дочірня вершина має власний ресурс :ref:`Theme<class_Theme>`, тематичні елементи об'єднуються з визначеннями дитини, які мають вищий пріоритет.
\ **Примітка:** **Window** стилі не матимуть ефекту, якщо вікно вкладено.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_theme_type_variation:
.. rst-class:: classref-property
:ref:`StringName<class_StringName>` **theme_type_variation** = ``&""`` :ref:`🔗<class_Window_property_theme_type_variation>`
.. rst-class:: classref-property-setget
- |void| **set_theme_type_variation**\ (\ value\: :ref:`StringName<class_StringName>`\ )
- :ref:`StringName<class_StringName>` **get_theme_type_variation**\ (\ )
Назва варіації тематичного типу, що використовується цим **Window** для перегляду власних тематичних елементів. Детальніше :ref:`Control.theme_type_variation<class_Control_property_theme_type_variation>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_title:
.. rst-class:: classref-property
:ref:`String<class_String>` **title** = ``""`` :ref:`🔗<class_Window_property_title>`
.. rst-class:: classref-property-setget
- |void| **set_title**\ (\ value\: :ref:`String<class_String>`\ )
- :ref:`String<class_String>` **get_title**\ (\ )
Назва вікна. Якщо **Window** є рідним, заголовок, викладеним в :ref:`Theme<class_Theme>`, не буде ефектно.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_transient:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **transient** = ``false`` :ref:`🔗<class_Window_property_transient>`
.. rst-class:: classref-property-setget
- |void| **set_transient**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_transient**\ (\ )
Якщо ``true``, то **Window** є постійним, тобто вважається дитиною іншої **Window**. Перехідне вікно буде знищено з його постійним батьком і повернеться до свого батька при закритті. Перехідне вікно відображається на вершині невиключного повноекранного вікна. Перехідні вікна не можуть ввести повноекранний режим.
Примітка, що поведінка може відрізнятися залежно від платформи.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_transient_to_focused:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **transient_to_focused** = ``false`` :ref:`🔗<class_Window_property_transient_to_focused>`
.. rst-class:: classref-property-setget
- |void| **set_transient_to_focused**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_transient_to_focused**\ (\ )
Якщо ``true``, і **Window** є :ref:`transient<class_Window_property_transient>`, це вікно буде (на момент становлення видимого) переміститься до вказаного вікна замість негайного батьківського вікна в ієрархії. Зауважте, що транзисторний батько призначається в той час, коли цей вікно стає видимим, тому зміна його після того, як не має ефекту до повторного показу.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_transparent:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **transparent** = ``false`` :ref:`🔗<class_Window_property_transparent>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, фон **Window** може бути прозорим. Це краще використовувати з вбудованими вікнами.
\ **Примітка:**\ Підтримка прозорості здійснюється на Linux, macOS та Windows, але доступність може відрізнятися залежно від драйвера GPU, диспетчера відображення та можливостей композитора.
\ **Примітка:** Ця властивість не має ефекту, якщо :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>` встановлюється на ``false``.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_unfocusable:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **unfocusable** = ``false`` :ref:`🔗<class_Window_property_unfocusable>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, то **Window** не може бути зосереджений, а не взаємодіяти з. Це ще можна побачити.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_unresizable:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **unresizable** = ``false`` :ref:`🔗<class_Window_property_unresizable>`
.. rst-class:: classref-property-setget
- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
Якщо ``true``, розмір вікна не можна змінити.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_visible:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **visible** = ``true`` :ref:`🔗<class_Window_property_visible>`
.. rst-class:: classref-property-setget
- |void| **set_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_visible**\ (\ )
Якщо ``true``, вікно видно.
.. rst-class:: classref-item-separator
----
.. _class_Window_property_wrap_controls:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **wrap_controls** = ``false`` :ref:`🔗<class_Window_property_wrap_controls>`
.. rst-class:: classref-property-setget
- |void| **set_wrap_controls**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_wrapping_controls**\ (\ )
Якщо ``true``, розмір вікна буде автоматично оновлюватися, коли додана дочірня вершина або видалена, ігнорування :ref:`min_size<class_Window_property_min_size>`, якщо новий розмір більший.
Якщо ``false``, вам потрібно викликати :ref:`child_controls_changed()<class_Window_method_child_controls_changed>` вручну.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описи методів
--------------------------
.. _class_Window_private_method__get_contents_minimum_size:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **_get_contents_minimum_size**\ (\ ) |virtual| |const| :ref:`🔗<class_Window_private_method__get_contents_minimum_size>`
Віртуальний метод для реалізації користувача. Надіслати значення, що повертається :ref:`get_contents_minimum_size()<class_Window_method_get_contents_minimum_size>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_add_theme_color_override:
.. rst-class:: classref-method
|void| **add_theme_color_override**\ (\ name\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Window_method_add_theme_color_override>`
Створює локальне перевизначення для теми :ref:`Color<class_Color>` із заданим параметром ``name``. Локальні перевизначення завжди мають пріоритет під час отримання елементів теми для елемента керування. Перевизначення можна видалити за допомогою методу :ref:`remove_theme_color_override()<class_Window_method_remove_theme_color_override>`.
Див. також метод :ref:`get_theme_color()<class_Window_method_get_theme_color>` та метод :ref:`Control.add_theme_color_override()<class_Control_method_add_theme_color_override>` для отримання додаткової інформації.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_add_theme_constant_override:
.. rst-class:: classref-method
|void| **add_theme_constant_override**\ (\ name\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Window_method_add_theme_constant_override>`
Створює локальне перевизначення для константи теми з вказаним ``name``. Локальні перевизначення завжди мають пріоритет при отриманні елементів теми для елемента керування. Перевизначення можна вилучити за допомогою :ref:`remove_theme_constant_override()<class_Window_method_remove_theme_constant_override>`.
Дивіться також :ref:`get_theme_constant()<class_Window_method_get_theme_constant>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_add_theme_font_override:
.. rst-class:: classref-method
|void| **add_theme_font_override**\ (\ name\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) :ref:`🔗<class_Window_method_add_theme_font_override>`
Створює локальну наречену на тему :ref:`Font<class_Font>` з вказаним ``name``. Місцеві перевизнання завжди мають прецедентність при обманці темних елементів для контролю. Видалено перевипуск з :ref:`видалення_theme_font_override()<class_Window_method_видалення_theme_font_override>`.
Дивитися також :ref:`get_theme_font()<class_Window_method_get_theme_font>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_add_theme_font_size_override:
.. rst-class:: classref-method
|void| **add_theme_font_size_override**\ (\ name\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Window_method_add_theme_font_size_override>`
Створює локальну накладну для розміру шрифту теми з вказаною ``прізвище``. Місцеві перевизнання завжди мають прецедентність при обманці темних елементів для контролю. Видалено перевипуск з :ref:`видалення_theme_font_size_override()<class_Window_method_видалення_theme_font_size_override>`.
Дивись також :ref:`get_theme_font_size()<class_Window_method_get_theme_font_size>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_add_theme_icon_override:
.. rst-class:: classref-method
|void| **add_theme_icon_override**\ (\ name\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_Window_method_add_theme_icon_override>`
Створює локальне перевизначення для іконки теми із зазначеним ``name``. Локальні перевизначення завжди мають пріоритет при отриманні елементів теми для елемента керування. Перевизначення можна вилучити за допомогою :ref:`remove_theme_icon_override()<class_Window_method_remove_theme_icon_override>`.
Дивіться також :ref:`get_theme_icon()<class_Window_method_get_theme_icon>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_add_theme_stylebox_override:
.. rst-class:: classref-method
|void| **add_theme_stylebox_override**\ (\ name\: :ref:`StringName<class_StringName>`, stylebox\: :ref:`StyleBox<class_StyleBox>`\ ) :ref:`🔗<class_Window_method_add_theme_stylebox_override>`
Створює локальне перевизначення для теми :ref:`StyleBox<class_StyleBox>` із зазначеним параметром ``назва параметра``. Локальні перевизначення завжди мають пріоритет під час отримання елементів теми для елемента керування. Перевизначення можна видалити за допомогою методу :ref:`remove_theme_stylebox_override()<class_Window_method_remove_theme_stylebox_override>`.
Див. також метод :ref:`get_theme_stylebox()<class_Window_method_get_theme_stylebox>` та метод :ref:`Control.add_theme_stylebox_override()<class_Control_method_add_theme_stylebox_override>` для отримання додаткової інформації.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_begin_bulk_theme_override:
.. rst-class:: classref-method
|void| **begin_bulk_theme_override**\ (\ ) :ref:`🔗<class_Window_method_begin_bulk_theme_override>`
Запобігає ``*_theme_*_override`` методи з випромінювання :ref:`NOTIFICATION_THEME_CHANGED<class_Window_constant_NOTIFICATION_THEME_CHANGED>` доки :ref:`End_bulk_theme_override()<class_Window_method_End_bulk_theme_override>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_can_draw:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **can_draw**\ (\ ) |const| :ref:`🔗<class_Window_method_can_draw>`
Повертаємо вашу увагу на те, що вікно намальовується на екрані.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_child_controls_changed:
.. rst-class:: classref-method
|void| **child_controls_changed**\ (\ ) :ref:`🔗<class_Window_method_child_controls_changed>`
Запитує оновлення розміру **Window**, щоб відповідати вузям :ref:`Control<class_Control>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_end_bulk_theme_override:
.. rst-class:: classref-method
|void| **end_bulk_theme_override**\ (\ ) :ref:`🔗<class_Window_method_end_bulk_theme_override>`
Закінчується масове оновлення теми. Переглянути :ref:`_bulk_theme_override()<class_Window_private_method__bulk_theme_override>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_contents_minimum_size:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **get_contents_minimum_size**\ (\ ) |const| :ref:`🔗<class_Window_method_get_contents_minimum_size>`
Повертає комбінований мінімальний розмір від дитини :ref:`Control<class_Control>` вершини вікна. Використовуйте :ref:`child_controls_changed()<class_Window_method_child_controls_changed>` для оновлення його при зміні вузлів дитини.
Значення, подана цим методом, може передаватися з :ref:`_get_contents_minimum_size()<class_Window_private_method__get_contents_minimum_size>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_flag:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| :ref:`🔗<class_Window_method_get_flag>`
Повертає ``true``, якщо встановлено ``flag``.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_focused_window:
.. rst-class:: classref-method
:ref:`Window<class_Window>` **get_focused_window**\ (\ ) |static| :ref:`🔗<class_Window_method_get_focused_window>`
Повертає сфокусоване вікно.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_layout_direction:
.. rst-class:: classref-method
:ref:`LayoutDirection<enum_Window_LayoutDirection>` **get_layout_direction**\ (\ ) |const| :ref:`🔗<class_Window_method_get_layout_direction>`
Повертає напрямок макета та напрямок написання тексту.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_position_with_decorations:
.. rst-class:: classref-method
:ref:`Vector2i<class_Vector2i>` **get_position_with_decorations**\ (\ ) |const| :ref:`🔗<class_Window_method_get_position_with_decorations>`
Повертає позицію вікна, включаючи його межу.
\ **Примітка:** Якщо :ref:`visible<class_Window_property_visible>` має значення ``false``, цей метод повертає те саме значення, що й :ref:`position<class_Window_property_position>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_size_with_decorations:
.. rst-class:: classref-method
:ref:`Vector2i<class_Vector2i>` **get_size_with_decorations**\ (\ ) |const| :ref:`🔗<class_Window_method_get_size_with_decorations>`
Повертає розмір вікна, включаючи його межу.
\ **Примітка:** Якщо :ref:`visible<class_Window_property_visible>` має значення ``false``, цей метод повертає те саме значення, що й :ref:`size<class_Window_property_size>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_theme_color:
.. rst-class:: classref-method
:ref:`Color<class_Color>` **get_theme_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_color>`
Повертаємо :ref:`Color<class_Color>` з першого узгодження :ref:`Theme<class_Theme>` в дерево, якщо це :ref:`Theme<class_Theme>` має кольоровий елемент з вказаною ``name`` і ``theme_type``.
Детальніше :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_theme_constant:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_theme_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_constant>`
Повертає постійне місце з першого матчу :ref:`Theme<class_Theme>` в дереві, якщо :ref:`Theme<class_Theme>` має постійний елемент з вказаною ``name`` і ``theme_type``.
Детальніше :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_theme_default_base_scale:
.. rst-class:: classref-method
:ref:`float<class_float>` **get_theme_default_base_scale**\ (\ ) |const| :ref:`🔗<class_Window_method_get_theme_default_base_scale>`
Повертає значення базової ваги за замовчуванням з першого узгодження :ref:`Theme<class_Theme>` в дерево, якщо це :ref:`Theme<class_Theme>` має дійсне значення :ref:`Theme.default_base_scale<class_Theme_property_default_base_scale>`.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_theme_default_font:
.. rst-class:: classref-method
:ref:`Font<class_Font>` **get_theme_default_font**\ (\ ) |const| :ref:`🔗<class_Window_method_get_theme_default_font>`
Повертає шрифт за замовчуванням з першого матчу :ref:`Theme<class_Theme>` у дерево, якщо це :ref:`Theme<class_Theme>` має дійсне значення ``email protected``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_theme_default_font_size:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_theme_default_font_size**\ (\ ) |const| :ref:`🔗<class_Window_method_get_theme_default_font_size>`
Повертає значення розміру шрифту за замовчуванням з першого узгодження :ref:`Theme<class_Theme>` у дерево, якщо це :ref:`Theme<class_Theme>` має дійсне значення ``email protected``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_theme_font:
.. rst-class:: classref-method
:ref:`Font<class_Font>` **get_theme_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_font>`
Повертаємо :ref:`Font<class_Font>` з першого узгодження :ref:`Theme<class_Theme>` в дерево, якщо це :ref:`Theme<class_Theme>` має шрифтовий елемент з вказаною ``name`` і ``theme_type``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_theme_font_size:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_theme_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_font_size>`
Повертає розмір шрифту з першого матчу :ref:`Theme<class_Theme>` у дерево, якщо це :ref:`Theme<class_Theme>` має пункт розмірів шрифту з вказаною ``name`` та ``theme_type``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_theme_icon:
.. rst-class:: classref-method
:ref:`Texture2D<class_Texture2D>` **get_theme_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_icon>`
Повертає іконку з першого матчу :ref:`Theme<class_Theme>` у дерево, якщо :ref:`Theme<class_Theme>` має іконку з вказаною ``name`` та ``theme_type``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_theme_stylebox:
.. rst-class:: classref-method
:ref:`StyleBox<class_StyleBox>` **get_theme_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_stylebox>`
Повертаємо :ref:`StyleBox<class_StyleBox>` з першого матчу :ref:`Theme<class_Theme>` у дерево, якщо це :ref:`Theme<class_Theme>` має стильний елемент з вказаною ``name`` та ``theme_type``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_get_window_id:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_window_id**\ (\ ) |const| :ref:`🔗<class_Window_method_get_window_id>`
Повертає ідентифікатор вікна.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_grab_focus:
.. rst-class:: classref-method
|void| **grab_focus**\ (\ ) :ref:`🔗<class_Window_method_grab_focus>`
Причини виникнення вікна, щоб захопити фокус, що дозволяє отримати вхід користувача.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_focus:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_focus**\ (\ ) |const| :ref:`🔗<class_Window_method_has_focus>`
Повертає ``true``, якщо вікно у фокусі.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_color:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_color>`
Повертає ``true``, якщо є відповідні :ref:`Theme<class_Theme>` в дереві, який має кольоровий елемент з вказаною ``name`` і ``theme_type``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_color_override:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_color_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_color_override>`
Повертає ``true``, якщо існує локальне перевизначення для теми :ref:`Color<class_Color>` із зазначеним ``name`` у цьому вузлі :ref:`Control<class_Control>`.
Див. :ref:`add_theme_color_override()<class_Window_method_add_theme_color_override>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_constant:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_constant>`
Повертає ``true``, якщо є відповідні :ref:`Theme<class_Theme>` в дереві, що має постійний елемент з вказаною ``name`` і ``theme_type``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_constant_override:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_constant_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_constant_override>`
Повертає ``true``, якщо існує локальне перевизначення для константи теми з вказаним ``name`` у цьому вузлі :ref:`Control<class_Control>`.
Див. :ref:`add_theme_constant_override()<class_Window_method_add_theme_constant_override>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_font:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_font>`
Повертає ``true``, якщо є відповідні :ref:`Theme<class_Theme>` в дереві, який має шрифтовий елемент з вказаною ``name`` і ``theme_type``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_font_override:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_font_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_font_override>`
Повертає ``true``, якщо існує локальне перевизначення для теми :ref:`Font<class_Font>` із зазначеним ``name`` у цьому вузлі :ref:`Control<class_Control>`.
Див. :ref:`add_theme_font_override()<class_Window_method_add_theme_font_override>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_font_size:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_font_size>`
Повертає ``true``, якщо є відповідні :ref:`Theme<class_Theme>` в дереві, який має пункт розмірів шрифту з вказаною ``name`` і ``theme_type``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_font_size_override:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_font_size_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_font_size_override>`
Повертає ``true``, якщо є локальне перевизначення для розміру шрифту теми з вказаним ``name`` у цьому вузлі :ref:`Control<class_Control>`.
Див. :ref:`add_theme_font_size_override()<class_Window_method_add_theme_font_size_override>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_icon:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_icon>`
Повертає ``true``, якщо є відповідні :ref:`Theme<class_Theme>` в дереві, який має іконку елемент з вказаною ``name`` і ``theme_type``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_icon_override:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_icon_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_icon_override>`
Повертає ``true``, якщо існує локальне перевизначення для значка теми з вказаним ``name`` у цьому вузлі :ref:`Control<class_Control>`.
Див. :ref:`add_theme_icon_override()<class_Window_method_add_theme_icon_override>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_stylebox:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_stylebox>`
Повертає ``true``, якщо є відповідні :ref:`Theme<class_Theme>` в дереві, який має стильний елемент з вказаною ``name`` і ``theme_type``.
Див. :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` для деталей.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_has_theme_stylebox_override:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_stylebox_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_stylebox_override>`
Повертає ``true``, якщо існує локальне перевизначення для теми :ref:`StyleBox<class_StyleBox>` із зазначеним ``name`` у цьому вузлі :ref:`Control<class_Control>`.
Див. :ref:`add_theme_stylebox_override()<class_Window_method_add_theme_stylebox_override>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_hide:
.. rst-class:: classref-method
|void| **hide**\ (\ ) :ref:`🔗<class_Window_method_hide>`
Приховує вікно. Це не так само, як і мінімована держава. Приховане вікно не може бути взаємодіє з та потребами, щоб бути видимим з :ref:`show()<class_Window_method_show>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_is_embedded:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_embedded**\ (\ ) |const| :ref:`🔗<class_Window_method_is_embedded>`
Повертає ``true``, якщо вікно наразі вбудовано в інше вікно.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_is_layout_rtl:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_layout_rtl**\ (\ ) |const| :ref:`🔗<class_Window_method_is_layout_rtl>`
Повертає ``true``, якщо макет справа наліво.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_is_maximize_allowed:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_maximize_allowed**\ (\ ) |const| :ref:`🔗<class_Window_method_is_maximize_allowed>`
Повертає ``true``, якщо вікно можна розгорнути (увімкнено кнопку розгортання).
.. rst-class:: classref-item-separator
----
.. _class_Window_method_is_using_font_oversampling:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_using_font_oversampling**\ (\ ) |const| :ref:`🔗<class_Window_method_is_using_font_oversampling>`
Повертає ``true``, якщо увімкнено перенаправлення шрифту. Подивитися :ref:`set_use_font_oversampling()<class_Window_method_set_use_font_oversampling>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_move_to_center:
.. rst-class:: classref-method
|void| **move_to_center**\ (\ ) :ref:`🔗<class_Window_method_move_to_center>`
Centers the window in the current screen. If the window is embedded, it is centered in the embedder :ref:`Viewport<class_Viewport>` instead.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_move_to_foreground:
.. rst-class:: classref-method
|void| **move_to_foreground**\ (\ ) :ref:`🔗<class_Window_method_move_to_foreground>`
**Застаріло:** Use :ref:`grab_focus()<class_Window_method_grab_focus>` instead.
Причини виникнення вікна, щоб захопити фокус, що дозволяє отримати вхід користувача.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_popup:
.. rst-class:: classref-method
|void| **popup**\ (\ rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) :ref:`🔗<class_Window_method_popup>`
Показує **Window** та робить його тимчасовим (див. :ref:`transient<class_Window_property_transient>`). Якщо вказано ``rect``, він буде встановлено як розмір **Window**. Не вдається викликати функцію в головному вікні.
Якщо :ref:`ProjectSettings.display/window/subwindows/embed_subwindows<class_ProjectSettings_property_display/window/subwindows/embed_subwindows>` має значення ``true`` (режим одного вікна), координати ``rect`` є глобальними та відносними до верхнього лівого кута головного вікна (за винятком декорацій вікна). Якщо координати положення ``rect`` є від'ємними, вікно буде розташоване за межами головного вікна і може бути невидимим у результаті.
Якщо :ref:`ProjectSettings.display/window/subwindows/embed_subwindows<class_ProjectSettings_property_display/window/subwindows/embed_subwindows>` має значення ``false`` (режим кількох вікон), координати ``rect`` є глобальними та відносними до верхнього лівого кута крайнього лівого екрана. Якщо координати положення ``rect`` є від'ємними, вікно буде розміщено у верхньому лівому куті екрана.
\ **Примітка:** ``rect`` має бути в глобальних координатах, якщо вказано.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_popup_centered:
.. rst-class:: classref-method
|void| **popup_centered**\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) :ref:`🔗<class_Window_method_popup_centered>`
Відкриває **Window** по центру поточного екрана, з необов'язковим мінімальним розміром. Якщо **Window** вбудоване, воно буде розташоване по центру батьківського :ref:`Viewport<class_Viewport>`.
\ **Примітка:** Виклик зі значенням за замовчуванням ``minsize`` еквівалентний виклику з :ref:`size<class_Window_property_size>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_popup_centered_clamped:
.. rst-class:: classref-method
|void| **popup_centered_clamped**\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) :ref:`🔗<class_Window_method_popup_centered_clamped>`
Поповнення **Window**, розташованого всередині свого батька **Window**. ``fallback_ratio`` визначає максимальний розмір **Window**, щодо свого батька.
\ **Примітка:** Викликати його з значенням за замовчуванням ``minsize`` еквівалентно виклику з :ref:`size<class_Window_property_size>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_popup_centered_ratio:
.. rst-class:: classref-method
|void| **popup_centered_ratio**\ (\ ratio\: :ref:`float<class_float>` = 0.8\ ) :ref:`🔗<class_Window_method_popup_centered_ratio>`
Якщо **Window** вбудовується, попросить **Window**, встановивши всередині його вбудовування і встановлює його розмір, як ``ratio`` розміру вбудовування.
Якщо **Window** є рідним вікном, що попросить **Window**, розташованого всередині екрана свого батька **Window** і встановлює його розмір як ``ratio`` розміру екрана.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_popup_exclusive:
.. rst-class:: classref-method
|void| **popup_exclusive**\ (\ from_node\: :ref:`Node<class_Node>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) :ref:`🔗<class_Window_method_popup_exclusive>`
Намагається зробити цей діалог батьком до останнього ексклюзивного вікна відносно ``from_node``, а потім викликає :ref:`popup()<class_Window_method_popup>` на ньому. У діалогового вікна не потрібно бути поточного батька, інакше метод не спрацьовує.
Дивитись також :ref:`set_unparent_when_invisible()<class_Window_method_set_unparent_when_invisible>` і :ref:`Node.get_last_exclusive_window()<class_Node_method_get_last_exclusive_window>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_popup_exclusive_centered:
.. rst-class:: classref-method
|void| **popup_exclusive_centered**\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) :ref:`🔗<class_Window_method_popup_exclusive_centered>`
Намагається зробити цей діалог батьком до останнього ексклюзивного вікна відносно ``from_node``, а потім викликає :ref:`popup_centered()<class_Window_method_popup_centered>` на ньому. У діалогового вікна не потрібно бути поточного батька, інакше метод не спрацьовує.
Дивитись також :ref:`set_unparent_when_invisible()<class_Window_method_set_unparent_when_invisible>` і :ref:`Node.get_last_exclusive_window()<class_Node_method_get_last_exclusive_window>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_popup_exclusive_centered_clamped:
.. rst-class:: classref-method
|void| **popup_exclusive_centered_clamped**\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) :ref:`🔗<class_Window_method_popup_exclusive_centered_clamped>`
Намагається зробити цей діалог батьком до останнього ексклюзивного вікна відносно ``from_node``, а потім викликає :ref:`popup_centered_clamped()<class_Window_method_popup_centered_clamped>` на ньому. У діалогового вікна не потрібно бути поточного батька, інакше метод не спрацьовує.
Дивитись також :ref:`set_unparent_when_invisible()<class_Window_method_set_unparent_when_invisible>` і :ref:`Node.get_last_exclusive_window()<class_Node_method_get_last_exclusive_window>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_popup_exclusive_centered_ratio:
.. rst-class:: classref-method
|void| **popup_exclusive_centered_ratio**\ (\ from_node\: :ref:`Node<class_Node>`, ratio\: :ref:`float<class_float>` = 0.8\ ) :ref:`🔗<class_Window_method_popup_exclusive_centered_ratio>`
Намагається зробити цей діалог батьком до останнього ексклюзивного вікна відносно ``from_node``, а потім викликає :ref:`popup_centered_ratio()<class_Window_method_popup_centered_ratio>` на ньому. У діалогового вікна не потрібно бути поточного батька, інакше метод не спрацьовує.
Дивитись також :ref:`set_unparent_when_invisible()<class_Window_method_set_unparent_when_invisible>` і :ref:`Node.get_last_exclusive_window()<class_Node_method_get_last_exclusive_window>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_popup_exclusive_on_parent:
.. rst-class:: classref-method
|void| **popup_exclusive_on_parent**\ (\ from_node\: :ref:`Node<class_Node>`, parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`🔗<class_Window_method_popup_exclusive_on_parent>`
Намагається зробити цей діалог батьком до останнього ексклюзивного вікна відносно ``from_node``, а потім викликає :ref:`popup_on_parent()<class_Window_method_popup_on_parent>` на ньому. У діалогового вікна не потрібно бути поточного батька, інакше метод не спрацьовує.
Дивитись також :ref:`set_unparent_when_invisible()<class_Window_method_set_unparent_when_invisible>` і :ref:`Node.get_last_exclusive_window()<class_Node_method_get_last_exclusive_window>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_popup_on_parent:
.. rst-class:: classref-method
|void| **popup_on_parent**\ (\ parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`🔗<class_Window_method_popup_on_parent>`
Поповнення **Window** з посадою, зміщеним батьком **Window**. Якщо вбудовується **Window**, має такий же ефект, як :ref:`popup()<class_Window_method_popup>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_remove_theme_color_override:
.. rst-class:: classref-method
|void| **remove_theme_color_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_color_override>`
Видаляє локальне перевизначення для теми :ref:`Color<class_Color>` із зазначеним параметром ``name``, попередньо доданим методом ``add_theme_color_override`` або через панель інспектора.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_remove_theme_constant_override:
.. rst-class:: classref-method
|void| **remove_theme_constant_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_constant_override>`
Видаляє локальне перевизначення для константи теми із зазначеним ``name``, попередньо доданим за допомогою :ref:`add_theme_constant_override()<class_Window_method_add_theme_constant_override>` або через панель Інспектора.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_remove_theme_font_override:
.. rst-class:: classref-method
|void| **remove_theme_font_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_font_override>`
Видаляє локальне перевизначення для теми :ref:`Font<class_Font>` із зазначеним параметром ``name of param``, попередньо доданим методом ``add_theme_font_override`` або через панель інспектора.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_remove_theme_font_size_override:
.. rst-class:: classref-method
|void| **remove_theme_font_size_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_font_size_override>`
Вилучає локальну накладку для розміру шрифту тема з вказаною ``name``, додана :ref:`add_theme_font_size_override()<class_Window_method_add_theme_font_size_override>` або через Inspector dock.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_remove_theme_icon_override:
.. rst-class:: classref-method
|void| **remove_theme_icon_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_icon_override>`
Видаліть локальну наречену на значок теми з вказаною ``name``, попередньо доданий :ref:`add_theme_icon_override()<class_Window_method_add_theme_icon_override>` або через Inspector dock.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_remove_theme_stylebox_override:
.. rst-class:: classref-method
|void| **remove_theme_stylebox_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_stylebox_override>`
Вилучає локальну наречену на тему :ref:`StyleBox<class_StyleBox>` з вказаною ``name`` раніше додано :ref:`add_theme_stylebox_override()<class_Window_method_add_theme_stylebox_override>` або через Inspector dock.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_request_attention:
.. rst-class:: classref-method
|void| **request_attention**\ (\ ) :ref:`🔗<class_Window_method_request_attention>`
Розповсюдження ОС, що **Window** вимагає уваги. Це робить вікно певним чином в залежності від системи, наприклад, він може зв'язуватися на панелі завдань.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_reset_size:
.. rst-class:: classref-method
|void| **reset_size**\ (\ ) :ref:`🔗<class_Window_method_reset_size>`
Скидає розмір до мінімального значення, яке є максимальним значенням :ref:`min_size<class_Window_property_min_size>` та (якщо :ref:`wrap_controls<class_Window_property_wrap_controls>` увімкнено) :ref:`get_contents_minimum_size()<class_Window_method_get_contents_minimum_size>`. Це еквівалентно виклику ``set_size(Vector2i())`` (або будь-якого розміру, меншого за мінімальне значення).
.. rst-class:: classref-item-separator
----
.. _class_Window_method_set_flag:
.. rst-class:: classref-method
|void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_flag>`
Встановлює вказаний прапор вікна.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_set_ime_active:
.. rst-class:: classref-method
|void| **set_ime_active**\ (\ active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_ime_active>`
Якщо ``active`` є ``true``, що дозволяє нативно зрозумілим редактором системи.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_set_ime_position:
.. rst-class:: classref-method
|void| **set_ime_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Window_method_set_ime_position>`
Переміщення IME до даної позиції.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_set_layout_direction:
.. rst-class:: classref-method
|void| **set_layout_direction**\ (\ direction\: :ref:`LayoutDirection<enum_Window_LayoutDirection>`\ ) :ref:`🔗<class_Window_method_set_layout_direction>`
Встановлює напрямок макета та напрямок написання тексту. Право-ліві макети необхідні для певних мов (наприклад, Арабський і іврит).
.. rst-class:: classref-item-separator
----
.. _class_Window_method_set_unparent_when_invisible:
.. rst-class:: classref-method
|void| **set_unparent_when_invisible**\ (\ unparent\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_unparent_when_invisible>`
Якщо ``unparent`` є ``true``, вікно автоматично непаровано при переході невидиме.
\ **Примітка:** Переконайтеся в тому, щоб зберегти посилання на вершину, інакше він буде сирим. Вам також потрібно вручну зателефонувати :ref:`Node.queue_free()<class_Node_method_queue_free>`, щоб звільнити вікно, якщо він не батьківований.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_set_use_font_oversampling:
.. rst-class:: classref-method
|void| **set_use_font_oversampling**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_use_font_oversampling>`
Увімкнути перевантаження шрифтів. Це робить шрифти краще, коли вони масштабуються.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_show:
.. rst-class:: classref-method
|void| **show**\ (\ ) :ref:`🔗<class_Window_method_show>`
З'являються **Window**. Це дозволяє взаємодіяти з **Window** і не змінює будь-яку властивість, крім видимості (наприклад, :ref:`popup()<class_Window_method_popup>`).
.. rst-class:: classref-item-separator
----
.. _class_Window_method_start_drag:
.. rst-class:: classref-method
|void| **start_drag**\ (\ ) :ref:`🔗<class_Window_method_start_drag>`
Починає інтерактивну операцію перетягування у вікні, використовуючи поточну позицію миші. Викликайте цей метод під час обробки натиснутої кнопки миші, щоб імітувати подію натискання в рядку заголовка вікна. Використання цього методу дозволяє вікну брати участь у перемиканні простору, мозаїці та інших функціях системи.
.. rst-class:: classref-item-separator
----
.. _class_Window_method_start_resize:
.. rst-class:: classref-method
|void| **start_resize**\ (\ edge\: :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>`\ ) :ref:`🔗<class_Window_method_start_resize>`
Починає інтерактивну операцію зміни розміру вікна, використовуючи поточну позицію миші. Викликайте цей метод під час обробки натиснутої кнопки миші, щоб імітувати подію натискання на краю вікна.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описи тематичної нерухомості
--------------------------------------------------------
.. _class_Window_theme_color_title_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **title_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_Window_theme_color_title_color>`
Колір тексту назв.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_color_title_outline_modulate:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **title_outline_modulate** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Window_theme_color_title_outline_modulate>`
Колір тексту заголовка.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_constant_close_h_offset:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **close_h_offset** = ``18`` :ref:`🔗<class_Window_theme_constant_close_h_offset>`
Зміщення горизонтального положення кнопки закриття відносно кінця рядка заголовка до початку рядка заголовка.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_constant_close_v_offset:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **close_v_offset** = ``24`` :ref:`🔗<class_Window_theme_constant_close_v_offset>`
Вертикальне зміщення кнопки закриття відносно нижньої частини рядка заголовка до верхньої частини рядка заголовка.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_constant_resize_margin:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **resize_margin** = ``4`` :ref:`🔗<class_Window_theme_constant_resize_margin>`
Захищаючи зовнішній запас, при якому віконний кордон може бути захоплений мишкою і негабаритним.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_constant_title_height:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **title_height** = ``36`` :ref:`🔗<class_Window_theme_constant_title_height>`
Висота заголовка.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_constant_title_outline_size:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **title_outline_size** = ``0`` :ref:`🔗<class_Window_theme_constant_title_outline_size>`
Розмір знака заголовка.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_font_title_font:
.. rst-class:: classref-themeproperty
:ref:`Font<class_Font>` **title_font** :ref:`🔗<class_Window_theme_font_title_font>`
Шрифт, який використовується для позначення назви.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_font_size_title_font_size:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **title_font_size** :ref:`🔗<class_Window_theme_font_size_title_font_size>`
Розмір шрифту назв.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_icon_close:
.. rst-class:: classref-themeproperty
:ref:`Texture2D<class_Texture2D>` **close** :ref:`🔗<class_Window_theme_icon_close>`
Ікона для близької кнопки.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_icon_close_pressed:
.. rst-class:: classref-themeproperty
:ref:`Texture2D<class_Texture2D>` **close_pressed** :ref:`🔗<class_Window_theme_icon_close_pressed>`
Ікона для близької кнопки, коли вона натискається.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_style_embedded_border:
.. rst-class:: classref-themeproperty
:ref:`StyleBox<class_StyleBox>` **embedded_border** :ref:`🔗<class_Window_theme_style_embedded_border>`
Стиль фону використовується при вбудованні **Window**. Зауважте, що це тягнеться тільки під зміст вікна, включаючи назву. Для належних кордонів і стилю бару можна використовувати ``expand_margin_*`` властивості :ref:`StyleBoxFlat<class_StyleBoxFlat>`.
\ **Примітка:** Ввімкнено фон вмісту, якщо :ref:`transparent<class_Window_property_transparent>`.
.. rst-class:: classref-item-separator
----
.. _class_Window_theme_style_embedded_unfocused_border:
.. rst-class:: classref-themeproperty
:ref:`StyleBox<class_StyleBox>` **embedded_unfocused_border** :ref:`🔗<class_Window_theme_style_embedded_unfocused_border>`
Стиль фону, що використовується при вбудованій і нефокусованій **Window**.
.. |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 (Значення не повертається.)`