summaryrefslogtreecommitdiff
path: root/doc/classes/Window.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Window.xml')
-rw-r--r--doc/classes/Window.xml131
1 files changed, 73 insertions, 58 deletions
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index f4eaaac2e1..2c0a694ef9 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -30,9 +30,9 @@
</method>
<method name="get_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="flag" type="int" enum="Window.Flags" />
+ <param index="0" name="flag" type="int" enum="Window.Flags" />
<description>
- Returns [code]true[/code] if the flag is set.
+ Returns [code]true[/code] if the [param flag] is set.
</description>
</method>
<method name="get_layout_direction" qualifiers="const">
@@ -49,19 +49,19 @@
</method>
<method name="get_theme_color" qualifiers="const">
<return type="Color" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the [Color] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the [Color] at [param name] if the theme has [param theme_type].
See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_constant" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the constant at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the constant at [param name] if the theme has [param theme_type].
See [method Control.get_theme_color] for more details.
</description>
</method>
@@ -88,37 +88,37 @@
</method>
<method name="get_theme_font" qualifiers="const">
<return type="Font" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the [Font] at [param name] if the theme has [param theme_type].
See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_font_size" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the font size at [param name] if the theme has [param theme_type].
See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the icon at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the icon at [param name] if the theme has [param theme_type].
See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_stylebox" qualifiers="const">
<return type="StyleBox" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the [StyleBox] at [param name] if the theme has [param theme_type].
See [method Control.get_theme_color] for more details.
</description>
</method>
@@ -136,50 +136,50 @@
</method>
<method name="has_theme_color" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]true[/code] if [Color] with [param name] is in [param theme_type].
</description>
</method>
<method name="has_theme_constant" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if constant with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]true[/code] if constant with [param name] is in [param theme_type].
</description>
</method>
<method name="has_theme_font" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]true[/code] if [Font] with [param name] is in [param theme_type].
</description>
</method>
<method name="has_theme_font_size" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]true[/code] if font size with [param name] is in [param theme_type].
</description>
</method>
<method name="has_theme_icon" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if icon with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]true[/code] if icon with [param name] is in [param theme_type].
</description>
</method>
<method name="has_theme_stylebox" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]true[/code] if [StyleBox] with [param name] is in [param theme_type].
</description>
</method>
<method name="hide">
@@ -220,15 +220,15 @@
</method>
<method name="popup">
<return type="void" />
- <argument index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" />
+ <param index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" />
<description>
- Shows the [Window] and makes it transient (see [member transient]). If [code]rect[/code] is provided, it will be set as the [Window]'s size.
+ Shows the [Window] and makes it transient (see [member transient]). If [param rect] is provided, it will be set as the [Window]'s size.
Fails if called on the main window.
</description>
</method>
<method name="popup_centered">
<return type="void" />
- <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
+ <param index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
<description>
Popups the [Window] at the center of the current screen, with optionally given minimum size.
If the [Window] is embedded, it will be centered in the parent [Viewport] instead.
@@ -236,8 +236,8 @@
</method>
<method name="popup_centered_clamped">
<return type="void" />
- <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
- <argument index="1" name="fallback_ratio" type="float" default="0.75" />
+ <param index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
+ <param index="1" name="fallback_ratio" type="float" default="0.75" />
<description>
Popups the [Window] centered inside its parent [Window].
[code]fallback_ratio[/code] determines the maximum size of the [Window], in relation to its parent.
@@ -245,14 +245,14 @@
</method>
<method name="popup_centered_ratio">
<return type="void" />
- <argument index="0" name="ratio" type="float" default="0.8" />
+ <param index="0" name="ratio" type="float" default="0.8" />
<description>
- Popups the [Window] centered inside its parent [Window] and sets its size as a [code]ratio[/code] of parent's size.
+ Popups the [Window] centered inside its parent [Window] and sets its size as a [param ratio] of parent's size.
</description>
</method>
<method name="popup_on_parent">
<return type="void" />
- <argument index="0" name="parent_rect" type="Rect2i" />
+ <param index="0" name="parent_rect" type="Rect2i" />
<description>
Popups the [Window] with a position shifted by parent [Window]'s position.
If the [Window] is embedded, has the same effect as [method popup].
@@ -272,36 +272,36 @@
</method>
<method name="set_flag">
<return type="void" />
- <argument index="0" name="flag" type="int" enum="Window.Flags" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="flag" type="int" enum="Window.Flags" />
+ <param index="1" name="enabled" type="bool" />
<description>
Sets a specified window flag.
</description>
</method>
<method name="set_ime_active">
<return type="void" />
- <argument index="0" name="active" type="bool" />
+ <param index="0" name="active" type="bool" />
<description>
- If [code]active[/code] is [code]true[/code], enables system's native IME (Input Method Editor).
+ If [param active] is [code]true[/code], enables system's native IME (Input Method Editor).
</description>
</method>
<method name="set_ime_position">
<return type="void" />
- <argument index="0" name="position" type="Vector2i" />
+ <param index="0" name="position" type="Vector2i" />
<description>
Moves IME to the given position.
</description>
</method>
<method name="set_layout_direction">
<return type="void" />
- <argument index="0" name="direction" type="int" enum="Window.LayoutDirection" />
+ <param index="0" name="direction" type="int" enum="Window.LayoutDirection" />
<description>
Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
</description>
</method>
<method name="set_use_font_oversampling">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Enables font oversampling. This makes fonts look better when they are scaled up.
</description>
@@ -342,11 +342,16 @@
If [code]true[/code], the [Window] will be in exclusive mode. Exclusive windows are always on top of their parent and will block all input going to the parent [Window].
Needs [member transient] enabled to work.
</member>
+ <member name="extend_to_title" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the [Window] contents is expanded to the full size of the window, window title bar is transparent.
+ </member>
<member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i(0, 0)">
If non-zero, the [Window] can't be resized to be bigger than this size.
+ [b]Note:[/b] This property will be ignored if the value is lower than [member min_size].
</member>
<member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i(0, 0)">
If non-zero, the [Window] can't be resized to be smaller than this size.
+ [b]Note:[/b] This property will be ignored in favor of [method get_contents_minimum_size] if [member wrap_controls] is enabled and if its size is bigger.
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Window.Mode" default="0">
Set's the window's current mode.
@@ -388,7 +393,7 @@
If [code]true[/code], the window is visible.
</member>
<member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" default="false">
- If [code]true[/code], the window's size will automatically update when a child node is added or removed.
+ If [code]true[/code], the window's size will automatically update when a child node is added or removed, ignoring [member min_size] if the new size is bigger.
If [code]false[/code], you need to call [method child_controls_changed] manually.
</member>
</members>
@@ -405,7 +410,7 @@
</description>
</signal>
<signal name="files_dropped">
- <argument index="0" name="files" type="PackedStringArray" />
+ <param index="0" name="files" type="PackedStringArray" />
<description>
Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths.
Note that this method only works with non-embedded windows, i.e. the main window and [Window]-derived nodes when [member Viewport.gui_embed_subwindows] is disabled in the main viewport.
@@ -446,7 +451,7 @@
</signal>
<signal name="theme_changed">
<description>
- Emitted when the [member theme] is modified or changed to another [Theme].
+ Emitted when the [constant NOTIFICATION_THEME_CHANGED] notification is sent.
</description>
</signal>
<signal name="visibility_changed">
@@ -455,7 +460,7 @@
</description>
</signal>
<signal name="window_input">
- <argument index="0" name="event" type="InputEvent" />
+ <param index="0" name="event" type="InputEvent" />
<description>
Emitted when the [Window] is currently focused and receives any input, passing the received event as an argument.
</description>
@@ -465,6 +470,13 @@
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="30">
Emitted when [Window]'s visibility changes, right before [signal visibility_changed].
</constant>
+ <constant name="NOTIFICATION_THEME_CHANGED" value="32">
+ Sent when the node needs to refresh its theme items. This happens in one of the following cases:
+ - The [member theme] property is changed on this node or any of its ancestors.
+ - The [member theme_type_variation] property is changed on this node.
+ - The node enters the scene tree.
+ [b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree.
+ </constant>
<constant name="MODE_WINDOWED" value="0" enum="Mode">
Windowed mode, i.e. [Window] doesn't occupy whole screen (unless set to the size of the screen).
</constant>
@@ -501,7 +513,10 @@
<constant name="FLAG_POPUP" value="5" enum="Flags">
Whether the window is popup or a regular window. Set with [member popup_window].
</constant>
- <constant name="FLAG_MAX" value="6" enum="Flags">
+ <constant name="FLAG_EXTEND_TO_TITLE" value="6" enum="Flags">
+ Window contents is expanded to the full size of the window, window title bar is transparent.
+ </constant>
+ <constant name="FLAG_MAX" value="7" enum="Flags">
Max value of the [enum Flags].
</constant>
<constant name="CONTENT_SCALE_MODE_DISABLED" value="0" enum="ContentScaleMode">