class_window.rst 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the Window.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_Window:
  6. Window
  7. ======
  8. **Inherits:** :ref:`Viewport<class_Viewport>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`AcceptDialog<class_AcceptDialog>`, :ref:`Popup<class_Popup>`
  10. Base class for all windows.
  11. Description
  12. -----------
  13. A node that creates a window.
  14. Properties
  15. ----------
  16. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`always_on_top<class_Window_property_always_on_top>` | ``false`` |
  18. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  19. | :ref:`bool<class_bool>` | :ref:`auto_translate<class_Window_property_auto_translate>` | ``true`` |
  20. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`borderless<class_Window_property_borderless>` | ``false`` |
  22. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  23. | :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` | :ref:`content_scale_aspect<class_Window_property_content_scale_aspect>` | ``0`` |
  24. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  25. | :ref:`float<class_float>` | :ref:`content_scale_factor<class_Window_property_content_scale_factor>` | ``1.0`` |
  26. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  27. | :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` | :ref:`content_scale_mode<class_Window_property_content_scale_mode>` | ``0`` |
  28. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  29. | :ref:`Vector2i<class_Vector2i>` | :ref:`content_scale_size<class_Window_property_content_scale_size>` | ``Vector2i(0, 0)`` |
  30. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  31. | :ref:`int<class_int>` | :ref:`current_screen<class_Window_property_current_screen>` | ``0`` |
  32. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`exclusive<class_Window_property_exclusive>` | ``false`` |
  34. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  35. | :ref:`Vector2i<class_Vector2i>` | :ref:`max_size<class_Window_property_max_size>` | ``Vector2i(0, 0)`` |
  36. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  37. | :ref:`Vector2i<class_Vector2i>` | :ref:`min_size<class_Window_property_min_size>` | ``Vector2i(0, 0)`` |
  38. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  39. | :ref:`Mode<enum_Window_Mode>` | :ref:`mode<class_Window_property_mode>` | ``0`` |
  40. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  41. | :ref:`bool<class_bool>` | :ref:`popup_window<class_Window_property_popup_window>` | ``false`` |
  42. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  43. | :ref:`Vector2i<class_Vector2i>` | :ref:`position<class_Window_property_position>` | ``Vector2i(0, 0)`` |
  44. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  45. | :ref:`Vector2i<class_Vector2i>` | :ref:`size<class_Window_property_size>` | ``Vector2i(100, 100)`` |
  46. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  47. | :ref:`Theme<class_Theme>` | :ref:`theme<class_Window_property_theme>` | |
  48. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  49. | :ref:`StringName<class_StringName>` | :ref:`theme_type_variation<class_Window_property_theme_type_variation>` | ``&""`` |
  50. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  51. | :ref:`String<class_String>` | :ref:`title<class_Window_property_title>` | ``""`` |
  52. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`transient<class_Window_property_transient>` | ``false`` |
  54. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  55. | :ref:`bool<class_bool>` | :ref:`transparent<class_Window_property_transparent>` | ``false`` |
  56. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  57. | :ref:`bool<class_bool>` | :ref:`unfocusable<class_Window_property_unfocusable>` | ``false`` |
  58. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  59. | :ref:`bool<class_bool>` | :ref:`unresizable<class_Window_property_unresizable>` | ``false`` |
  60. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  61. | :ref:`bool<class_bool>` | :ref:`visible<class_Window_property_visible>` | ``true`` |
  62. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  63. | :ref:`bool<class_bool>` | :ref:`wrap_controls<class_Window_property_wrap_controls>` | ``false`` |
  64. +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+
  65. Methods
  66. -------
  67. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`bool<class_bool>` | :ref:`can_draw<class_Window_method_can_draw>` **(** **)** |const| |
  69. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | void | :ref:`child_controls_changed<class_Window_method_child_controls_changed>` **(** **)** |
  71. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`Vector2<class_Vector2>` | :ref:`get_contents_minimum_size<class_Window_method_get_contents_minimum_size>` **(** **)** |const| |
  73. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`bool<class_bool>` | :ref:`get_flag<class_Window_method_get_flag>` **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| |
  75. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`LayoutDirection<enum_Window_LayoutDirection>` | :ref:`get_layout_direction<class_Window_method_get_layout_direction>` **(** **)** |const| |
  77. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`Vector2i<class_Vector2i>` | :ref:`get_real_size<class_Window_method_get_real_size>` **(** **)** |const| |
  79. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`Color<class_Color>` | :ref:`get_theme_color<class_Window_method_get_theme_color>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  81. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`int<class_int>` | :ref:`get_theme_constant<class_Window_method_get_theme_constant>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  83. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`float<class_float>` | :ref:`get_theme_default_base_scale<class_Window_method_get_theme_default_base_scale>` **(** **)** |const| |
  85. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`Font<class_Font>` | :ref:`get_theme_default_font<class_Window_method_get_theme_default_font>` **(** **)** |const| |
  87. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`int<class_int>` | :ref:`get_theme_default_font_size<class_Window_method_get_theme_default_font_size>` **(** **)** |const| |
  89. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`Font<class_Font>` | :ref:`get_theme_font<class_Window_method_get_theme_font>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  91. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`int<class_int>` | :ref:`get_theme_font_size<class_Window_method_get_theme_font_size>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  93. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_theme_icon<class_Window_method_get_theme_icon>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  95. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`StyleBox<class_StyleBox>` | :ref:`get_theme_stylebox<class_Window_method_get_theme_stylebox>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  97. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | void | :ref:`grab_focus<class_Window_method_grab_focus>` **(** **)** |
  99. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`bool<class_bool>` | :ref:`has_focus<class_Window_method_has_focus>` **(** **)** |const| |
  101. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`bool<class_bool>` | :ref:`has_theme_color<class_Window_method_has_theme_color>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  103. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`bool<class_bool>` | :ref:`has_theme_constant<class_Window_method_has_theme_constant>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  105. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`bool<class_bool>` | :ref:`has_theme_font<class_Window_method_has_theme_font>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  107. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`bool<class_bool>` | :ref:`has_theme_font_size<class_Window_method_has_theme_font_size>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  109. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`bool<class_bool>` | :ref:`has_theme_icon<class_Window_method_has_theme_icon>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  111. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`bool<class_bool>` | :ref:`has_theme_stylebox<class_Window_method_has_theme_stylebox>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| |
  113. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | void | :ref:`hide<class_Window_method_hide>` **(** **)** |
  115. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`bool<class_bool>` | :ref:`is_embedded<class_Window_method_is_embedded>` **(** **)** |const| |
  117. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`bool<class_bool>` | :ref:`is_layout_rtl<class_Window_method_is_layout_rtl>` **(** **)** |const| |
  119. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`bool<class_bool>` | :ref:`is_maximize_allowed<class_Window_method_is_maximize_allowed>` **(** **)** |const| |
  121. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`bool<class_bool>` | :ref:`is_using_font_oversampling<class_Window_method_is_using_font_oversampling>` **(** **)** |const| |
  123. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | void | :ref:`move_to_foreground<class_Window_method_move_to_foreground>` **(** **)** |
  125. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | void | :ref:`popup<class_Window_method_popup>` **(** :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)** |
  127. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | void | :ref:`popup_centered<class_Window_method_popup_centered>` **(** :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)** |
  129. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | void | :ref:`popup_centered_clamped<class_Window_method_popup_centered_clamped>` **(** :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0), :ref:`float<class_float>` fallback_ratio=0.75 **)** |
  131. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | void | :ref:`popup_centered_ratio<class_Window_method_popup_centered_ratio>` **(** :ref:`float<class_float>` ratio=0.8 **)** |
  133. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | void | :ref:`popup_on_parent<class_Window_method_popup_on_parent>` **(** :ref:`Rect2i<class_Rect2i>` parent_rect **)** |
  135. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | void | :ref:`request_attention<class_Window_method_request_attention>` **(** **)** |
  137. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | void | :ref:`reset_size<class_Window_method_reset_size>` **(** **)** |
  139. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | void | :ref:`set_flag<class_Window_method_set_flag>` **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** |
  141. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | void | :ref:`set_ime_active<class_Window_method_set_ime_active>` **(** :ref:`bool<class_bool>` active **)** |
  143. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | void | :ref:`set_ime_position<class_Window_method_set_ime_position>` **(** :ref:`Vector2i<class_Vector2i>` position **)** |
  145. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | void | :ref:`set_layout_direction<class_Window_method_set_layout_direction>` **(** :ref:`LayoutDirection<enum_Window_LayoutDirection>` direction **)** |
  147. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | void | :ref:`set_use_font_oversampling<class_Window_method_set_use_font_oversampling>` **(** :ref:`bool<class_bool>` enable **)** |
  149. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | void | :ref:`show<class_Window_method_show>` **(** **)** |
  151. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. Theme Properties
  153. ----------------
  154. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  155. | :ref:`Color<class_Color>` | :ref:`title_color<class_Window_theme_color_title_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  156. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  157. | :ref:`Color<class_Color>` | :ref:`title_outline_modulate<class_Window_theme_color_title_outline_modulate>` | ``Color(1, 1, 1, 1)`` |
  158. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  159. | :ref:`int<class_int>` | :ref:`close_h_ofs<class_Window_theme_constant_close_h_ofs>` | ``18`` |
  160. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  161. | :ref:`int<class_int>` | :ref:`close_v_ofs<class_Window_theme_constant_close_v_ofs>` | ``24`` |
  162. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  163. | :ref:`int<class_int>` | :ref:`resize_margin<class_Window_theme_constant_resize_margin>` | ``4`` |
  164. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  165. | :ref:`int<class_int>` | :ref:`scaleborder_size<class_Window_theme_constant_scaleborder_size>` | ``4`` |
  166. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  167. | :ref:`int<class_int>` | :ref:`title_height<class_Window_theme_constant_title_height>` | ``36`` |
  168. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  169. | :ref:`int<class_int>` | :ref:`title_outline_size<class_Window_theme_constant_title_outline_size>` | ``0`` |
  170. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  171. | :ref:`Font<class_Font>` | :ref:`title_font<class_Window_theme_font_title_font>` | |
  172. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  173. | :ref:`int<class_int>` | :ref:`title_font_size<class_Window_theme_font_size_title_font_size>` | |
  174. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  175. | :ref:`Texture2D<class_Texture2D>` | :ref:`close<class_Window_theme_icon_close>` | |
  176. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  177. | :ref:`Texture2D<class_Texture2D>` | :ref:`close_pressed<class_Window_theme_icon_close_pressed>` | |
  178. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  179. | :ref:`StyleBox<class_StyleBox>` | :ref:`embedded_border<class_Window_theme_style_embedded_border>` | |
  180. +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+
  181. Signals
  182. -------
  183. .. _class_Window_signal_about_to_popup:
  184. - **about_to_popup** **(** **)**
  185. ----
  186. .. _class_Window_signal_close_requested:
  187. - **close_requested** **(** **)**
  188. ----
  189. .. _class_Window_signal_files_dropped:
  190. - **files_dropped** **(** :ref:`PackedStringArray<class_PackedStringArray>` files **)**
  191. Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths.
  192. ----
  193. .. _class_Window_signal_focus_entered:
  194. - **focus_entered** **(** **)**
  195. ----
  196. .. _class_Window_signal_focus_exited:
  197. - **focus_exited** **(** **)**
  198. ----
  199. .. _class_Window_signal_go_back_requested:
  200. - **go_back_requested** **(** **)**
  201. ----
  202. .. _class_Window_signal_mouse_entered:
  203. - **mouse_entered** **(** **)**
  204. ----
  205. .. _class_Window_signal_mouse_exited:
  206. - **mouse_exited** **(** **)**
  207. ----
  208. .. _class_Window_signal_theme_changed:
  209. - **theme_changed** **(** **)**
  210. ----
  211. .. _class_Window_signal_visibility_changed:
  212. - **visibility_changed** **(** **)**
  213. ----
  214. .. _class_Window_signal_window_input:
  215. - **window_input** **(** :ref:`InputEvent<class_InputEvent>` event **)**
  216. Enumerations
  217. ------------
  218. .. _enum_Window_Mode:
  219. .. _class_Window_constant_MODE_WINDOWED:
  220. .. _class_Window_constant_MODE_MINIMIZED:
  221. .. _class_Window_constant_MODE_MAXIMIZED:
  222. .. _class_Window_constant_MODE_FULLSCREEN:
  223. .. _class_Window_constant_MODE_EXCLUSIVE_FULLSCREEN:
  224. enum **Mode**:
  225. - **MODE_WINDOWED** = **0** --- Windowed mode.
  226. - **MODE_MINIMIZED** = **1** --- Minimized window mode.
  227. - **MODE_MAXIMIZED** = **2** --- Maximized window mode.
  228. - **MODE_FULLSCREEN** = **3** --- Fullscreen window mode. Note that this is not *exclusive* 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.
  229. Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling fullscreen mode.
  230. - **MODE_EXCLUSIVE_FULLSCREEN** = **4** --- Exclusive fullscreen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to :ref:`MODE_FULLSCREEN<class_Window_constant_MODE_FULLSCREEN>`.
  231. Only one window in exclusive fullscreen mode can be visible on a given screen at a time. If multiple windows are in exclusive fullscreen mode for the same screen, the last one being set to this mode takes precedence.
  232. Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling fullscreen mode.
  233. ----
  234. .. _enum_Window_Flags:
  235. .. _class_Window_constant_FLAG_RESIZE_DISABLED:
  236. .. _class_Window_constant_FLAG_BORDERLESS:
  237. .. _class_Window_constant_FLAG_ALWAYS_ON_TOP:
  238. .. _class_Window_constant_FLAG_TRANSPARENT:
  239. .. _class_Window_constant_FLAG_NO_FOCUS:
  240. .. _class_Window_constant_FLAG_POPUP:
  241. .. _class_Window_constant_FLAG_MAX:
  242. enum **Flags**:
  243. - **FLAG_RESIZE_DISABLED** = **0** --- The window's ability to be resized.
  244. - **FLAG_BORDERLESS** = **1** --- Borderless window.
  245. - **FLAG_ALWAYS_ON_TOP** = **2** --- Flag for making the window always on top of all other windows.
  246. - **FLAG_TRANSPARENT** = **3**
  247. - **FLAG_NO_FOCUS** = **4**
  248. - **FLAG_POPUP** = **5**
  249. - **FLAG_MAX** = **6**
  250. ----
  251. .. _enum_Window_ContentScaleMode:
  252. .. _class_Window_constant_CONTENT_SCALE_MODE_DISABLED:
  253. .. _class_Window_constant_CONTENT_SCALE_MODE_CANVAS_ITEMS:
  254. .. _class_Window_constant_CONTENT_SCALE_MODE_VIEWPORT:
  255. enum **ContentScaleMode**:
  256. - **CONTENT_SCALE_MODE_DISABLED** = **0**
  257. - **CONTENT_SCALE_MODE_CANVAS_ITEMS** = **1**
  258. - **CONTENT_SCALE_MODE_VIEWPORT** = **2**
  259. ----
  260. .. _enum_Window_ContentScaleAspect:
  261. .. _class_Window_constant_CONTENT_SCALE_ASPECT_IGNORE:
  262. .. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP:
  263. .. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_WIDTH:
  264. .. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_HEIGHT:
  265. .. _class_Window_constant_CONTENT_SCALE_ASPECT_EXPAND:
  266. enum **ContentScaleAspect**:
  267. - **CONTENT_SCALE_ASPECT_IGNORE** = **0**
  268. - **CONTENT_SCALE_ASPECT_KEEP** = **1**
  269. - **CONTENT_SCALE_ASPECT_KEEP_WIDTH** = **2**
  270. - **CONTENT_SCALE_ASPECT_KEEP_HEIGHT** = **3**
  271. - **CONTENT_SCALE_ASPECT_EXPAND** = **4**
  272. ----
  273. .. _enum_Window_LayoutDirection:
  274. .. _class_Window_constant_LAYOUT_DIRECTION_INHERITED:
  275. .. _class_Window_constant_LAYOUT_DIRECTION_LOCALE:
  276. .. _class_Window_constant_LAYOUT_DIRECTION_LTR:
  277. .. _class_Window_constant_LAYOUT_DIRECTION_RTL:
  278. enum **LayoutDirection**:
  279. - **LAYOUT_DIRECTION_INHERITED** = **0** --- Automatic layout direction, determined from the parent window layout direction.
  280. - **LAYOUT_DIRECTION_LOCALE** = **1** --- Automatic layout direction, determined from the current locale.
  281. - **LAYOUT_DIRECTION_LTR** = **2** --- Left-to-right layout direction.
  282. - **LAYOUT_DIRECTION_RTL** = **3** --- Right-to-left layout direction.
  283. Constants
  284. ---------
  285. .. _class_Window_constant_NOTIFICATION_VISIBILITY_CHANGED:
  286. - **NOTIFICATION_VISIBILITY_CHANGED** = **30**
  287. Property Descriptions
  288. ---------------------
  289. .. _class_Window_property_always_on_top:
  290. - :ref:`bool<class_bool>` **always_on_top**
  291. +-----------+-----------------+
  292. | *Default* | ``false`` |
  293. +-----------+-----------------+
  294. | *Setter* | set_flag(value) |
  295. +-----------+-----------------+
  296. | *Getter* | get_flag() |
  297. +-----------+-----------------+
  298. If ``true``, the window will be on top of all other windows.
  299. ----
  300. .. _class_Window_property_auto_translate:
  301. - :ref:`bool<class_bool>` **auto_translate**
  302. +-----------+---------------------------+
  303. | *Default* | ``true`` |
  304. +-----------+---------------------------+
  305. | *Setter* | set_auto_translate(value) |
  306. +-----------+---------------------------+
  307. | *Getter* | is_auto_translating() |
  308. +-----------+---------------------------+
  309. Toggles if any text should automatically change to its translated version depending on the current locale.
  310. ----
  311. .. _class_Window_property_borderless:
  312. - :ref:`bool<class_bool>` **borderless**
  313. +-----------+-----------------+
  314. | *Default* | ``false`` |
  315. +-----------+-----------------+
  316. | *Setter* | set_flag(value) |
  317. +-----------+-----------------+
  318. | *Getter* | get_flag() |
  319. +-----------+-----------------+
  320. If ``true``, the window will have no borders.
  321. ----
  322. .. _class_Window_property_content_scale_aspect:
  323. - :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **content_scale_aspect**
  324. +-----------+---------------------------------+
  325. | *Default* | ``0`` |
  326. +-----------+---------------------------------+
  327. | *Setter* | set_content_scale_aspect(value) |
  328. +-----------+---------------------------------+
  329. | *Getter* | get_content_scale_aspect() |
  330. +-----------+---------------------------------+
  331. ----
  332. .. _class_Window_property_content_scale_factor:
  333. - :ref:`float<class_float>` **content_scale_factor**
  334. +-----------+---------------------------------+
  335. | *Default* | ``1.0`` |
  336. +-----------+---------------------------------+
  337. | *Setter* | set_content_scale_factor(value) |
  338. +-----------+---------------------------------+
  339. | *Getter* | get_content_scale_factor() |
  340. +-----------+---------------------------------+
  341. ----
  342. .. _class_Window_property_content_scale_mode:
  343. - :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **content_scale_mode**
  344. +-----------+-------------------------------+
  345. | *Default* | ``0`` |
  346. +-----------+-------------------------------+
  347. | *Setter* | set_content_scale_mode(value) |
  348. +-----------+-------------------------------+
  349. | *Getter* | get_content_scale_mode() |
  350. +-----------+-------------------------------+
  351. ----
  352. .. _class_Window_property_content_scale_size:
  353. - :ref:`Vector2i<class_Vector2i>` **content_scale_size**
  354. +-----------+-------------------------------+
  355. | *Default* | ``Vector2i(0, 0)`` |
  356. +-----------+-------------------------------+
  357. | *Setter* | set_content_scale_size(value) |
  358. +-----------+-------------------------------+
  359. | *Getter* | get_content_scale_size() |
  360. +-----------+-------------------------------+
  361. ----
  362. .. _class_Window_property_current_screen:
  363. - :ref:`int<class_int>` **current_screen**
  364. +-----------+---------------------------+
  365. | *Default* | ``0`` |
  366. +-----------+---------------------------+
  367. | *Setter* | set_current_screen(value) |
  368. +-----------+---------------------------+
  369. | *Getter* | get_current_screen() |
  370. +-----------+---------------------------+
  371. The screen the window is currently on.
  372. ----
  373. .. _class_Window_property_exclusive:
  374. - :ref:`bool<class_bool>` **exclusive**
  375. +-----------+----------------------+
  376. | *Default* | ``false`` |
  377. +-----------+----------------------+
  378. | *Setter* | set_exclusive(value) |
  379. +-----------+----------------------+
  380. | *Getter* | is_exclusive() |
  381. +-----------+----------------------+
  382. ----
  383. .. _class_Window_property_max_size:
  384. - :ref:`Vector2i<class_Vector2i>` **max_size**
  385. +-----------+---------------------+
  386. | *Default* | ``Vector2i(0, 0)`` |
  387. +-----------+---------------------+
  388. | *Setter* | set_max_size(value) |
  389. +-----------+---------------------+
  390. | *Getter* | get_max_size() |
  391. +-----------+---------------------+
  392. ----
  393. .. _class_Window_property_min_size:
  394. - :ref:`Vector2i<class_Vector2i>` **min_size**
  395. +-----------+---------------------+
  396. | *Default* | ``Vector2i(0, 0)`` |
  397. +-----------+---------------------+
  398. | *Setter* | set_min_size(value) |
  399. +-----------+---------------------+
  400. | *Getter* | get_min_size() |
  401. +-----------+---------------------+
  402. ----
  403. .. _class_Window_property_mode:
  404. - :ref:`Mode<enum_Window_Mode>` **mode**
  405. +-----------+-----------------+
  406. | *Default* | ``0`` |
  407. +-----------+-----------------+
  408. | *Setter* | set_mode(value) |
  409. +-----------+-----------------+
  410. | *Getter* | get_mode() |
  411. +-----------+-----------------+
  412. Set's the window's current mode.
  413. \ **Note:** Fullscreen mode is not exclusive fullscreen on Windows and Linux.
  414. ----
  415. .. _class_Window_property_popup_window:
  416. - :ref:`bool<class_bool>` **popup_window**
  417. +-----------+-----------------+
  418. | *Default* | ``false`` |
  419. +-----------+-----------------+
  420. | *Setter* | set_flag(value) |
  421. +-----------+-----------------+
  422. | *Getter* | get_flag() |
  423. +-----------+-----------------+
  424. ----
  425. .. _class_Window_property_position:
  426. - :ref:`Vector2i<class_Vector2i>` **position**
  427. +-----------+---------------------+
  428. | *Default* | ``Vector2i(0, 0)`` |
  429. +-----------+---------------------+
  430. | *Setter* | set_position(value) |
  431. +-----------+---------------------+
  432. | *Getter* | get_position() |
  433. +-----------+---------------------+
  434. The window's position in pixels.
  435. ----
  436. .. _class_Window_property_size:
  437. - :ref:`Vector2i<class_Vector2i>` **size**
  438. +-----------+------------------------+
  439. | *Default* | ``Vector2i(100, 100)`` |
  440. +-----------+------------------------+
  441. | *Setter* | set_size(value) |
  442. +-----------+------------------------+
  443. | *Getter* | get_size() |
  444. +-----------+------------------------+
  445. The window's size in pixels.
  446. ----
  447. .. _class_Window_property_theme:
  448. - :ref:`Theme<class_Theme>` **theme**
  449. +----------+------------------+
  450. | *Setter* | set_theme(value) |
  451. +----------+------------------+
  452. | *Getter* | get_theme() |
  453. +----------+------------------+
  454. ----
  455. .. _class_Window_property_theme_type_variation:
  456. - :ref:`StringName<class_StringName>` **theme_type_variation**
  457. +-----------+---------------------------------+
  458. | *Default* | ``&""`` |
  459. +-----------+---------------------------------+
  460. | *Setter* | set_theme_type_variation(value) |
  461. +-----------+---------------------------------+
  462. | *Getter* | get_theme_type_variation() |
  463. +-----------+---------------------------------+
  464. ----
  465. .. _class_Window_property_title:
  466. - :ref:`String<class_String>` **title**
  467. +-----------+------------------+
  468. | *Default* | ``""`` |
  469. +-----------+------------------+
  470. | *Setter* | set_title(value) |
  471. +-----------+------------------+
  472. | *Getter* | get_title() |
  473. +-----------+------------------+
  474. The window's title.
  475. ----
  476. .. _class_Window_property_transient:
  477. - :ref:`bool<class_bool>` **transient**
  478. +-----------+----------------------+
  479. | *Default* | ``false`` |
  480. +-----------+----------------------+
  481. | *Setter* | set_transient(value) |
  482. +-----------+----------------------+
  483. | *Getter* | is_transient() |
  484. +-----------+----------------------+
  485. ----
  486. .. _class_Window_property_transparent:
  487. - :ref:`bool<class_bool>` **transparent**
  488. +-----------+-----------------+
  489. | *Default* | ``false`` |
  490. +-----------+-----------------+
  491. | *Setter* | set_flag(value) |
  492. +-----------+-----------------+
  493. | *Getter* | get_flag() |
  494. +-----------+-----------------+
  495. ----
  496. .. _class_Window_property_unfocusable:
  497. - :ref:`bool<class_bool>` **unfocusable**
  498. +-----------+-----------------+
  499. | *Default* | ``false`` |
  500. +-----------+-----------------+
  501. | *Setter* | set_flag(value) |
  502. +-----------+-----------------+
  503. | *Getter* | get_flag() |
  504. +-----------+-----------------+
  505. ----
  506. .. _class_Window_property_unresizable:
  507. - :ref:`bool<class_bool>` **unresizable**
  508. +-----------+-----------------+
  509. | *Default* | ``false`` |
  510. +-----------+-----------------+
  511. | *Setter* | set_flag(value) |
  512. +-----------+-----------------+
  513. | *Getter* | get_flag() |
  514. +-----------+-----------------+
  515. If ``true``, the window can't be resized.
  516. ----
  517. .. _class_Window_property_visible:
  518. - :ref:`bool<class_bool>` **visible**
  519. +-----------+--------------------+
  520. | *Default* | ``true`` |
  521. +-----------+--------------------+
  522. | *Setter* | set_visible(value) |
  523. +-----------+--------------------+
  524. | *Getter* | is_visible() |
  525. +-----------+--------------------+
  526. If ``true``, the window is visible.
  527. ----
  528. .. _class_Window_property_wrap_controls:
  529. - :ref:`bool<class_bool>` **wrap_controls**
  530. +-----------+--------------------------+
  531. | *Default* | ``false`` |
  532. +-----------+--------------------------+
  533. | *Setter* | set_wrap_controls(value) |
  534. +-----------+--------------------------+
  535. | *Getter* | is_wrapping_controls() |
  536. +-----------+--------------------------+
  537. Method Descriptions
  538. -------------------
  539. .. _class_Window_method_can_draw:
  540. - :ref:`bool<class_bool>` **can_draw** **(** **)** |const|
  541. Returns whether the window is being drawn to the screen.
  542. ----
  543. .. _class_Window_method_child_controls_changed:
  544. - void **child_controls_changed** **(** **)**
  545. ----
  546. .. _class_Window_method_get_contents_minimum_size:
  547. - :ref:`Vector2<class_Vector2>` **get_contents_minimum_size** **(** **)** |const|
  548. Returns the combined minimum size from the child :ref:`Control<class_Control>` nodes of the window.
  549. ----
  550. .. _class_Window_method_get_flag:
  551. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const|
  552. Returns ``true`` if the flag is set.
  553. ----
  554. .. _class_Window_method_get_layout_direction:
  555. - :ref:`LayoutDirection<enum_Window_LayoutDirection>` **get_layout_direction** **(** **)** |const|
  556. Returns layout direction and text writing direction.
  557. ----
  558. .. _class_Window_method_get_real_size:
  559. - :ref:`Vector2i<class_Vector2i>` **get_real_size** **(** **)** |const|
  560. Returns the window's size including its border.
  561. ----
  562. .. _class_Window_method_get_theme_color:
  563. - :ref:`Color<class_Color>` **get_theme_color** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  564. ----
  565. .. _class_Window_method_get_theme_constant:
  566. - :ref:`int<class_int>` **get_theme_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  567. ----
  568. .. _class_Window_method_get_theme_default_base_scale:
  569. - :ref:`float<class_float>` **get_theme_default_base_scale** **(** **)** |const|
  570. ----
  571. .. _class_Window_method_get_theme_default_font:
  572. - :ref:`Font<class_Font>` **get_theme_default_font** **(** **)** |const|
  573. ----
  574. .. _class_Window_method_get_theme_default_font_size:
  575. - :ref:`int<class_int>` **get_theme_default_font_size** **(** **)** |const|
  576. ----
  577. .. _class_Window_method_get_theme_font:
  578. - :ref:`Font<class_Font>` **get_theme_font** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  579. Returns the :ref:`Font<class_Font>` at ``name`` if the theme has ``theme_type``.
  580. ----
  581. .. _class_Window_method_get_theme_font_size:
  582. - :ref:`int<class_int>` **get_theme_font_size** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  583. Returns the font size at ``name`` if the theme has ``theme_type``.
  584. ----
  585. .. _class_Window_method_get_theme_icon:
  586. - :ref:`Texture2D<class_Texture2D>` **get_theme_icon** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  587. ----
  588. .. _class_Window_method_get_theme_stylebox:
  589. - :ref:`StyleBox<class_StyleBox>` **get_theme_stylebox** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  590. ----
  591. .. _class_Window_method_grab_focus:
  592. - void **grab_focus** **(** **)**
  593. Causes the window to grab focus, allowing it to receive user input.
  594. ----
  595. .. _class_Window_method_has_focus:
  596. - :ref:`bool<class_bool>` **has_focus** **(** **)** |const|
  597. Returns ``true`` if the window is focused.
  598. ----
  599. .. _class_Window_method_has_theme_color:
  600. - :ref:`bool<class_bool>` **has_theme_color** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  601. ----
  602. .. _class_Window_method_has_theme_constant:
  603. - :ref:`bool<class_bool>` **has_theme_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  604. ----
  605. .. _class_Window_method_has_theme_font:
  606. - :ref:`bool<class_bool>` **has_theme_font** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  607. Returns ``true`` if :ref:`Font<class_Font>` with ``name`` is in ``theme_type``.
  608. Returns ``false`` if the theme does not have ``theme_type``.
  609. ----
  610. .. _class_Window_method_has_theme_font_size:
  611. - :ref:`bool<class_bool>` **has_theme_font_size** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  612. Returns ``true`` if font size with ``name`` is in ``theme_type``.
  613. Returns ``false`` if the theme does not have ``theme_type``.
  614. ----
  615. .. _class_Window_method_has_theme_icon:
  616. - :ref:`bool<class_bool>` **has_theme_icon** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  617. ----
  618. .. _class_Window_method_has_theme_stylebox:
  619. - :ref:`bool<class_bool>` **has_theme_stylebox** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  620. ----
  621. .. _class_Window_method_hide:
  622. - void **hide** **(** **)**
  623. ----
  624. .. _class_Window_method_is_embedded:
  625. - :ref:`bool<class_bool>` **is_embedded** **(** **)** |const|
  626. Returns ``true`` if the window is currently embedded in another window.
  627. ----
  628. .. _class_Window_method_is_layout_rtl:
  629. - :ref:`bool<class_bool>` **is_layout_rtl** **(** **)** |const|
  630. Returns ``true`` if layout is right-to-left.
  631. ----
  632. .. _class_Window_method_is_maximize_allowed:
  633. - :ref:`bool<class_bool>` **is_maximize_allowed** **(** **)** |const|
  634. ----
  635. .. _class_Window_method_is_using_font_oversampling:
  636. - :ref:`bool<class_bool>` **is_using_font_oversampling** **(** **)** |const|
  637. ----
  638. .. _class_Window_method_move_to_foreground:
  639. - void **move_to_foreground** **(** **)**
  640. ----
  641. .. _class_Window_method_popup:
  642. - void **popup** **(** :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)**
  643. ----
  644. .. _class_Window_method_popup_centered:
  645. - void **popup_centered** **(** :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)**
  646. ----
  647. .. _class_Window_method_popup_centered_clamped:
  648. - void **popup_centered_clamped** **(** :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0), :ref:`float<class_float>` fallback_ratio=0.75 **)**
  649. ----
  650. .. _class_Window_method_popup_centered_ratio:
  651. - void **popup_centered_ratio** **(** :ref:`float<class_float>` ratio=0.8 **)**
  652. ----
  653. .. _class_Window_method_popup_on_parent:
  654. - void **popup_on_parent** **(** :ref:`Rect2i<class_Rect2i>` parent_rect **)**
  655. ----
  656. .. _class_Window_method_request_attention:
  657. - void **request_attention** **(** **)**
  658. ----
  659. .. _class_Window_method_reset_size:
  660. - void **reset_size** **(** **)**
  661. Resets the size to the minimum size, which is the max of :ref:`min_size<class_Window_property_min_size>` and (if :ref:`wrap_controls<class_Window_property_wrap_controls>` is enabled) :ref:`get_contents_minimum_size<class_Window_method_get_contents_minimum_size>`. This is equivalent to calling ``set_size(Vector2i())`` (or any size below the minimum).
  662. ----
  663. .. _class_Window_method_set_flag:
  664. - void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)**
  665. Sets a specified window flag.
  666. ----
  667. .. _class_Window_method_set_ime_active:
  668. - void **set_ime_active** **(** :ref:`bool<class_bool>` active **)**
  669. ----
  670. .. _class_Window_method_set_ime_position:
  671. - void **set_ime_position** **(** :ref:`Vector2i<class_Vector2i>` position **)**
  672. ----
  673. .. _class_Window_method_set_layout_direction:
  674. - void **set_layout_direction** **(** :ref:`LayoutDirection<enum_Window_LayoutDirection>` direction **)**
  675. Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
  676. ----
  677. .. _class_Window_method_set_use_font_oversampling:
  678. - void **set_use_font_oversampling** **(** :ref:`bool<class_bool>` enable **)**
  679. ----
  680. .. _class_Window_method_show:
  681. - void **show** **(** **)**
  682. Theme Property Descriptions
  683. ---------------------------
  684. .. _class_Window_theme_color_title_color:
  685. - :ref:`Color<class_Color>` **title_color**
  686. +-----------+-----------------------------------+
  687. | *Default* | ``Color(0.875, 0.875, 0.875, 1)`` |
  688. +-----------+-----------------------------------+
  689. ----
  690. .. _class_Window_theme_color_title_outline_modulate:
  691. - :ref:`Color<class_Color>` **title_outline_modulate**
  692. +-----------+-----------------------+
  693. | *Default* | ``Color(1, 1, 1, 1)`` |
  694. +-----------+-----------------------+
  695. The color of the title outline.
  696. ----
  697. .. _class_Window_theme_constant_close_h_ofs:
  698. - :ref:`int<class_int>` **close_h_ofs**
  699. +-----------+--------+
  700. | *Default* | ``18`` |
  701. +-----------+--------+
  702. ----
  703. .. _class_Window_theme_constant_close_v_ofs:
  704. - :ref:`int<class_int>` **close_v_ofs**
  705. +-----------+--------+
  706. | *Default* | ``24`` |
  707. +-----------+--------+
  708. ----
  709. .. _class_Window_theme_constant_resize_margin:
  710. - :ref:`int<class_int>` **resize_margin**
  711. +-----------+-------+
  712. | *Default* | ``4`` |
  713. +-----------+-------+
  714. ----
  715. .. _class_Window_theme_constant_scaleborder_size:
  716. - :ref:`int<class_int>` **scaleborder_size**
  717. +-----------+-------+
  718. | *Default* | ``4`` |
  719. +-----------+-------+
  720. ----
  721. .. _class_Window_theme_constant_title_height:
  722. - :ref:`int<class_int>` **title_height**
  723. +-----------+--------+
  724. | *Default* | ``36`` |
  725. +-----------+--------+
  726. ----
  727. .. _class_Window_theme_constant_title_outline_size:
  728. - :ref:`int<class_int>` **title_outline_size**
  729. +-----------+-------+
  730. | *Default* | ``0`` |
  731. +-----------+-------+
  732. The size of the title outline.
  733. ----
  734. .. _class_Window_theme_font_title_font:
  735. - :ref:`Font<class_Font>` **title_font**
  736. ----
  737. .. _class_Window_theme_font_size_title_font_size:
  738. - :ref:`int<class_int>` **title_font_size**
  739. The size of the title font.
  740. ----
  741. .. _class_Window_theme_icon_close:
  742. - :ref:`Texture2D<class_Texture2D>` **close**
  743. ----
  744. .. _class_Window_theme_icon_close_pressed:
  745. - :ref:`Texture2D<class_Texture2D>` **close_pressed**
  746. ----
  747. .. _class_Window_theme_style_embedded_border:
  748. - :ref:`StyleBox<class_StyleBox>` **embedded_border**
  749. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  750. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  751. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  752. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  753. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  754. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`