Debian Codegraph @

doc/classes/Window.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="Window" inherits="Viewport" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Base class for all windows, dialogs, and popups.
5 </brief_description>
6 <description>
7 A node that creates a window. The window can either be a native system window or embedded inside another [Window] (see [member Viewport.gui_embed_subwindows]).
8 At runtime, [Window]s will not close automatically when requested. You need to handle it manually using the [signal close_requested] signal (this applies both to pressing the close button and clicking outside of a popup).
9 </description>
10 <tutorials>
11 </tutorials>
12 <methods>
13 <method name="_get_contents_minimum_size" qualifiers="virtual const">
14 <return type="Vector2" />
15 <description>
16 Virtual method to be implemented by the user. Overrides the value returned by [method get_contents_minimum_size].
17 </description>
18 </method>
19 <method name="add_theme_color_override">
20 <return type="void" />
21 <param index="0" name="name" type="StringName" />
22 <param index="1" name="color" type="Color" />
23 <description>
24 Creates a local override for a theme [Color] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override].
25 See also [method get_theme_color] and [method Control.add_theme_color_override] for more details.
26 </description>
27 </method>
28 <method name="add_theme_constant_override">
29 <return type="void" />
30 <param index="0" name="name" type="StringName" />
31 <param index="1" name="constant" type="int" />
32 <description>
33 Creates a local override for a theme constant with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override].
34 See also [method get_theme_constant].
35 </description>
36 </method>
37 <method name="add_theme_font_override">
38 <return type="void" />
39 <param index="0" name="name" type="StringName" />
40 <param index="1" name="font" type="Font" />
41 <description>
42 Creates a local override for a theme [Font] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override].
43 See also [method get_theme_font].
44 </description>
45 </method>
46 <method name="add_theme_font_size_override">
47 <return type="void" />
48 <param index="0" name="name" type="StringName" />
49 <param index="1" name="font_size" type="int" />
50 <description>
51 Creates a local override for a theme font size with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override].
52 See also [method get_theme_font_size].
53 </description>
54 </method>
55 <method name="add_theme_icon_override">
56 <return type="void" />
57 <param index="0" name="name" type="StringName" />
58 <param index="1" name="texture" type="Texture2D" />
59 <description>
60 Creates a local override for a theme icon with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override].
61 See also [method get_theme_icon].
62 </description>
63 </method>
64 <method name="add_theme_stylebox_override">
65 <return type="void" />
66 <param index="0" name="name" type="StringName" />
67 <param index="1" name="stylebox" type="StyleBox" />
68 <description>
69 Creates a local override for a theme [StyleBox] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override].
70 See also [method get_theme_stylebox] and [method Control.add_theme_stylebox_override] for more details.
71 </description>
72 </method>
73 <method name="begin_bulk_theme_override">
74 <return type="void" />
75 <description>
76 Prevents [code]*_theme_*_override[/code] methods from emitting [constant NOTIFICATION_THEME_CHANGED] until [method end_bulk_theme_override] is called.
77 </description>
78 </method>
79 <method name="can_draw" qualifiers="const">
80 <return type="bool" />
81 <description>
82 Returns whether the window is being drawn to the screen.
83 </description>
84 </method>
85 <method name="child_controls_changed">
86 <return type="void" />
87 <description>
88 Requests an update of the [Window] size to fit underlying [Control] nodes.
89 </description>
90 </method>
91 <method name="end_bulk_theme_override">
92 <return type="void" />
93 <description>
94 Ends a bulk theme override update. See [method begin_bulk_theme_override].
95 </description>
96 </method>
97 <method name="get_contents_minimum_size" qualifiers="const">
98 <return type="Vector2" />
99 <description>
100 Returns the combined minimum size from the child [Control] nodes of the window. Use [method child_controls_changed] to update it when child nodes have changed.
101 The value returned by this method can be overridden with [method _get_contents_minimum_size].
102 </description>
103 </method>
104 <method name="get_flag" qualifiers="const">
105 <return type="bool" />
106 <param index="0" name="flag" type="int" enum="Window.Flags" />
107 <description>
108 Returns [code]true[/code] if the [param flag] is set.
109 </description>
110 </method>
111 <method name="get_focused_window" qualifiers="static">
112 <return type="Window" />
113 <description>
114 Returns the focused window.
115 </description>
116 </method>
117 <method name="get_layout_direction" qualifiers="const">
118 <return type="int" enum="Window.LayoutDirection" />
119 <description>
120 Returns layout direction and text writing direction.
121 </description>
122 </method>
123 <method name="get_position_with_decorations" qualifiers="const">
124 <return type="Vector2i" />
125 <description>
126 Returns the window's position including its border.
127 [b]Note:[/b] If [member visible] is [code]false[/code], this method returns the same value as [member position].
128 </description>
129 </method>
130 <method name="get_size_with_decorations" qualifiers="const">
131 <return type="Vector2i" />
132 <description>
133 Returns the window's size including its border.
134 [b]Note:[/b] If [member visible] is [code]false[/code], this method returns the same value as [member size].
135 </description>
136 </method>
137 <method name="get_theme_color" qualifiers="const">
138 <return type="Color" />
139 <param index="0" name="name" type="StringName" />
140 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
141 <description>
142 Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [param name] and [param theme_type].
143 See [method Control.get_theme_color] for more details.
144 </description>
145 </method>
146 <method name="get_theme_constant" qualifiers="const">
147 <return type="int" />
148 <param index="0" name="name" type="StringName" />
149 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
150 <description>
151 Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [param name] and [param theme_type].
152 See [method Control.get_theme_color] for more details.
153 </description>
154 </method>
155 <method name="get_theme_default_base_scale" qualifiers="const">
156 <return type="float" />
157 <description>
158 Returns the default base scale value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_base_scale] value.
159 See [method Control.get_theme_color] for details.
160 </description>
161 </method>
162 <method name="get_theme_default_font" qualifiers="const">
163 <return type="Font" />
164 <description>
165 Returns the default font from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font] value.
166 See [method Control.get_theme_color] for details.
167 </description>
168 </method>
169 <method name="get_theme_default_font_size" qualifiers="const">
170 <return type="int" />
171 <description>
172 Returns the default font size value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font_size] value.
173 See [method Control.get_theme_color] for details.
174 </description>
175 </method>
176 <method name="get_theme_font" qualifiers="const">
177 <return type="Font" />
178 <param index="0" name="name" type="StringName" />
179 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
180 <description>
181 Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [param name] and [param theme_type].
182 See [method Control.get_theme_color] for details.
183 </description>
184 </method>
185 <method name="get_theme_font_size" qualifiers="const">
186 <return type="int" />
187 <param index="0" name="name" type="StringName" />
188 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
189 <description>
190 Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [param name] and [param theme_type].
191 See [method Control.get_theme_color] for details.
192 </description>
193 </method>
194 <method name="get_theme_icon" qualifiers="const">
195 <return type="Texture2D" />
196 <param index="0" name="name" type="StringName" />
197 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
198 <description>
199 Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [param name] and [param theme_type].
200 See [method Control.get_theme_color] for details.
201 </description>
202 </method>
203 <method name="get_theme_stylebox" qualifiers="const">
204 <return type="StyleBox" />
205 <param index="0" name="name" type="StringName" />
206 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
207 <description>
208 Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [param name] and [param theme_type].
209 See [method Control.get_theme_color] for details.
210 </description>
211 </method>
212 <method name="get_window_id" qualifiers="const">
213 <return type="int" />
214 <description>
215 Returns the ID of the window.
216 </description>
217 </method>
218 <method name="grab_focus">
219 <return type="void" />
220 <description>
221 Causes the window to grab focus, allowing it to receive user input.
222 </description>
223 </method>
224 <method name="has_focus" qualifiers="const">
225 <return type="bool" />
226 <description>
227 Returns [code]true[/code] if the window is focused.
228 </description>
229 </method>
230 <method name="has_theme_color" qualifiers="const">
231 <return type="bool" />
232 <param index="0" name="name" type="StringName" />
233 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
234 <description>
235 Returns [code]true[/code] if there is a matching [Theme] in the tree that has a color item with the specified [param name] and [param theme_type].
236 See [method Control.get_theme_color] for details.
237 </description>
238 </method>
239 <method name="has_theme_color_override" qualifiers="const">
240 <return type="bool" />
241 <param index="0" name="name" type="StringName" />
242 <description>
243 Returns [code]true[/code] if there is a local override for a theme [Color] with the specified [param name] in this [Control] node.
244 See [method add_theme_color_override].
245 </description>
246 </method>
247 <method name="has_theme_constant" qualifiers="const">
248 <return type="bool" />
249 <param index="0" name="name" type="StringName" />
250 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
251 <description>
252 Returns [code]true[/code] if there is a matching [Theme] in the tree that has a constant item with the specified [param name] and [param theme_type].
253 See [method Control.get_theme_color] for details.
254 </description>
255 </method>
256 <method name="has_theme_constant_override" qualifiers="const">
257 <return type="bool" />
258 <param index="0" name="name" type="StringName" />
259 <description>
260 Returns [code]true[/code] if there is a local override for a theme constant with the specified [param name] in this [Control] node.
261 See [method add_theme_constant_override].
262 </description>
263 </method>
264 <method name="has_theme_font" qualifiers="const">
265 <return type="bool" />
266 <param index="0" name="name" type="StringName" />
267 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
268 <description>
269 Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font item with the specified [param name] and [param theme_type].
270 See [method Control.get_theme_color] for details.
271 </description>
272 </method>
273 <method name="has_theme_font_override" qualifiers="const">
274 <return type="bool" />
275 <param index="0" name="name" type="StringName" />
276 <description>
277 Returns [code]true[/code] if there is a local override for a theme [Font] with the specified [param name] in this [Control] node.
278 See [method add_theme_font_override].
279 </description>
280 </method>
281 <method name="has_theme_font_size" qualifiers="const">
282 <return type="bool" />
283 <param index="0" name="name" type="StringName" />
284 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
285 <description>
286 Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font size item with the specified [param name] and [param theme_type].
287 See [method Control.get_theme_color] for details.
288 </description>
289 </method>
290 <method name="has_theme_font_size_override" qualifiers="const">
291 <return type="bool" />
292 <param index="0" name="name" type="StringName" />
293 <description>
294 Returns [code]true[/code] if there is a local override for a theme font size with the specified [param name] in this [Control] node.
295 See [method add_theme_font_size_override].
296 </description>
297 </method>
298 <method name="has_theme_icon" qualifiers="const">
299 <return type="bool" />
300 <param index="0" name="name" type="StringName" />
301 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
302 <description>
303 Returns [code]true[/code] if there is a matching [Theme] in the tree that has an icon item with the specified [param name] and [param theme_type].
304 See [method Control.get_theme_color] for details.
305 </description>
306 </method>
307 <method name="has_theme_icon_override" qualifiers="const">
308 <return type="bool" />
309 <param index="0" name="name" type="StringName" />
310 <description>
311 Returns [code]true[/code] if there is a local override for a theme icon with the specified [param name] in this [Control] node.
312 See [method add_theme_icon_override].
313 </description>
314 </method>
315 <method name="has_theme_stylebox" qualifiers="const">
316 <return type="bool" />
317 <param index="0" name="name" type="StringName" />
318 <param index="1" name="theme_type" type="StringName" default="&amp;&quot;&quot;" />
319 <description>
320 Returns [code]true[/code] if there is a matching [Theme] in the tree that has a stylebox item with the specified [param name] and [param theme_type].
321 See [method Control.get_theme_color] for details.
322 </description>
323 </method>
324 <method name="has_theme_stylebox_override" qualifiers="const">
325 <return type="bool" />
326 <param index="0" name="name" type="StringName" />
327 <description>
328 Returns [code]true[/code] if there is a local override for a theme [StyleBox] with the specified [param name] in this [Control] node.
329 See [method add_theme_stylebox_override].
330 </description>
331 </method>
332 <method name="hide">
333 <return type="void" />
334 <description>
335 Hides the window. This is not the same as minimized state. Hidden window can't be interacted with and needs to be made visible with [method show].
336 </description>
337 </method>
338 <method name="is_embedded" qualifiers="const">
339 <return type="bool" />
340 <description>
341 Returns [code]true[/code] if the window is currently embedded in another window.
342 </description>
343 </method>
344 <method name="is_layout_rtl" qualifiers="const">
345 <return type="bool" />
346 <description>
347 Returns [code]true[/code] if the layout is right-to-left.
348 </description>
349 </method>
350 <method name="is_maximize_allowed" qualifiers="const">
351 <return type="bool" />
352 <description>
353 Returns [code]true[/code] if the window can be maximized (the maximize button is enabled).
354 </description>
355 </method>
356 <method name="is_using_font_oversampling" qualifiers="const">
357 <return type="bool" />
358 <description>
359 Returns [code]true[/code] if font oversampling is enabled. See [method set_use_font_oversampling].
360 </description>
361 </method>
362 <method name="move_to_center">
363 <return type="void" />
364 <description>
365 Centers the window in the current screen. If the window is embedded, it is centered in the embedder [Viewport] instead.
366 </description>
367 </method>
368 <method name="move_to_foreground" deprecated="Use [method Window.grab_focus] instead.">
369 <return type="void" />
370 <description>
371 Causes the window to grab focus, allowing it to receive user input.
372 </description>
373 </method>
374 <method name="popup">
375 <return type="void" />
376 <param index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" />
377 <description>
378 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.
379 If [member ProjectSettings.display/window/subwindows/embed_subwindows] is [code]true[/code] (single-window mode), [param rect]'s coordinates are global and relative to the main window's top-left corner (excluding window decorations). If [param rect]'s position coordinates are negative, the window will be located outside the main window and may not be visible as a result.
380 If [member ProjectSettings.display/window/subwindows/embed_subwindows] is [code]false[/code] (multi-window mode), [param rect]'s coordinates are global and relative to the top-left corner of the leftmost screen. If [param rect]'s position coordinates are negative, the window will be placed at the top-left corner of the screen.
381 [b]Note:[/b] [param rect] must be in global coordinates if specified.
382 </description>
383 </method>
384 <method name="popup_centered">
385 <return type="void" />
386 <param index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
387 <description>
388 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.
389 [b]Note:[/b] Calling it with the default value of [param minsize] is equivalent to calling it with [member size].
390 </description>
391 </method>
392 <method name="popup_centered_clamped" keywords="minsize">
393 <return type="void" />
394 <param index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
395 <param index="1" name="fallback_ratio" type="float" default="0.75" />
396 <description>
397 Popups the [Window] centered inside its parent [Window]. [param fallback_ratio] determines the maximum size of the [Window], in relation to its parent.
398 [b]Note:[/b] Calling it with the default value of [param minsize] is equivalent to calling it with [member size].
399 </description>
400 </method>
401 <method name="popup_centered_ratio">
402 <return type="void" />
403 <param index="0" name="ratio" type="float" default="0.8" />
404 <description>
405 If [Window] is embedded, popups the [Window] centered inside its embedder and sets its size as a [param ratio] of embedder's size.
406 If [Window] is a native window, popups the [Window] centered inside the screen of its parent [Window] and sets its size as a [param ratio] of the screen size.
407 </description>
408 </method>
409 <method name="popup_exclusive">
410 <return type="void" />
411 <param index="0" name="from_node" type="Node" />
412 <param index="1" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" />
413 <description>
414 Attempts to parent this dialog to the last exclusive window relative to [param from_node], and then calls [method Window.popup] on it. The dialog must have no current parent, otherwise the method fails.
415 See also [method set_unparent_when_invisible] and [method Node.get_last_exclusive_window].
416 </description>
417 </method>
418 <method name="popup_exclusive_centered">
419 <return type="void" />
420 <param index="0" name="from_node" type="Node" />
421 <param index="1" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
422 <description>
423 Attempts to parent this dialog to the last exclusive window relative to [param from_node], and then calls [method Window.popup_centered] on it. The dialog must have no current parent, otherwise the method fails.
424 See also [method set_unparent_when_invisible] and [method Node.get_last_exclusive_window].
425 </description>
426 </method>
427 <method name="popup_exclusive_centered_clamped" keywords="minsize">
428 <return type="void" />
429 <param index="0" name="from_node" type="Node" />
430 <param index="1" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
431 <param index="2" name="fallback_ratio" type="float" default="0.75" />
432 <description>
433 Attempts to parent this dialog to the last exclusive window relative to [param from_node], and then calls [method Window.popup_centered_clamped] on it. The dialog must have no current parent, otherwise the method fails.
434 See also [method set_unparent_when_invisible] and [method Node.get_last_exclusive_window].
435 </description>
436 </method>
437 <method name="popup_exclusive_centered_ratio">
438 <return type="void" />
439 <param index="0" name="from_node" type="Node" />
440 <param index="1" name="ratio" type="float" default="0.8" />
441 <description>
442 Attempts to parent this dialog to the last exclusive window relative to [param from_node], and then calls [method Window.popup_centered_ratio] on it. The dialog must have no current parent, otherwise the method fails.
443 See also [method set_unparent_when_invisible] and [method Node.get_last_exclusive_window].
444 </description>
445 </method>
446 <method name="popup_exclusive_on_parent">
447 <return type="void" />
448 <param index="0" name="from_node" type="Node" />
449 <param index="1" name="parent_rect" type="Rect2i" />
450 <description>
451 Attempts to parent this dialog to the last exclusive window relative to [param from_node], and then calls [method Window.popup_on_parent] on it. The dialog must have no current parent, otherwise the method fails.
452 See also [method set_unparent_when_invisible] and [method Node.get_last_exclusive_window].
453 </description>
454 </method>
455 <method name="popup_on_parent">
456 <return type="void" />
457 <param index="0" name="parent_rect" type="Rect2i" />
458 <description>
459 Popups the [Window] with a position shifted by parent [Window]'s position. If the [Window] is embedded, has the same effect as [method popup].
460 </description>
461 </method>
462 <method name="remove_theme_color_override">
463 <return type="void" />
464 <param index="0" name="name" type="StringName" />
465 <description>
466 Removes a local override for a theme [Color] with the specified [param name] previously added by [method add_theme_color_override] or via the Inspector dock.
467 </description>
468 </method>
469 <method name="remove_theme_constant_override">
470 <return type="void" />
471 <param index="0" name="name" type="StringName" />
472 <description>
473 Removes a local override for a theme constant with the specified [param name] previously added by [method add_theme_constant_override] or via the Inspector dock.
474 </description>
475 </method>
476 <method name="remove_theme_font_override">
477 <return type="void" />
478 <param index="0" name="name" type="StringName" />
479 <description>
480 Removes a local override for a theme [Font] with the specified [param name] previously added by [method add_theme_font_override] or via the Inspector dock.
481 </description>
482 </method>
483 <method name="remove_theme_font_size_override">
484 <return type="void" />
485 <param index="0" name="name" type="StringName" />
486 <description>
487 Removes a local override for a theme font size with the specified [param name] previously added by [method add_theme_font_size_override] or via the Inspector dock.
488 </description>
489 </method>
490 <method name="remove_theme_icon_override">
491 <return type="void" />
492 <param index="0" name="name" type="StringName" />
493 <description>
494 Removes a local override for a theme icon with the specified [param name] previously added by [method add_theme_icon_override] or via the Inspector dock.
495 </description>
496 </method>
497 <method name="remove_theme_stylebox_override">
498 <return type="void" />
499 <param index="0" name="name" type="StringName" />
500 <description>
501 Removes a local override for a theme [StyleBox] with the specified [param name] previously added by [method add_theme_stylebox_override] or via the Inspector dock.
502 </description>
503 </method>
504 <method name="request_attention">
505 <return type="void" />
506 <description>
507 Tells the OS that the [Window] needs an attention. This makes the window stand out in some way depending on the system, e.g. it might blink on the task bar.
508 </description>
509 </method>
510 <method name="reset_size">
511 <return type="void" />
512 <description>
513 Resets the size to the minimum size, which is the max of [member min_size] and (if [member wrap_controls] is enabled) [method get_contents_minimum_size]. This is equivalent to calling [code]set_size(Vector2i())[/code] (or any size below the minimum).
514 </description>
515 </method>
516 <method name="set_flag">
517 <return type="void" />
518 <param index="0" name="flag" type="int" enum="Window.Flags" />
519 <param index="1" name="enabled" type="bool" />
520 <description>
521 Sets a specified window flag.
522 </description>
523 </method>
524 <method name="set_ime_active">
525 <return type="void" />
526 <param index="0" name="active" type="bool" />
527 <description>
528 If [param active] is [code]true[/code], enables system's native IME (Input Method Editor).
529 </description>
530 </method>
531 <method name="set_ime_position">
532 <return type="void" />
533 <param index="0" name="position" type="Vector2i" />
534 <description>
535 Moves IME to the given position.
536 </description>
537 </method>
538 <method name="set_layout_direction">
539 <return type="void" />
540 <param index="0" name="direction" type="int" enum="Window.LayoutDirection" />
541 <description>
542 Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
543 </description>
544 </method>
545 <method name="set_unparent_when_invisible">
546 <return type="void" />
547 <param index="0" name="unparent" type="bool" />
548 <description>
549 If [param unparent] is [code]true[/code], the window is automatically unparented when going invisible.
550 [b]Note:[/b] Make sure to keep a reference to the node, otherwise it will be orphaned. You also need to manually call [method Node.queue_free] to free the window if it's not parented.
551 </description>
552 </method>
553 <method name="set_use_font_oversampling">
554 <return type="void" />
555 <param index="0" name="enable" type="bool" />
556 <description>
557 Enables font oversampling. This makes fonts look better when they are scaled up.
558 </description>
559 </method>
560 <method name="show">
561 <return type="void" />
562 <description>
563 Makes the [Window] appear. This enables interactions with the [Window] and doesn't change any of its property other than visibility (unlike e.g. [method popup]).
564 </description>
565 </method>
566 <method name="start_drag">
567 <return type="void" />
568 <description>
569 Starts an interactive drag operation on the window, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's title bar. Using this method allows the window to participate in space switching, tiling, and other system features.
570 </description>
571 </method>
572 <method name="start_resize">
573 <return type="void" />
574 <param index="0" name="edge" type="int" enum="DisplayServer.WindowResizeEdge" />
575 <description>
576 Starts an interactive resize operation on the window, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's edge.
577 </description>
578 </method>
579 </methods>
580 <members>
581 <member name="accessibility_description" type="String" setter="set_accessibility_description" getter="get_accessibility_description" default="&quot;&quot;">
582 The human-readable node description that is reported to assistive apps.
583 </member>
584 <member name="accessibility_name" type="String" setter="set_accessibility_name" getter="get_accessibility_name" default="&quot;&quot;">
585 The human-readable node name that is reported to assistive apps.
586 </member>
587 <member name="always_on_top" type="bool" setter="set_flag" getter="get_flag" default="false">
588 If [code]true[/code], the window will be on top of all other windows. Does not work if [member transient] is enabled.
589 </member>
590 <member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" deprecated="Use [member Node.auto_translate_mode] and [method Node.can_auto_translate] instead.">
591 Toggles if any text should automatically change to its translated version depending on the current locale.
592 </member>
593 <member name="borderless" type="bool" setter="set_flag" getter="get_flag" default="false">
594 If [code]true[/code], the window will have no borders.
595 </member>
596 <member name="content_scale_aspect" type="int" setter="set_content_scale_aspect" getter="get_content_scale_aspect" enum="Window.ContentScaleAspect" default="0">
597 Specifies how the content's aspect behaves when the [Window] is resized. The base aspect is determined by [member content_scale_size].
598 </member>
599 <member name="content_scale_factor" type="float" setter="set_content_scale_factor" getter="get_content_scale_factor" default="1.0">
600 Specifies the base scale of [Window]'s content when its [member size] is equal to [member content_scale_size]. See also [method Viewport.get_stretch_transform].
601 </member>
602 <member name="content_scale_mode" type="int" setter="set_content_scale_mode" getter="get_content_scale_mode" enum="Window.ContentScaleMode" default="0">
603 Specifies how the content is scaled when the [Window] is resized.
604 </member>
605 <member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)">
606 The content's base size in "virtual" pixels. Not to be confused with [member size], which sets the actual window's physical size in pixels. If set to a value greater than [code]0[/code] and [member content_scale_mode] is set to a value other than [constant CONTENT_SCALE_MODE_DISABLED], the [Window]'s content will be scaled when the window is resized to a different size. Higher values will make the content appear [i]smaller[/i], as it will be able to fit more of the project in view. On the root [Window], this is set to match [member ProjectSettings.display/window/size/viewport_width] and [member ProjectSettings.display/window/size/viewport_height] by default.
607 For example, when using [constant CONTENT_SCALE_MODE_CANVAS_ITEMS] and [member content_scale_size] set to [code]Vector2i(1280, 720)[/code], using a window size of [code]2560×1440[/code] will make 2D elements appear at double their original size, as the content is scaled by a factor of [code]2.0[/code] ([code]2560.0 / 1280.0 = 2.0[/code], [code]1440.0 / 720.0 = 2.0[/code]).
608 See [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html#base-size]the Base size section of the Multiple resolutions documentation[/url] for details.
609 </member>
610 <member name="content_scale_stretch" type="int" setter="set_content_scale_stretch" getter="get_content_scale_stretch" enum="Window.ContentScaleStretch" default="0">
611 The policy to use to determine the final scale factor for 2D elements. This affects how [member content_scale_factor] is applied, in addition to the automatic scale factor determined by [member content_scale_size].
612 </member>
613 <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen">
614 The screen the window is currently on.
615 </member>
616 <member name="exclude_from_capture" type="bool" setter="set_flag" getter="get_flag" default="false">
617 If [code]true[/code], the [Window] is excluded from screenshots taken by [method DisplayServer.screen_get_image], [method DisplayServer.screen_get_image_rect], and [method DisplayServer.screen_get_pixel].
618 [b]Note:[/b] This property is implemented on macOS and Windows.
619 [b]Note:[/b] Enabling this setting will prevent standard screenshot methods from capturing a window image, but does [b]NOT[/b] guarantee that other apps won't be able to capture an image. It should not be used as a DRM or security measure.
620 </member>
621 <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">
622 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].
623 Needs [member transient] enabled to work.
624 </member>
625 <member name="extend_to_title" type="bool" setter="set_flag" getter="get_flag" default="false">
626 If [code]true[/code], the [Window] contents is expanded to the full size of the window, window title bar is transparent.
627 [b]Note:[/b] This property is implemented only on macOS.
628 [b]Note:[/b] This property only works with native windows.
629 </member>
630 <member name="force_native" type="bool" setter="set_force_native" getter="get_force_native" default="false">
631 If [code]true[/code], native window will be used regardless of parent viewport and project settings.
632 </member>
633 <member name="initial_position" type="int" setter="set_initial_position" getter="get_initial_position" enum="Window.WindowInitialPosition" default="0">
634 Specifies the initial type of position for the [Window].
635 </member>
636 <member name="keep_title_visible" type="bool" setter="set_keep_title_visible" getter="get_keep_title_visible" default="false">
637 If [code]true[/code], the [Window] width is expanded to keep the title bar text fully visible.
638 </member>
639 <member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i(0, 0)">
640 If non-zero, the [Window] can't be resized to be bigger than this size.
641 [b]Note:[/b] This property will be ignored if the value is lower than [member min_size].
642 </member>
643 <member name="maximize_disabled" type="bool" setter="set_flag" getter="get_flag" default="false">
644 If [code]true[/code], the [Window]'s maximize button is disabled.
645 [b]Note:[/b] If both minimize and maximize buttons are disabled, buttons are fully hidden, and only close button is visible.
646 [b]Note:[/b] This property is implemented only on macOS and Windows.
647 </member>
648 <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i(0, 0)">
649 If non-zero, the [Window] can't be resized to be smaller than this size.
650 [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.
651 </member>
652 <member name="minimize_disabled" type="bool" setter="set_flag" getter="get_flag" default="false">
653 If [code]true[/code], the [Window]'s minimize button is disabled.
654 [b]Note:[/b] If both minimize and maximize buttons are disabled, buttons are fully hidden, and only close button is visible.
655 [b]Note:[/b] This property is implemented only on macOS and Windows.
656 </member>
657 <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Window.Mode" default="0">
658 Set's the window's current mode.
659 [b]Note:[/b] Fullscreen mode is not exclusive full screen on Windows and Linux.
660 [b]Note:[/b] This method only works with native windows, i.e. the main window and [Window]-derived nodes when [member Viewport.gui_embed_subwindows] is disabled in the main viewport.
661 </member>
662 <member name="mouse_passthrough" type="bool" setter="set_flag" getter="get_flag" default="false">
663 If [code]true[/code], all mouse events will be passed to the underlying window of the same application. See also [member mouse_passthrough_polygon].
664 [b]Note:[/b] This property is implemented on Linux (X11), macOS and Windows.
665 [b]Note:[/b] This property only works with native windows.
666 </member>
667 <member name="mouse_passthrough_polygon" type="PackedVector2Array" setter="set_mouse_passthrough_polygon" getter="get_mouse_passthrough_polygon" default="PackedVector2Array()">
668 Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.
669 Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
670 [codeblocks]
671 [gdscript]
672 # Set region, using Path2D node.
673 $Window.mouse_passthrough_polygon = $Path2D.curve.get_baked_points()
674
675 # Set region, using Polygon2D node.
676 $Window.mouse_passthrough_polygon = $Polygon2D.polygon
677
678 # Reset region to default.
679 $Window.mouse_passthrough_polygon = []
680 [/gdscript]
681 [csharp]
682 // Set region, using Path2D node.
683 GetNode&lt;Window&gt;("Window").MousePassthroughPolygon = GetNode&lt;Path2D&gt;("Path2D").Curve.GetBakedPoints();
684
685 // Set region, using Polygon2D node.
686 GetNode&lt;Window&gt;("Window").MousePassthroughPolygon = GetNode&lt;Polygon2D&gt;("Polygon2D").Polygon;
687
688 // Reset region to default.
689 GetNode&lt;Window&gt;("Window").MousePassthroughPolygon = [];
690 [/csharp]
691 [/codeblocks]
692 [b]Note:[/b] This property is ignored if [member mouse_passthrough] is set to [code]true[/code].
693 [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
694 [b]Note:[/b] This property is implemented on Linux (X11), macOS and Windows.
695 </member>
696 <member name="nonclient_area" type="Rect2i" setter="set_nonclient_area" getter="get_nonclient_area" default="Rect2i(0, 0, 0, 0)">
697 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 [signal nonclient_window_input].
698 </member>
699 <member name="popup_window" type="bool" setter="set_flag" getter="get_flag" default="false">
700 If [code]true[/code], the [Window] will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless [member exclusive] is enabled).
701 </member>
702 <member name="popup_wm_hint" type="bool" setter="set_flag" getter="get_flag" default="false">
703 If [code]true[/code], the [Window] will signal to the window manager that it is supposed to be an implementation-defined "popup" (usually a floating, borderless, untileable and immovable child window).
704 </member>
705 <member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i(0, 0)">
706 The window's position in pixels.
707 If [member ProjectSettings.display/window/subwindows/embed_subwindows] is [code]false[/code], the position is in absolute screen coordinates. This typically applies to editor plugins. If the setting is [code]true[/code], the window's position is in the coordinates of its parent [Viewport].
708 [b]Note:[/b] This property only works if [member initial_position] is set to [constant WINDOW_INITIAL_POSITION_ABSOLUTE].
709 </member>
710 <member name="sharp_corners" type="bool" setter="set_flag" getter="get_flag" default="false">
711 If [code]true[/code], the [Window] will override the OS window style to display sharp corners.
712 [b]Note:[/b] This property is implemented only on Windows (11).
713 [b]Note:[/b] This property only works with native windows.
714 </member>
715 <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(100, 100)">
716 The window's size in pixels. See also [member content_scale_size], which doesn't set the window's physical size but affects how scaling works relative to the current [member content_scale_mode].
717 </member>
718 <member name="theme" type="Theme" setter="set_theme" getter="get_theme">
719 The [Theme] resource this node and all its [Control] and [Window] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority.
720 [b]Note:[/b] [Window] styles will have no effect unless the window is embedded.
721 </member>
722 <member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&amp;&quot;&quot;">
723 The name of a theme type variation used by this [Window] to look up its own theme items. See [member Control.theme_type_variation] for more details.
724 </member>
725 <member name="title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
726 The window's title. If the [Window] is native, title styles set in [Theme] will have no effect.
727 </member>
728 <member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false">
729 If [code]true[/code], the [Window] is transient, i.e. it's considered a child of another [Window]. The transient window will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode.
730 Note that behavior might be different depending on the platform.
731 </member>
732 <member name="transient_to_focused" type="bool" setter="set_transient_to_focused" getter="is_transient_to_focused" default="false">
733 If [code]true[/code], and the [Window] is [member transient], this window will (at the time of becoming visible) become transient to the currently focused window instead of the immediate parent window in the hierarchy. Note that the transient parent is assigned at the time this window becomes visible, so changing it afterwards has no effect until re-shown.
734 </member>
735 <member name="transparent" type="bool" setter="set_flag" getter="get_flag" default="false">
736 If [code]true[/code], the [Window]'s background can be transparent. This is best used with embedded windows.
737 [b]Note:[/b] Transparency support is implemented on Linux, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
738 [b]Note:[/b] This property has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
739 </member>
740 <member name="unfocusable" type="bool" setter="set_flag" getter="get_flag" default="false">
741 If [code]true[/code], the [Window] can't be focused nor interacted with. It can still be visible.
742 </member>
743 <member name="unresizable" type="bool" setter="set_flag" getter="get_flag" default="false">
744 If [code]true[/code], the window can't be resized.
745 </member>
746 <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
747 If [code]true[/code], the window is visible.
748 </member>
749 <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" default="false">
750 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.
751 If [code]false[/code], you need to call [method child_controls_changed] manually.
752 </member>
753 </members>
754 <signals>
755 <signal name="about_to_popup">
756 <description>
757 Emitted right after [method popup] call, before the [Window] appears or does anything.
758 </description>
759 </signal>
760 <signal name="close_requested">
761 <description>
762 Emitted when the [Window]'s close button is pressed or when [member popup_window] is enabled and user clicks outside the window.
763 This signal can be used to handle window closing, e.g. by connecting it to [method hide].
764 </description>
765 </signal>
766 <signal name="dpi_changed">
767 <description>
768 Emitted when the [Window]'s DPI changes as a result of OS-level changes (e.g. moving the window from a Retina display to a lower resolution one).
769 [b]Note:[/b] Only implemented on macOS and Linux (Wayland).
770 </description>
771 </signal>
772 <signal name="files_dropped">
773 <param index="0" name="files" type="PackedStringArray" />
774 <description>
775 Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths.
776 [codeblock]
777 func _ready():
778 get_window().files_dropped.connect(on_files_dropped)
779
780 func on_files_dropped(files):
781 print(files)
782 [/codeblock]
783 [b]Note:[/b] This signal only works with native windows, i.e. the main window and [Window]-derived nodes when [member Viewport.gui_embed_subwindows] is disabled in the main viewport.
784 </description>
785 </signal>
786 <signal name="focus_entered">
787 <description>
788 Emitted when the [Window] gains focus.
789 </description>
790 </signal>
791 <signal name="focus_exited">
792 <description>
793 Emitted when the [Window] loses its focus.
794 </description>
795 </signal>
796 <signal name="go_back_requested">
797 <description>
798 Emitted when a go back request is sent (e.g. pressing the "Back" button on Android), right after [constant Node.NOTIFICATION_WM_GO_BACK_REQUEST].
799 </description>
800 </signal>
801 <signal name="mouse_entered">
802 <description>
803 Emitted when the mouse cursor enters the [Window]'s visible area, that is not occluded behind other [Control]s or windows, provided its [member Viewport.gui_disable_input] is [code]false[/code] and regardless if it's currently focused or not.
804 </description>
805 </signal>
806 <signal name="mouse_exited">
807 <description>
808 Emitted when the mouse cursor leaves the [Window]'s visible area, that is not occluded behind other [Control]s or windows, provided its [member Viewport.gui_disable_input] is [code]false[/code] and regardless if it's currently focused or not.
809 </description>
810 </signal>
811 <signal name="nonclient_window_input">
812 <param index="0" name="event" type="InputEvent" />
813 <description>
814 Emitted when the mouse event is received by the custom decoration area defined by [member nonclient_area], and normal input to the window is blocked (such as when it has an exclusive child opened). [param event]'s position is in the embedder's coordinate system.
815 </description>
816 </signal>
817 <signal name="theme_changed">
818 <description>
819 Emitted when the [constant NOTIFICATION_THEME_CHANGED] notification is sent.
820 </description>
821 </signal>
822 <signal name="title_changed">
823 <description>
824 Emitted when window title bar text is changed.
825 </description>
826 </signal>
827 <signal name="titlebar_changed">
828 <description>
829 Emitted when window title bar decorations are changed, e.g. macOS window enter/exit full screen mode, or extend-to-title flag is changed.
830 </description>
831 </signal>
832 <signal name="visibility_changed">
833 <description>
834 Emitted when [Window] is made visible or disappears.
835 </description>
836 </signal>
837 <signal name="window_input">
838 <param index="0" name="event" type="InputEvent" />
839 <description>
840 Emitted when the [Window] is currently focused and receives any input, passing the received event as an argument. The event's position, if present, is in the embedder's coordinate system.
841 </description>
842 </signal>
843 </signals>
844 <constants>
845 <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="30">
846 Emitted when [Window]'s visibility changes, right before [signal visibility_changed].
847 </constant>
848 <constant name="NOTIFICATION_THEME_CHANGED" value="32">
849 Sent when the node needs to refresh its theme items. This happens in one of the following cases:
850 - The [member theme] property is changed on this node or any of its ancestors.
851 - The [member theme_type_variation] property is changed on this node.
852 - The node enters the scene tree.
853 [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.
854 </constant>
855 <constant name="MODE_WINDOWED" value="0" enum="Mode">
856 Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen).
857 </constant>
858 <constant name="MODE_MINIMIZED" value="1" enum="Mode">
859 Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is pressed.
860 </constant>
861 <constant name="MODE_MAXIMIZED" value="2" enum="Mode">
862 Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed.
863 </constant>
864 <constant name="MODE_FULLSCREEN" value="3" enum="Mode">
865 Full screen mode with full multi-window support.
866 Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed.
867 [b]On Android:[/b] This enables immersive mode.
868 [b]On macOS:[/b] A new desktop is used to display the running project.
869 [b]Note:[/b] Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
870 </constant>
871 <constant name="MODE_EXCLUSIVE_FULLSCREEN" value="4" enum="Mode">
872 A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition).
873 Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed.
874 [b]Note:[/b] This mode might not work with screen recording software.
875 [b]On Android:[/b] This enables immersive mode.
876 [b]On Windows:[/b] Depending on video driver, full screen transition might cause screens to go black for a moment.
877 [b]On macOS:[/b] A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen.
878 [b]On Linux (X11):[/b] Exclusive full screen mode bypasses compositor.
879 [b]On Linux (Wayland):[/b] Equivalent to [constant MODE_FULLSCREEN].
880 [b]Note:[/b] Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
881 </constant>
882 <constant name="FLAG_RESIZE_DISABLED" value="0" enum="Flags">
883 The window can't be resized by dragging its resize grip. It's still possible to resize the window using [member size]. This flag is ignored for full screen windows. Set with [member unresizable].
884 </constant>
885 <constant name="FLAG_BORDERLESS" value="1" enum="Flags">
886 The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. Set with [member borderless].
887 </constant>
888 <constant name="FLAG_ALWAYS_ON_TOP" value="2" enum="Flags">
889 The window is floating on top of all other windows. This flag is ignored for full-screen windows. Set with [member always_on_top].
890 </constant>
891 <constant name="FLAG_TRANSPARENT" value="3" enum="Flags">
892 The window background can be transparent. Set with [member transparent].
893 [b]Note:[/b] This flag has no effect if either [member ProjectSettings.display/window/per_pixel_transparency/allowed], or the window's [member Viewport.transparent_bg] is set to [code]false[/code].
894 </constant>
895 <constant name="FLAG_NO_FOCUS" value="4" enum="Flags">
896 The window can't be focused. No-focus window will ignore all input, except mouse clicks. Set with [member unfocusable].
897 </constant>
898 <constant name="FLAG_POPUP" value="5" enum="Flags">
899 Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see [member transient]).
900 [b]Note:[/b] This flag has no effect in embedded windows (unless said window is a [Popup]).
901 </constant>
902 <constant name="FLAG_EXTEND_TO_TITLE" value="6" enum="Flags">
903 Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. Set with [member extend_to_title].
904 [b]Note:[/b] This flag is implemented only on macOS.
905 [b]Note:[/b] This flag has no effect in embedded windows.
906 </constant>
907 <constant name="FLAG_MOUSE_PASSTHROUGH" value="7" enum="Flags">
908 All mouse events are passed to the underlying window of the same application.
909 [b]Note:[/b] This flag has no effect in embedded windows.
910 </constant>
911 <constant name="FLAG_SHARP_CORNERS" value="8" enum="Flags">
912 Window style is overridden, forcing sharp corners.
913 [b]Note:[/b] This flag has no effect in embedded windows.
914 [b]Note:[/b] This flag is implemented only on Windows (11).
915 </constant>
916 <constant name="FLAG_EXCLUDE_FROM_CAPTURE" value="9" enum="Flags">
917 Windows is excluded from screenshots taken by [method DisplayServer.screen_get_image], [method DisplayServer.screen_get_image_rect], and [method DisplayServer.screen_get_pixel].
918 [b]Note:[/b] This flag has no effect in embedded windows.
919 [b]Note:[/b] This flag is implemented on macOS and Windows (10, 20H1).
920 [b]Note:[/b] Setting this flag will prevent standard screenshot methods from capturing a window image, but does [b]NOT[/b] guarantee that other apps won't be able to capture an image. It should not be used as a DRM or security measure.
921 </constant>
922 <constant name="FLAG_POPUP_WM_HINT" value="10" enum="Flags">
923 Signals the window manager that this window is supposed to be an implementation-defined "popup" (usually a floating, borderless, untileable and immovable child window).
924 </constant>
925 <constant name="FLAG_MINIMIZE_DISABLED" value="11" enum="Flags">
926 Window minimize button is disabled.
927 [b]Note:[/b] This flag is implemented on macOS and Windows.
928 </constant>
929 <constant name="FLAG_MAXIMIZE_DISABLED" value="12" enum="Flags">
930 Window maximize button is disabled.
931 [b]Note:[/b] This flag is implemented on macOS and Windows.
932 </constant>
933 <constant name="FLAG_MAX" value="13" enum="Flags">
934 Max value of the [enum Flags].
935 </constant>
936 <constant name="CONTENT_SCALE_MODE_DISABLED" value="0" enum="ContentScaleMode">
937 The content will not be scaled to match the [Window]'s size ([member content_scale_size] is ignored).
938 </constant>
939 <constant name="CONTENT_SCALE_MODE_CANVAS_ITEMS" value="1" enum="ContentScaleMode">
940 The content will be rendered at the target size. This is more performance-expensive than [constant CONTENT_SCALE_MODE_VIEWPORT], but provides better results.
941 </constant>
942 <constant name="CONTENT_SCALE_MODE_VIEWPORT" value="2" enum="ContentScaleMode">
943 The content will be rendered at the base size and then scaled to the target size. More performant than [constant CONTENT_SCALE_MODE_CANVAS_ITEMS], but results in pixelated image.
944 </constant>
945 <constant name="CONTENT_SCALE_ASPECT_IGNORE" value="0" enum="ContentScaleAspect">
946 The aspect will be ignored. Scaling will simply stretch the content to fit the target size.
947 </constant>
948 <constant name="CONTENT_SCALE_ASPECT_KEEP" value="1" enum="ContentScaleAspect">
949 The content's aspect will be preserved. If the target size has different aspect from the base one, the image will be centered and black bars will appear on left and right sides.
950 </constant>
951 <constant name="CONTENT_SCALE_ASPECT_KEEP_WIDTH" value="2" enum="ContentScaleAspect">
952 The content can be expanded vertically. Scaling horizontally will result in keeping the width ratio and then black bars on left and right sides.
953 </constant>
954 <constant name="CONTENT_SCALE_ASPECT_KEEP_HEIGHT" value="3" enum="ContentScaleAspect">
955 The content can be expanded horizontally. Scaling vertically will result in keeping the height ratio and then black bars on top and bottom sides.
956 </constant>
957 <constant name="CONTENT_SCALE_ASPECT_EXPAND" value="4" enum="ContentScaleAspect">
958 The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the top-left corner and add an extra visible area in the stretched space.
959 </constant>
960 <constant name="CONTENT_SCALE_STRETCH_FRACTIONAL" value="0" enum="ContentScaleStretch">
961 The content will be stretched according to a fractional factor. This fills all the space available in the window, but allows "pixel wobble" to occur due to uneven pixel scaling.
962 </constant>
963 <constant name="CONTENT_SCALE_STRETCH_INTEGER" value="1" enum="ContentScaleStretch">
964 The content will be stretched only according to an integer factor, preserving sharp pixels. This may leave a black background visible on the window's edges depending on the window size.
965 </constant>
966 <constant name="LAYOUT_DIRECTION_INHERITED" value="0" enum="LayoutDirection">
967 Automatic layout direction, determined from the parent window layout direction.
968 </constant>
969 <constant name="LAYOUT_DIRECTION_APPLICATION_LOCALE" value="1" enum="LayoutDirection">
970 Automatic layout direction, determined from the current locale.
971 </constant>
972 <constant name="LAYOUT_DIRECTION_LTR" value="2" enum="LayoutDirection">
973 Left-to-right layout direction.
974 </constant>
975 <constant name="LAYOUT_DIRECTION_RTL" value="3" enum="LayoutDirection">
976 Right-to-left layout direction.
977 </constant>
978 <constant name="LAYOUT_DIRECTION_SYSTEM_LOCALE" value="4" enum="LayoutDirection">
979 Automatic layout direction, determined from the system locale.
980 </constant>
981 <constant name="LAYOUT_DIRECTION_MAX" value="5" enum="LayoutDirection">
982 Represents the size of the [enum LayoutDirection] enum.
983 </constant>
984 <constant name="LAYOUT_DIRECTION_LOCALE" value="1" enum="LayoutDirection" deprecated="Use [constant LAYOUT_DIRECTION_APPLICATION_LOCALE] instead.">
985 </constant>
986 <constant name="WINDOW_INITIAL_POSITION_ABSOLUTE" value="0" enum="WindowInitialPosition">
987 Initial window position is determined by [member position].
988 </constant>
989 <constant name="WINDOW_INITIAL_POSITION_CENTER_PRIMARY_SCREEN" value="1" enum="WindowInitialPosition">
990 Initial window position is the center of the primary screen.
991 </constant>
992 <constant name="WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN" value="2" enum="WindowInitialPosition">
993 Initial window position is the center of the main window screen.
994 </constant>
995 <constant name="WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN" value="3" enum="WindowInitialPosition">
996 Initial window position is the center of [member current_screen] screen.
997 </constant>
998 <constant name="WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS" value="4" enum="WindowInitialPosition">
999 Initial window position is the center of the screen containing the mouse pointer.
1000 </constant>
1001 <constant name="WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS" value="5" enum="WindowInitialPosition">
1002 Initial window position is the center of the screen containing the window with the keyboard focus.
1003 </constant>
1004 </constants>
1005 <theme_items>
1006 <theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
1007 The color of the title's text.
1008 </theme_item>
1009 <theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
1010 The color of the title's text outline.
1011 </theme_item>
1012 <theme_item name="close_h_offset" data_type="constant" type="int" default="18">
1013 Horizontal position offset of the close button, relative to the end of the title bar, towards the beginning of the title bar.
1014 </theme_item>
1015 <theme_item name="close_v_offset" data_type="constant" type="int" default="24">
1016 Vertical position offset of the close button, relative to the bottom of the title bar, towards the top of the title bar.
1017 </theme_item>
1018 <theme_item name="resize_margin" data_type="constant" type="int" default="4">
1019 Defines the outside margin at which the window border can be grabbed with mouse and resized.
1020 </theme_item>
1021 <theme_item name="title_height" data_type="constant" type="int" default="36">
1022 Height of the title bar.
1023 </theme_item>
1024 <theme_item name="title_outline_size" data_type="constant" type="int" default="0">
1025 The size of the title outline.
1026 </theme_item>
1027 <theme_item name="title_font" data_type="font" type="Font">
1028 The font used to draw the title.
1029 </theme_item>
1030 <theme_item name="title_font_size" data_type="font_size" type="int">
1031 The size of the title font.
1032 </theme_item>
1033 <theme_item name="close" data_type="icon" type="Texture2D">
1034 The icon for the close button.
1035 </theme_item>
1036 <theme_item name="close_pressed" data_type="icon" type="Texture2D">
1037 The icon for the close button when it's being pressed.
1038 </theme_item>
1039 <theme_item name="embedded_border" data_type="style" type="StyleBox">
1040 The background style used when the [Window] is embedded. Note that this is drawn only under the window's content, excluding the title. For proper borders and title bar style, you can use [code]expand_margin_*[/code] properties of [StyleBoxFlat].
1041 [b]Note:[/b] The content background will not be visible unless [member transparent] is enabled.
1042 </theme_item>
1043 <theme_item name="embedded_unfocused_border" data_type="style" type="StyleBox">
1044 The background style used when the [Window] is embedded and unfocused.
1045 </theme_item>
1046 </theme_items>
1047 </class>