2020-03-31 09:56:58 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
<class name= "Window" inherits= "Viewport" version= "4.0" >
<brief_description >
2021-07-05 13:43:51 +00:00
Base class for all windows.
2020-03-31 09:56:58 +00:00
</brief_description>
<description >
2021-07-05 13:43:51 +00:00
A node that creates a window.
2020-03-31 09:56:58 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "can_draw" qualifiers= "const" >
<return type= "bool" >
</return>
<description >
2021-07-05 13:43:51 +00:00
Returns whether the window is being drawn to the screen.
2020-03-31 09:56:58 +00:00
</description>
</method>
<method name= "child_controls_changed" >
<return type= "void" >
</return>
<description >
</description>
</method>
2021-07-02 18:35:56 +00:00
<method name= "get_contents_minimum_size" qualifiers= "const" >
<return type= "Vector2" >
</return>
<description >
Returns the combined minimum size from the child [Control] nodes of the window.
</description>
</method>
2020-03-31 09:56:58 +00:00
<method name= "get_flag" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "flag" type= "int" enum= "Window.Flags" >
</argument>
<description >
2021-07-05 13:43:51 +00:00
Returns [code]true[/code] if the flag is set.
2020-03-31 09:56:58 +00:00
</description>
</method>
2020-08-12 11:49:10 +00:00
<method name= "get_layout_direction" qualifiers= "const" >
<return type= "int" enum= "Window.LayoutDirection" >
</return>
<description >
Returns layout direction and text writing direction.
</description>
</method>
2020-03-31 09:56:58 +00:00
<method name= "get_real_size" qualifiers= "const" >
<return type= "Vector2i" >
</return>
<description >
2021-07-05 13:43:51 +00:00
Returns the window's size including its border.
2020-03-31 09:56:58 +00:00
</description>
</method>
<method name= "get_theme_color" qualifiers= "const" >
<return type= "Color" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
<method name= "get_theme_constant" qualifiers= "const" >
<return type= "int" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
<method name= "get_theme_font" qualifiers= "const" >
<return type= "Font" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
2021-03-30 17:16:33 +00:00
Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
2020-08-12 11:49:10 +00:00
</description>
</method>
<method name= "get_theme_font_size" qualifiers= "const" >
<return type= "int" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-08-12 11:49:10 +00:00
</argument>
<description >
2021-03-30 17:16:33 +00:00
Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code].
2020-03-31 09:56:58 +00:00
</description>
</method>
<method name= "get_theme_icon" qualifiers= "const" >
<return type= "Texture2D" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
<method name= "get_theme_stylebox" qualifiers= "const" >
<return type= "StyleBox" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
<method name= "grab_focus" >
<return type= "void" >
</return>
<description >
2021-07-05 13:43:51 +00:00
Causes the window to grab focus, allowing it to receive user input.
2020-03-31 09:56:58 +00:00
</description>
</method>
<method name= "has_focus" qualifiers= "const" >
<return type= "bool" >
</return>
<description >
2021-07-05 13:43:51 +00:00
Returns [code]true[/code] if the window is focused.
2020-03-31 09:56:58 +00:00
</description>
</method>
<method name= "has_theme_color" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
<method name= "has_theme_constant" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
<method name= "has_theme_font" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
2021-03-30 17:16:33 +00:00
Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code].
Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
2020-08-12 11:49:10 +00:00
</description>
</method>
<method name= "has_theme_font_size" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-08-12 11:49:10 +00:00
</argument>
<description >
2021-03-30 17:16:33 +00:00
Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code].
Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
2020-03-31 09:56:58 +00:00
</description>
</method>
<method name= "has_theme_icon" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
<method name= "has_theme_stylebox" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "name" type= "StringName" >
</argument>
2021-03-30 17:16:33 +00:00
<argument index= "1" name= "theme_type" type= "StringName" default= """" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
<method name= "hide" >
<return type= "void" >
</return>
<description >
</description>
</method>
<method name= "is_embedded" qualifiers= "const" >
<return type= "bool" >
</return>
<description >
2021-07-05 13:43:51 +00:00
Returns [code]true[/code] if the window is currently embedded in another window.
2020-03-31 09:56:58 +00:00
</description>
</method>
2020-08-12 11:49:10 +00:00
<method name= "is_layout_rtl" qualifiers= "const" >
<return type= "bool" >
</return>
<description >
Returns [code]true[/code] if layout is right-to-left.
</description>
</method>
2020-03-31 09:56:58 +00:00
<method name= "is_maximize_allowed" qualifiers= "const" >
<return type= "bool" >
</return>
<description >
</description>
</method>
<method name= "is_using_font_oversampling" qualifiers= "const" >
<return type= "bool" >
</return>
<description >
</description>
</method>
<method name= "move_to_foreground" >
<return type= "void" >
</return>
<description >
</description>
</method>
<method name= "popup" >
<return type= "void" >
</return>
2019-09-24 17:45:03 +00:00
<argument index= "0" name= "rect" type= "Rect2i" default= "Rect2i(0, 0, 0, 0)" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
<method name= "popup_centered" >
<return type= "void" >
</return>
2019-09-24 17:45:03 +00:00
<argument index= "0" name= "minsize" type= "Vector2i" default= "Vector2i(0, 0)" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
<method name= "popup_centered_clamped" >
<return type= "void" >
</return>
2019-09-24 17:45:03 +00:00
<argument index= "0" name= "minsize" type= "Vector2i" default= "Vector2i(0, 0)" >
2020-03-31 09:56:58 +00:00
</argument>
<argument index= "1" name= "fallback_ratio" type= "float" default= "0.75" >
</argument>
<description >
</description>
</method>
<method name= "popup_centered_ratio" >
<return type= "void" >
</return>
<argument index= "0" name= "ratio" type= "float" default= "0.8" >
</argument>
<description >
</description>
</method>
<method name= "popup_on_parent" >
<return type= "void" >
</return>
<argument index= "0" name= "parent_rect" type= "Rect2i" >
</argument>
<description >
</description>
</method>
<method name= "request_attention" >
<return type= "void" >
</return>
<description >
</description>
</method>
<method name= "set_flag" >
<return type= "void" >
</return>
<argument index= "0" name= "flag" type= "int" enum= "Window.Flags" >
</argument>
<argument index= "1" name= "enabled" type= "bool" >
</argument>
<description >
2021-07-05 13:43:51 +00:00
Sets a specified window flag.
2020-03-31 09:56:58 +00:00
</description>
</method>
<method name= "set_ime_active" >
<return type= "void" >
</return>
2021-02-19 12:35:31 +00:00
<argument index= "0" name= "active" type= "bool" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
<method name= "set_ime_position" >
<return type= "void" >
</return>
2021-02-19 12:35:31 +00:00
<argument index= "0" name= "position" type= "Vector2i" >
2020-03-31 09:56:58 +00:00
</argument>
<description >
</description>
</method>
2020-08-12 11:49:10 +00:00
<method name= "set_layout_direction" >
<return type= "void" >
</return>
<argument index= "0" name= "direction" type= "int" enum= "Window.LayoutDirection" >
</argument>
<description >
Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
</description>
</method>
2020-03-31 09:56:58 +00:00
<method name= "set_use_font_oversampling" >
<return type= "void" >
</return>
<argument index= "0" name= "enable" type= "bool" >
</argument>
<description >
</description>
</method>
<method name= "show" >
<return type= "void" >
</return>
<description >
</description>
</method>
</methods>
<members >
<member name= "always_on_top" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
2021-07-05 13:43:51 +00:00
If [code]true[/code], the window will be on top of all other windows.
2020-03-31 09:56:58 +00:00
</member>
<member name= "borderless" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
2021-07-05 13:43:51 +00:00
If [code]true[/code], the window will have no borders.
2020-03-31 09:56:58 +00:00
</member>
<member name= "content_scale_aspect" type= "int" setter= "set_content_scale_aspect" getter= "get_content_scale_aspect" enum= "Window.ContentScaleAspect" default= "0" >
</member>
<member name= "content_scale_mode" type= "int" setter= "set_content_scale_mode" getter= "get_content_scale_mode" enum= "Window.ContentScaleMode" default= "0" >
</member>
2019-09-24 17:45:03 +00:00
<member name= "content_scale_size" type= "Vector2i" setter= "set_content_scale_size" getter= "get_content_scale_size" default= "Vector2i(0, 0)" >
2020-03-31 09:56:58 +00:00
</member>
<member name= "current_screen" type= "int" setter= "set_current_screen" getter= "get_current_screen" default= "0" >
2021-07-05 13:43:51 +00:00
The screen the window is currently on.
2020-03-31 09:56:58 +00:00
</member>
<member name= "exclusive" type= "bool" setter= "set_exclusive" getter= "is_exclusive" default= "false" >
</member>
2019-09-24 17:45:03 +00:00
<member name= "max_size" type= "Vector2i" setter= "set_max_size" getter= "get_max_size" default= "Vector2i(0, 0)" >
2020-03-31 09:56:58 +00:00
</member>
2019-09-24 17:45:03 +00:00
<member name= "min_size" type= "Vector2i" setter= "set_min_size" getter= "get_min_size" default= "Vector2i(0, 0)" >
2020-03-31 09:56:58 +00:00
</member>
<member name= "mode" type= "int" setter= "set_mode" getter= "get_mode" enum= "Window.Mode" default= "0" >
2021-07-05 13:43:51 +00:00
Set's the window's current mode.
[b]Note:[/b] Fullscreen mode is not exclusive fullscreen on Windows and Linux.
2020-03-31 09:56:58 +00:00
</member>
2019-09-24 17:45:03 +00:00
<member name= "position" type= "Vector2i" setter= "set_position" getter= "get_position" default= "Vector2i(0, 0)" >
2021-07-05 13:43:51 +00:00
The window's position in pixels.
2020-03-31 09:56:58 +00:00
</member>
2019-09-24 17:45:03 +00:00
<member name= "size" type= "Vector2i" setter= "set_size" getter= "get_size" default= "Vector2i(100, 100)" >
2021-07-05 13:43:51 +00:00
The window's size in pixels.
2020-03-31 09:56:58 +00:00
</member>
<member name= "theme" type= "Theme" setter= "set_theme" getter= "get_theme" >
</member>
2021-06-05 19:24:24 +00:00
<member name= "theme_custom_type" type= "StringName" setter= "set_theme_custom_type" getter= "get_theme_custom_type" default= "&""" >
2021-03-30 17:16:33 +00:00
</member>
2020-03-31 09:56:58 +00:00
<member name= "title" type= "String" setter= "set_title" getter= "get_title" default= """" >
2021-07-05 13:43:51 +00:00
The window's title.
2020-03-31 09:56:58 +00:00
</member>
<member name= "transient" type= "bool" setter= "set_transient" getter= "is_transient" default= "false" >
</member>
<member name= "transparent" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
</member>
<member name= "unfocusable" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
</member>
<member name= "unresizable" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
2021-07-05 13:43:51 +00:00
If [code]true[/code], the window can't be resized.
2020-03-31 09:56:58 +00:00
</member>
<member name= "visible" type= "bool" setter= "set_visible" getter= "is_visible" default= "true" >
2021-07-05 13:43:51 +00:00
If [code]true[/code], the window is visible.
2020-03-31 09:56:58 +00:00
</member>
<member name= "wrap_controls" type= "bool" setter= "set_wrap_controls" getter= "is_wrapping_controls" default= "false" >
</member>
</members>
<signals >
<signal name= "about_to_popup" >
<description >
</description>
</signal>
<signal name= "close_requested" >
<description >
</description>
</signal>
<signal name= "files_dropped" >
<argument index= "0" name= "files" type= "PackedStringArray" >
</argument>
<description >
</description>
</signal>
<signal name= "focus_entered" >
<description >
</description>
</signal>
<signal name= "focus_exited" >
<description >
</description>
</signal>
<signal name= "go_back_requested" >
<description >
</description>
</signal>
<signal name= "mouse_entered" >
<description >
</description>
</signal>
<signal name= "mouse_exited" >
<description >
</description>
</signal>
<signal name= "visibility_changed" >
<description >
</description>
</signal>
<signal name= "window_input" >
<argument index= "0" name= "event" type= "InputEvent" >
</argument>
<description >
</description>
</signal>
</signals>
<constants >
<constant name= "NOTIFICATION_VISIBILITY_CHANGED" value= "30" >
</constant>
<constant name= "MODE_WINDOWED" value= "0" enum= "Mode" >
2021-07-05 13:43:51 +00:00
Windowed mode.
2020-03-31 09:56:58 +00:00
</constant>
<constant name= "MODE_MINIMIZED" value= "1" enum= "Mode" >
2021-07-05 13:43:51 +00:00
Minimized window mode.
2020-03-31 09:56:58 +00:00
</constant>
<constant name= "MODE_MAXIMIZED" value= "2" enum= "Mode" >
2021-07-05 13:43:51 +00:00
Maximized window mode.
2020-03-31 09:56:58 +00:00
</constant>
<constant name= "MODE_FULLSCREEN" value= "3" enum= "Mode" >
2020-09-03 19:59:40 +00:00
Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
2020-03-31 09:56:58 +00:00
</constant>
<constant name= "FLAG_RESIZE_DISABLED" value= "0" enum= "Flags" >
2021-07-05 13:43:51 +00:00
The window's ability to be resized.
2020-03-31 09:56:58 +00:00
</constant>
<constant name= "FLAG_BORDERLESS" value= "1" enum= "Flags" >
2021-07-05 13:43:51 +00:00
Borderless window.
2020-03-31 09:56:58 +00:00
</constant>
<constant name= "FLAG_ALWAYS_ON_TOP" value= "2" enum= "Flags" >
2021-07-05 13:43:51 +00:00
Flag for making the window always on top of all other windows.
2020-03-31 09:56:58 +00:00
</constant>
<constant name= "FLAG_TRANSPARENT" value= "3" enum= "Flags" >
</constant>
<constant name= "FLAG_NO_FOCUS" value= "4" enum= "Flags" >
</constant>
<constant name= "FLAG_MAX" value= "5" enum= "Flags" >
</constant>
<constant name= "CONTENT_SCALE_MODE_DISABLED" value= "0" enum= "ContentScaleMode" >
</constant>
2020-07-03 14:09:12 +00:00
<constant name= "CONTENT_SCALE_MODE_CANVAS_ITEMS" value= "1" enum= "ContentScaleMode" >
2020-03-31 09:56:58 +00:00
</constant>
2020-07-03 14:09:12 +00:00
<constant name= "CONTENT_SCALE_MODE_VIEWPORT" value= "2" enum= "ContentScaleMode" >
2020-03-31 09:56:58 +00:00
</constant>
<constant name= "CONTENT_SCALE_ASPECT_IGNORE" value= "0" enum= "ContentScaleAspect" >
</constant>
<constant name= "CONTENT_SCALE_ASPECT_KEEP" value= "1" enum= "ContentScaleAspect" >
</constant>
<constant name= "CONTENT_SCALE_ASPECT_KEEP_WIDTH" value= "2" enum= "ContentScaleAspect" >
</constant>
<constant name= "CONTENT_SCALE_ASPECT_KEEP_HEIGHT" value= "3" enum= "ContentScaleAspect" >
</constant>
<constant name= "CONTENT_SCALE_ASPECT_EXPAND" value= "4" enum= "ContentScaleAspect" >
</constant>
2020-08-12 11:49:10 +00:00
<constant name= "LAYOUT_DIRECTION_INHERITED" value= "0" enum= "LayoutDirection" >
Automatic layout direction, determined from the parent control layout direction.
</constant>
<constant name= "LAYOUT_DIRECTION_LOCALE" value= "1" enum= "LayoutDirection" >
Automatic layout direction, determined from the current locale.
</constant>
<constant name= "LAYOUT_DIRECTION_LTR" value= "2" enum= "LayoutDirection" >
Left-to-right layout direction.
</constant>
<constant name= "LAYOUT_DIRECTION_RTL" value= "3" enum= "LayoutDirection" >
Right-to-left layout direction.
</constant>
2020-03-31 09:56:58 +00:00
</constants>
<theme_items >
<theme_item name= "close" type= "Texture2D" >
</theme_item>
<theme_item name= "close_h_ofs" type= "int" default= "18" >
</theme_item>
<theme_item name= "close_highlight" type= "Texture2D" >
</theme_item>
<theme_item name= "close_v_ofs" type= "int" default= "18" >
</theme_item>
<theme_item name= "panel" type= "StyleBox" >
</theme_item>
<theme_item name= "resize_margin" type= "int" default= "4" >
</theme_item>
<theme_item name= "scaleborder_size" type= "int" default= "4" >
</theme_item>
2019-09-24 17:45:03 +00:00
<theme_item name= "title_color" type= "Color" default= "Color(0, 0, 0, 1)" >
2020-03-31 09:56:58 +00:00
</theme_item>
<theme_item name= "title_font" type= "Font" >
</theme_item>
2020-12-25 21:45:28 +00:00
<theme_item name= "title_font_size" type= "int" >
The size of the title font.
</theme_item>
2020-03-31 09:56:58 +00:00
<theme_item name= "title_height" type= "int" default= "20" >
</theme_item>
2019-09-24 17:45:03 +00:00
<theme_item name= "title_outline_modulate" type= "Color" default= "Color(1, 1, 1, 1)" >
2020-12-25 21:45:28 +00:00
The color of the title outline.
</theme_item>
<theme_item name= "title_outline_size" type= "int" default= "0" >
The size of the title outline.
</theme_item>
2020-03-31 09:56:58 +00:00
<theme_item name= "window_panel" type= "StyleBox" >
</theme_item>
</theme_items>
</class>