class_window.rst 132 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Window.xml.
  6. .. _class_Window:
  7. Window
  8. ======
  9. **Inherits:** :ref:`Viewport<class_Viewport>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`AcceptDialog<class_AcceptDialog>`, :ref:`Popup<class_Popup>`
  11. Base class for all windows, dialogs, and popups.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. A node that creates a window. The window can either be a native system window or embedded inside another **Window** (see :ref:`Viewport.gui_embed_subwindows<class_Viewport_property_gui_embed_subwindows>`).
  16. At runtime, **Window**\ s will not close automatically when requested. You need to handle it manually using the :ref:`close_requested<class_Window_signal_close_requested>` signal (this applies both to pressing the close button and clicking outside of a popup).
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`always_on_top<class_Window_property_always_on_top>` | ``false`` |
  24. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`auto_translate<class_Window_property_auto_translate>` | ``true`` |
  26. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`borderless<class_Window_property_borderless>` | ``false`` |
  28. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  29. | :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` | :ref:`content_scale_aspect<class_Window_property_content_scale_aspect>` | ``0`` |
  30. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  31. | :ref:`float<class_float>` | :ref:`content_scale_factor<class_Window_property_content_scale_factor>` | ``1.0`` |
  32. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  33. | :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` | :ref:`content_scale_mode<class_Window_property_content_scale_mode>` | ``0`` |
  34. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  35. | :ref:`Vector2i<class_Vector2i>` | :ref:`content_scale_size<class_Window_property_content_scale_size>` | ``Vector2i(0, 0)`` |
  36. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  37. | :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` | :ref:`content_scale_stretch<class_Window_property_content_scale_stretch>` | ``0`` |
  38. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  39. | :ref:`int<class_int>` | :ref:`current_screen<class_Window_property_current_screen>` | |
  40. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  41. | :ref:`bool<class_bool>` | :ref:`exclusive<class_Window_property_exclusive>` | ``false`` |
  42. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  43. | :ref:`bool<class_bool>` | :ref:`extend_to_title<class_Window_property_extend_to_title>` | ``false`` |
  44. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  45. | :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` | :ref:`initial_position<class_Window_property_initial_position>` | ``0`` |
  46. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  47. | :ref:`Vector2i<class_Vector2i>` | :ref:`max_size<class_Window_property_max_size>` | ``Vector2i(0, 0)`` |
  48. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  49. | :ref:`Vector2i<class_Vector2i>` | :ref:`min_size<class_Window_property_min_size>` | ``Vector2i(0, 0)`` |
  50. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  51. | :ref:`Mode<enum_Window_Mode>` | :ref:`mode<class_Window_property_mode>` | ``0`` |
  52. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`mouse_passthrough<class_Window_property_mouse_passthrough>` | ``false`` |
  54. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  55. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`mouse_passthrough_polygon<class_Window_property_mouse_passthrough_polygon>` | ``PackedVector2Array()`` |
  56. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  57. | :ref:`bool<class_bool>` | :ref:`popup_window<class_Window_property_popup_window>` | ``false`` |
  58. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  59. | :ref:`Vector2i<class_Vector2i>` | :ref:`position<class_Window_property_position>` | ``Vector2i(0, 0)`` |
  60. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  61. | :ref:`Vector2i<class_Vector2i>` | :ref:`size<class_Window_property_size>` | ``Vector2i(100, 100)`` |
  62. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  63. | :ref:`Theme<class_Theme>` | :ref:`theme<class_Window_property_theme>` | |
  64. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  65. | :ref:`StringName<class_StringName>` | :ref:`theme_type_variation<class_Window_property_theme_type_variation>` | ``&""`` |
  66. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  67. | :ref:`String<class_String>` | :ref:`title<class_Window_property_title>` | ``""`` |
  68. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  69. | :ref:`bool<class_bool>` | :ref:`transient<class_Window_property_transient>` | ``false`` |
  70. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  71. | :ref:`bool<class_bool>` | :ref:`transparent<class_Window_property_transparent>` | ``false`` |
  72. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  73. | :ref:`bool<class_bool>` | :ref:`unfocusable<class_Window_property_unfocusable>` | ``false`` |
  74. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  75. | :ref:`bool<class_bool>` | :ref:`unresizable<class_Window_property_unresizable>` | ``false`` |
  76. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  77. | :ref:`bool<class_bool>` | :ref:`visible<class_Window_property_visible>` | ``true`` |
  78. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  79. | :ref:`bool<class_bool>` | :ref:`wrap_controls<class_Window_property_wrap_controls>` | ``false`` |
  80. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  81. .. rst-class:: classref-reftable-group
  82. Methods
  83. -------
  84. .. table::
  85. :widths: auto
  86. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`Vector2<class_Vector2>` | :ref:`_get_contents_minimum_size<class_Window_method__get_contents_minimum_size>` **(** **)** |virtual| |const| |
  88. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`add_theme_color_override<class_Window_method_add_theme_color_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`Color<class_Color>` color **)** |
  90. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | void | :ref:`add_theme_constant_override<class_Window_method_add_theme_constant_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` constant **)** |
  92. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | void | :ref:`add_theme_font_override<class_Window_method_add_theme_font_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`Font<class_Font>` font **)** |
  94. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | void | :ref:`add_theme_font_size_override<class_Window_method_add_theme_font_size_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` font_size **)** |
  96. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | void | :ref:`add_theme_icon_override<class_Window_method_add_theme_icon_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`Texture2D<class_Texture2D>` texture **)** |
  98. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | void | :ref:`add_theme_stylebox_override<class_Window_method_add_theme_stylebox_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`StyleBox<class_StyleBox>` stylebox **)** |
  100. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | void | :ref:`begin_bulk_theme_override<class_Window_method_begin_bulk_theme_override>` **(** **)** |
  102. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`bool<class_bool>` | :ref:`can_draw<class_Window_method_can_draw>` **(** **)** |const| |
  104. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | void | :ref:`child_controls_changed<class_Window_method_child_controls_changed>` **(** **)** |
  106. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | void | :ref:`end_bulk_theme_override<class_Window_method_end_bulk_theme_override>` **(** **)** |
  108. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | :ref:`Vector2<class_Vector2>` | :ref:`get_contents_minimum_size<class_Window_method_get_contents_minimum_size>` **(** **)** |const| |
  110. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | :ref:`bool<class_bool>` | :ref:`get_flag<class_Window_method_get_flag>` **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| |
  112. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | :ref:`LayoutDirection<enum_Window_LayoutDirection>` | :ref:`get_layout_direction<class_Window_method_get_layout_direction>` **(** **)** |const| |
  114. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | :ref:`Vector2i<class_Vector2i>` | :ref:`get_position_with_decorations<class_Window_method_get_position_with_decorations>` **(** **)** |const| |
  116. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | :ref:`Vector2i<class_Vector2i>` | :ref:`get_size_with_decorations<class_Window_method_get_size_with_decorations>` **(** **)** |const| |
  118. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | :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| |
  120. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | :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| |
  122. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | :ref:`float<class_float>` | :ref:`get_theme_default_base_scale<class_Window_method_get_theme_default_base_scale>` **(** **)** |const| |
  124. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | :ref:`Font<class_Font>` | :ref:`get_theme_default_font<class_Window_method_get_theme_default_font>` **(** **)** |const| |
  126. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | :ref:`int<class_int>` | :ref:`get_theme_default_font_size<class_Window_method_get_theme_default_font_size>` **(** **)** |const| |
  128. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | :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| |
  130. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | :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| |
  132. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | :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| |
  134. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | :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| |
  136. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | :ref:`int<class_int>` | :ref:`get_window_id<class_Window_method_get_window_id>` **(** **)** |const| |
  138. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | void | :ref:`grab_focus<class_Window_method_grab_focus>` **(** **)** |
  140. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | :ref:`bool<class_bool>` | :ref:`has_focus<class_Window_method_has_focus>` **(** **)** |const| |
  142. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | :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| |
  144. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | :ref:`bool<class_bool>` | :ref:`has_theme_color_override<class_Window_method_has_theme_color_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
  146. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | :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| |
  148. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | :ref:`bool<class_bool>` | :ref:`has_theme_constant_override<class_Window_method_has_theme_constant_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
  150. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | :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| |
  152. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | :ref:`bool<class_bool>` | :ref:`has_theme_font_override<class_Window_method_has_theme_font_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
  154. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | :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| |
  156. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | :ref:`bool<class_bool>` | :ref:`has_theme_font_size_override<class_Window_method_has_theme_font_size_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
  158. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | :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| |
  160. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | :ref:`bool<class_bool>` | :ref:`has_theme_icon_override<class_Window_method_has_theme_icon_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
  162. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | :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| |
  164. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | :ref:`bool<class_bool>` | :ref:`has_theme_stylebox_override<class_Window_method_has_theme_stylebox_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
  166. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | void | :ref:`hide<class_Window_method_hide>` **(** **)** |
  168. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | :ref:`bool<class_bool>` | :ref:`is_embedded<class_Window_method_is_embedded>` **(** **)** |const| |
  170. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. | :ref:`bool<class_bool>` | :ref:`is_layout_rtl<class_Window_method_is_layout_rtl>` **(** **)** |const| |
  172. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  173. | :ref:`bool<class_bool>` | :ref:`is_maximize_allowed<class_Window_method_is_maximize_allowed>` **(** **)** |const| |
  174. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  175. | :ref:`bool<class_bool>` | :ref:`is_using_font_oversampling<class_Window_method_is_using_font_oversampling>` **(** **)** |const| |
  176. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  177. | void | :ref:`move_to_center<class_Window_method_move_to_center>` **(** **)** |
  178. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  179. | void | :ref:`move_to_foreground<class_Window_method_move_to_foreground>` **(** **)** |
  180. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  181. | void | :ref:`popup<class_Window_method_popup>` **(** :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)** |
  182. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  183. | void | :ref:`popup_centered<class_Window_method_popup_centered>` **(** :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)** |
  184. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  185. | 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 **)** |
  186. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  187. | void | :ref:`popup_centered_ratio<class_Window_method_popup_centered_ratio>` **(** :ref:`float<class_float>` ratio=0.8 **)** |
  188. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  189. | void | :ref:`popup_exclusive<class_Window_method_popup_exclusive>` **(** :ref:`Node<class_Node>` from_node, :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)** |
  190. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  191. | void | :ref:`popup_exclusive_centered<class_Window_method_popup_exclusive_centered>` **(** :ref:`Node<class_Node>` from_node, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)** |
  192. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  193. | void | :ref:`popup_exclusive_centered_clamped<class_Window_method_popup_exclusive_centered_clamped>` **(** :ref:`Node<class_Node>` from_node, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0), :ref:`float<class_float>` fallback_ratio=0.75 **)** |
  194. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  195. | void | :ref:`popup_exclusive_centered_ratio<class_Window_method_popup_exclusive_centered_ratio>` **(** :ref:`Node<class_Node>` from_node, :ref:`float<class_float>` ratio=0.8 **)** |
  196. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  197. | void | :ref:`popup_exclusive_on_parent<class_Window_method_popup_exclusive_on_parent>` **(** :ref:`Node<class_Node>` from_node, :ref:`Rect2i<class_Rect2i>` parent_rect **)** |
  198. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  199. | void | :ref:`popup_on_parent<class_Window_method_popup_on_parent>` **(** :ref:`Rect2i<class_Rect2i>` parent_rect **)** |
  200. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  201. | void | :ref:`remove_theme_color_override<class_Window_method_remove_theme_color_override>` **(** :ref:`StringName<class_StringName>` name **)** |
  202. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  203. | void | :ref:`remove_theme_constant_override<class_Window_method_remove_theme_constant_override>` **(** :ref:`StringName<class_StringName>` name **)** |
  204. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  205. | void | :ref:`remove_theme_font_override<class_Window_method_remove_theme_font_override>` **(** :ref:`StringName<class_StringName>` name **)** |
  206. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  207. | void | :ref:`remove_theme_font_size_override<class_Window_method_remove_theme_font_size_override>` **(** :ref:`StringName<class_StringName>` name **)** |
  208. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  209. | void | :ref:`remove_theme_icon_override<class_Window_method_remove_theme_icon_override>` **(** :ref:`StringName<class_StringName>` name **)** |
  210. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  211. | void | :ref:`remove_theme_stylebox_override<class_Window_method_remove_theme_stylebox_override>` **(** :ref:`StringName<class_StringName>` name **)** |
  212. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  213. | void | :ref:`request_attention<class_Window_method_request_attention>` **(** **)** |
  214. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  215. | void | :ref:`reset_size<class_Window_method_reset_size>` **(** **)** |
  216. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  217. | void | :ref:`set_flag<class_Window_method_set_flag>` **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** |
  218. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  219. | void | :ref:`set_ime_active<class_Window_method_set_ime_active>` **(** :ref:`bool<class_bool>` active **)** |
  220. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  221. | void | :ref:`set_ime_position<class_Window_method_set_ime_position>` **(** :ref:`Vector2i<class_Vector2i>` position **)** |
  222. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  223. | void | :ref:`set_layout_direction<class_Window_method_set_layout_direction>` **(** :ref:`LayoutDirection<enum_Window_LayoutDirection>` direction **)** |
  224. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  225. | void | :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when_invisible>` **(** :ref:`bool<class_bool>` unparent **)** |
  226. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  227. | void | :ref:`set_use_font_oversampling<class_Window_method_set_use_font_oversampling>` **(** :ref:`bool<class_bool>` enable **)** |
  228. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  229. | void | :ref:`show<class_Window_method_show>` **(** **)** |
  230. +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  231. .. rst-class:: classref-reftable-group
  232. Theme Properties
  233. ----------------
  234. .. table::
  235. :widths: auto
  236. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  237. | :ref:`Color<class_Color>` | :ref:`title_color<class_Window_theme_color_title_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  238. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  239. | :ref:`Color<class_Color>` | :ref:`title_outline_modulate<class_Window_theme_color_title_outline_modulate>` | ``Color(1, 1, 1, 1)`` |
  240. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  241. | :ref:`int<class_int>` | :ref:`close_h_offset<class_Window_theme_constant_close_h_offset>` | ``18`` |
  242. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  243. | :ref:`int<class_int>` | :ref:`close_v_offset<class_Window_theme_constant_close_v_offset>` | ``24`` |
  244. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  245. | :ref:`int<class_int>` | :ref:`resize_margin<class_Window_theme_constant_resize_margin>` | ``4`` |
  246. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  247. | :ref:`int<class_int>` | :ref:`title_height<class_Window_theme_constant_title_height>` | ``36`` |
  248. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  249. | :ref:`int<class_int>` | :ref:`title_outline_size<class_Window_theme_constant_title_outline_size>` | ``0`` |
  250. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  251. | :ref:`Font<class_Font>` | :ref:`title_font<class_Window_theme_font_title_font>` | |
  252. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  253. | :ref:`int<class_int>` | :ref:`title_font_size<class_Window_theme_font_size_title_font_size>` | |
  254. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  255. | :ref:`Texture2D<class_Texture2D>` | :ref:`close<class_Window_theme_icon_close>` | |
  256. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  257. | :ref:`Texture2D<class_Texture2D>` | :ref:`close_pressed<class_Window_theme_icon_close_pressed>` | |
  258. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  259. | :ref:`StyleBox<class_StyleBox>` | :ref:`embedded_border<class_Window_theme_style_embedded_border>` | |
  260. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  261. | :ref:`StyleBox<class_StyleBox>` | :ref:`embedded_unfocused_border<class_Window_theme_style_embedded_unfocused_border>` | |
  262. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  263. .. rst-class:: classref-section-separator
  264. ----
  265. .. rst-class:: classref-descriptions-group
  266. Signals
  267. -------
  268. .. _class_Window_signal_about_to_popup:
  269. .. rst-class:: classref-signal
  270. **about_to_popup** **(** **)**
  271. Emitted right after :ref:`popup<class_Window_method_popup>` call, before the **Window** appears or does anything.
  272. .. rst-class:: classref-item-separator
  273. ----
  274. .. _class_Window_signal_close_requested:
  275. .. rst-class:: classref-signal
  276. **close_requested** **(** **)**
  277. Emitted when the **Window**'s close button is pressed or when :ref:`popup_window<class_Window_property_popup_window>` is enabled and user clicks outside the window.
  278. This signal can be used to handle window closing, e.g. by connecting it to :ref:`hide<class_Window_method_hide>`.
  279. .. rst-class:: classref-item-separator
  280. ----
  281. .. _class_Window_signal_dpi_changed:
  282. .. rst-class:: classref-signal
  283. **dpi_changed** **(** **)**
  284. 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).
  285. \ **Note:** Only implemented on macOS.
  286. .. rst-class:: classref-item-separator
  287. ----
  288. .. _class_Window_signal_files_dropped:
  289. .. rst-class:: classref-signal
  290. **files_dropped** **(** :ref:`PackedStringArray<class_PackedStringArray>` files **)**
  291. Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths.
  292. Note that this method only works with native windows, i.e. the main window and **Window**-derived nodes when :ref:`Viewport.gui_embed_subwindows<class_Viewport_property_gui_embed_subwindows>` is disabled in the main viewport.
  293. Example usage:
  294. ::
  295. func _ready():
  296. get_viewport().files_dropped.connect(on_files_dropped)
  297. func on_files_dropped(files):
  298. print(files)
  299. .. rst-class:: classref-item-separator
  300. ----
  301. .. _class_Window_signal_focus_entered:
  302. .. rst-class:: classref-signal
  303. **focus_entered** **(** **)**
  304. Emitted when the **Window** gains focus.
  305. .. rst-class:: classref-item-separator
  306. ----
  307. .. _class_Window_signal_focus_exited:
  308. .. rst-class:: classref-signal
  309. **focus_exited** **(** **)**
  310. Emitted when the **Window** loses its focus.
  311. .. rst-class:: classref-item-separator
  312. ----
  313. .. _class_Window_signal_go_back_requested:
  314. .. rst-class:: classref-signal
  315. **go_back_requested** **(** **)**
  316. Emitted when a go back request is sent (e.g. pressing the "Back" button on Android), right after :ref:`Node.NOTIFICATION_WM_GO_BACK_REQUEST<class_Node_constant_NOTIFICATION_WM_GO_BACK_REQUEST>`.
  317. .. rst-class:: classref-item-separator
  318. ----
  319. .. _class_Window_signal_mouse_entered:
  320. .. rst-class:: classref-signal
  321. **mouse_entered** **(** **)**
  322. Emitted when the mouse cursor enters the **Window**'s visible area, that is not occluded behind other :ref:`Control<class_Control>`\ s or windows, provided its :ref:`Viewport.gui_disable_input<class_Viewport_property_gui_disable_input>` is ``false`` and regardless if it's currently focused or not.
  323. .. rst-class:: classref-item-separator
  324. ----
  325. .. _class_Window_signal_mouse_exited:
  326. .. rst-class:: classref-signal
  327. **mouse_exited** **(** **)**
  328. Emitted when the mouse cursor leaves the **Window**'s visible area, that is not occluded behind other :ref:`Control<class_Control>`\ s or windows, provided its :ref:`Viewport.gui_disable_input<class_Viewport_property_gui_disable_input>` is ``false`` and regardless if it's currently focused or not.
  329. .. rst-class:: classref-item-separator
  330. ----
  331. .. _class_Window_signal_theme_changed:
  332. .. rst-class:: classref-signal
  333. **theme_changed** **(** **)**
  334. Emitted when the :ref:`NOTIFICATION_THEME_CHANGED<class_Window_constant_NOTIFICATION_THEME_CHANGED>` notification is sent.
  335. .. rst-class:: classref-item-separator
  336. ----
  337. .. _class_Window_signal_titlebar_changed:
  338. .. rst-class:: classref-signal
  339. **titlebar_changed** **(** **)**
  340. Emitted when window title bar decorations are changed, e.g. macOS window enter/exit full screen mode, or extend-to-title flag is changed.
  341. .. rst-class:: classref-item-separator
  342. ----
  343. .. _class_Window_signal_visibility_changed:
  344. .. rst-class:: classref-signal
  345. **visibility_changed** **(** **)**
  346. Emitted when **Window** is made visible or disappears.
  347. .. rst-class:: classref-item-separator
  348. ----
  349. .. _class_Window_signal_window_input:
  350. .. rst-class:: classref-signal
  351. **window_input** **(** :ref:`InputEvent<class_InputEvent>` event **)**
  352. 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.
  353. .. rst-class:: classref-section-separator
  354. ----
  355. .. rst-class:: classref-descriptions-group
  356. Enumerations
  357. ------------
  358. .. _enum_Window_Mode:
  359. .. rst-class:: classref-enumeration
  360. enum **Mode**:
  361. .. _class_Window_constant_MODE_WINDOWED:
  362. .. rst-class:: classref-enumeration-constant
  363. :ref:`Mode<enum_Window_Mode>` **MODE_WINDOWED** = ``0``
  364. Windowed mode, i.e. **Window** doesn't occupy the whole screen (unless set to the size of the screen).
  365. .. _class_Window_constant_MODE_MINIMIZED:
  366. .. rst-class:: classref-enumeration-constant
  367. :ref:`Mode<enum_Window_Mode>` **MODE_MINIMIZED** = ``1``
  368. 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.
  369. .. _class_Window_constant_MODE_MAXIMIZED:
  370. .. rst-class:: classref-enumeration-constant
  371. :ref:`Mode<enum_Window_Mode>` **MODE_MAXIMIZED** = ``2``
  372. 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.
  373. .. _class_Window_constant_MODE_FULLSCREEN:
  374. .. rst-class:: classref-enumeration-constant
  375. :ref:`Mode<enum_Window_Mode>` **MODE_FULLSCREEN** = ``3``
  376. Full screen window mode. Note that this is not *exclusive* full screen. On Windows and Linux, a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project.
  377. Regardless of the platform, enabling full screen 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 full screen mode.
  378. .. _class_Window_constant_MODE_EXCLUSIVE_FULLSCREEN:
  379. .. rst-class:: classref-enumeration-constant
  380. :ref:`Mode<enum_Window_Mode>` **MODE_EXCLUSIVE_FULLSCREEN** = ``4``
  381. Exclusive full screen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to :ref:`MODE_FULLSCREEN<class_Window_constant_MODE_FULLSCREEN>`.
  382. Only one window in exclusive full screen mode can be visible on a given screen at a time. If multiple windows are in exclusive full screen mode for the same screen, the last one being set to this mode takes precedence.
  383. Regardless of the platform, enabling full screen 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 full screen mode.
  384. .. rst-class:: classref-item-separator
  385. ----
  386. .. _enum_Window_Flags:
  387. .. rst-class:: classref-enumeration
  388. enum **Flags**:
  389. .. _class_Window_constant_FLAG_RESIZE_DISABLED:
  390. .. rst-class:: classref-enumeration-constant
  391. :ref:`Flags<enum_Window_Flags>` **FLAG_RESIZE_DISABLED** = ``0``
  392. The window can't be resized by dragging its resize grip. It's still possible to resize the window using :ref:`size<class_Window_property_size>`. This flag is ignored for full screen windows. Set with :ref:`unresizable<class_Window_property_unresizable>`.
  393. .. _class_Window_constant_FLAG_BORDERLESS:
  394. .. rst-class:: classref-enumeration-constant
  395. :ref:`Flags<enum_Window_Flags>` **FLAG_BORDERLESS** = ``1``
  396. The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. Set with :ref:`borderless<class_Window_property_borderless>`.
  397. .. _class_Window_constant_FLAG_ALWAYS_ON_TOP:
  398. .. rst-class:: classref-enumeration-constant
  399. :ref:`Flags<enum_Window_Flags>` **FLAG_ALWAYS_ON_TOP** = ``2``
  400. The window is floating on top of all other windows. This flag is ignored for full-screen windows. Set with :ref:`always_on_top<class_Window_property_always_on_top>`.
  401. .. _class_Window_constant_FLAG_TRANSPARENT:
  402. .. rst-class:: classref-enumeration-constant
  403. :ref:`Flags<enum_Window_Flags>` **FLAG_TRANSPARENT** = ``3``
  404. The window background can be transparent. Set with :ref:`transparent<class_Window_property_transparent>`.
  405. \ **Note:** This flag has no effect if either :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>`, or the window's :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` is set to ``false``.
  406. .. _class_Window_constant_FLAG_NO_FOCUS:
  407. .. rst-class:: classref-enumeration-constant
  408. :ref:`Flags<enum_Window_Flags>` **FLAG_NO_FOCUS** = ``4``
  409. The window can't be focused. No-focus window will ignore all input, except mouse clicks. Set with :ref:`unfocusable<class_Window_property_unfocusable>`.
  410. .. _class_Window_constant_FLAG_POPUP:
  411. .. rst-class:: classref-enumeration-constant
  412. :ref:`Flags<enum_Window_Flags>` **FLAG_POPUP** = ``5``
  413. Window is part of menu or :ref:`OptionButton<class_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 :ref:`transient<class_Window_property_transient>`).
  414. \ **Note:** This flag has no effect in embedded windows (unless said window is a :ref:`Popup<class_Popup>`).
  415. .. _class_Window_constant_FLAG_EXTEND_TO_TITLE:
  416. .. rst-class:: classref-enumeration-constant
  417. :ref:`Flags<enum_Window_Flags>` **FLAG_EXTEND_TO_TITLE** = ``6``
  418. 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 :ref:`extend_to_title<class_Window_property_extend_to_title>`.
  419. \ **Note:** This flag is implemented only on macOS.
  420. \ **Note:** This flag has no effect in embedded windows.
  421. .. _class_Window_constant_FLAG_MOUSE_PASSTHROUGH:
  422. .. rst-class:: classref-enumeration-constant
  423. :ref:`Flags<enum_Window_Flags>` **FLAG_MOUSE_PASSTHROUGH** = ``7``
  424. All mouse events are passed to the underlying window of the same application.
  425. \ **Note:** This flag has no effect in embedded windows.
  426. .. _class_Window_constant_FLAG_MAX:
  427. .. rst-class:: classref-enumeration-constant
  428. :ref:`Flags<enum_Window_Flags>` **FLAG_MAX** = ``8``
  429. Max value of the :ref:`Flags<enum_Window_Flags>`.
  430. .. rst-class:: classref-item-separator
  431. ----
  432. .. _enum_Window_ContentScaleMode:
  433. .. rst-class:: classref-enumeration
  434. enum **ContentScaleMode**:
  435. .. _class_Window_constant_CONTENT_SCALE_MODE_DISABLED:
  436. .. rst-class:: classref-enumeration-constant
  437. :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **CONTENT_SCALE_MODE_DISABLED** = ``0``
  438. The content will not be scaled to match the **Window**'s size.
  439. .. _class_Window_constant_CONTENT_SCALE_MODE_CANVAS_ITEMS:
  440. .. rst-class:: classref-enumeration-constant
  441. :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **CONTENT_SCALE_MODE_CANVAS_ITEMS** = ``1``
  442. The content will be rendered at the target size. This is more performance-expensive than :ref:`CONTENT_SCALE_MODE_VIEWPORT<class_Window_constant_CONTENT_SCALE_MODE_VIEWPORT>`, but provides better results.
  443. .. _class_Window_constant_CONTENT_SCALE_MODE_VIEWPORT:
  444. .. rst-class:: classref-enumeration-constant
  445. :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **CONTENT_SCALE_MODE_VIEWPORT** = ``2``
  446. The content will be rendered at the base size and then scaled to the target size. More performant than :ref:`CONTENT_SCALE_MODE_CANVAS_ITEMS<class_Window_constant_CONTENT_SCALE_MODE_CANVAS_ITEMS>`, but results in pixelated image.
  447. .. rst-class:: classref-item-separator
  448. ----
  449. .. _enum_Window_ContentScaleAspect:
  450. .. rst-class:: classref-enumeration
  451. enum **ContentScaleAspect**:
  452. .. _class_Window_constant_CONTENT_SCALE_ASPECT_IGNORE:
  453. .. rst-class:: classref-enumeration-constant
  454. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_IGNORE** = ``0``
  455. The aspect will be ignored. Scaling will simply stretch the content to fit the target size.
  456. .. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP:
  457. .. rst-class:: classref-enumeration-constant
  458. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_KEEP** = ``1``
  459. 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.
  460. .. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_WIDTH:
  461. .. rst-class:: classref-enumeration-constant
  462. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_KEEP_WIDTH** = ``2``
  463. The content can be expanded vertically. Scaling horizontally will result in keeping the width ratio and then black bars on left and right sides.
  464. .. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_HEIGHT:
  465. .. rst-class:: classref-enumeration-constant
  466. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_KEEP_HEIGHT** = ``3``
  467. The content can be expanded horizontally. Scaling vertically will result in keeping the height ratio and then black bars on top and bottom sides.
  468. .. _class_Window_constant_CONTENT_SCALE_ASPECT_EXPAND:
  469. .. rst-class:: classref-enumeration-constant
  470. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_EXPAND** = ``4``
  471. 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.
  472. .. rst-class:: classref-item-separator
  473. ----
  474. .. _enum_Window_ContentScaleStretch:
  475. .. rst-class:: classref-enumeration
  476. enum **ContentScaleStretch**:
  477. .. _class_Window_constant_CONTENT_SCALE_STRETCH_FRACTIONAL:
  478. .. rst-class:: classref-enumeration-constant
  479. :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **CONTENT_SCALE_STRETCH_FRACTIONAL** = ``0``
  480. 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.
  481. .. _class_Window_constant_CONTENT_SCALE_STRETCH_INTEGER:
  482. .. rst-class:: classref-enumeration-constant
  483. :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **CONTENT_SCALE_STRETCH_INTEGER** = ``1``
  484. 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.
  485. .. rst-class:: classref-item-separator
  486. ----
  487. .. _enum_Window_LayoutDirection:
  488. .. rst-class:: classref-enumeration
  489. enum **LayoutDirection**:
  490. .. _class_Window_constant_LAYOUT_DIRECTION_INHERITED:
  491. .. rst-class:: classref-enumeration-constant
  492. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_INHERITED** = ``0``
  493. Automatic layout direction, determined from the parent window layout direction.
  494. .. _class_Window_constant_LAYOUT_DIRECTION_LOCALE:
  495. .. rst-class:: classref-enumeration-constant
  496. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_LOCALE** = ``1``
  497. Automatic layout direction, determined from the current locale.
  498. .. _class_Window_constant_LAYOUT_DIRECTION_LTR:
  499. .. rst-class:: classref-enumeration-constant
  500. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_LTR** = ``2``
  501. Left-to-right layout direction.
  502. .. _class_Window_constant_LAYOUT_DIRECTION_RTL:
  503. .. rst-class:: classref-enumeration-constant
  504. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_RTL** = ``3``
  505. Right-to-left layout direction.
  506. .. rst-class:: classref-item-separator
  507. ----
  508. .. _enum_Window_WindowInitialPosition:
  509. .. rst-class:: classref-enumeration
  510. enum **WindowInitialPosition**:
  511. .. _class_Window_constant_WINDOW_INITIAL_POSITION_ABSOLUTE:
  512. .. rst-class:: classref-enumeration-constant
  513. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_ABSOLUTE** = ``0``
  514. Initial window position is determined by :ref:`position<class_Window_property_position>`.
  515. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_PRIMARY_SCREEN:
  516. .. rst-class:: classref-enumeration-constant
  517. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_PRIMARY_SCREEN** = ``1``
  518. Initial window position is the center of the primary screen.
  519. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN:
  520. .. rst-class:: classref-enumeration-constant
  521. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN** = ``2``
  522. Initial window position is the center of the main window screen.
  523. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN:
  524. .. rst-class:: classref-enumeration-constant
  525. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN** = ``3``
  526. Initial window position is the center of :ref:`current_screen<class_Window_property_current_screen>` screen.
  527. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS:
  528. .. rst-class:: classref-enumeration-constant
  529. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS** = ``4``
  530. Initial window position is the center of the screen containing the mouse pointer.
  531. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS:
  532. .. rst-class:: classref-enumeration-constant
  533. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS** = ``5``
  534. Initial window position is the center of the screen containing the window with the keyboard focus.
  535. .. rst-class:: classref-section-separator
  536. ----
  537. .. rst-class:: classref-descriptions-group
  538. Constants
  539. ---------
  540. .. _class_Window_constant_NOTIFICATION_VISIBILITY_CHANGED:
  541. .. rst-class:: classref-constant
  542. **NOTIFICATION_VISIBILITY_CHANGED** = ``30``
  543. Emitted when **Window**'s visibility changes, right before :ref:`visibility_changed<class_Window_signal_visibility_changed>`.
  544. .. _class_Window_constant_NOTIFICATION_THEME_CHANGED:
  545. .. rst-class:: classref-constant
  546. **NOTIFICATION_THEME_CHANGED** = ``32``
  547. Sent when the node needs to refresh its theme items. This happens in one of the following cases:
  548. - The :ref:`theme<class_Window_property_theme>` property is changed on this node or any of its ancestors.
  549. - The :ref:`theme_type_variation<class_Window_property_theme_type_variation>` property is changed on this node.
  550. - The node enters the scene tree.
  551. \ **Note:** 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.
  552. .. rst-class:: classref-section-separator
  553. ----
  554. .. rst-class:: classref-descriptions-group
  555. Property Descriptions
  556. ---------------------
  557. .. _class_Window_property_always_on_top:
  558. .. rst-class:: classref-property
  559. :ref:`bool<class_bool>` **always_on_top** = ``false``
  560. .. rst-class:: classref-property-setget
  561. - void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)**
  562. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const|
  563. If ``true``, the window will be on top of all other windows. Does not work if :ref:`transient<class_Window_property_transient>` is enabled.
  564. .. rst-class:: classref-item-separator
  565. ----
  566. .. _class_Window_property_auto_translate:
  567. .. rst-class:: classref-property
  568. :ref:`bool<class_bool>` **auto_translate** = ``true``
  569. .. rst-class:: classref-property-setget
  570. - void **set_auto_translate** **(** :ref:`bool<class_bool>` value **)**
  571. - :ref:`bool<class_bool>` **is_auto_translating** **(** **)**
  572. Toggles if any text should automatically change to its translated version depending on the current locale.
  573. .. rst-class:: classref-item-separator
  574. ----
  575. .. _class_Window_property_borderless:
  576. .. rst-class:: classref-property
  577. :ref:`bool<class_bool>` **borderless** = ``false``
  578. .. rst-class:: classref-property-setget
  579. - void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)**
  580. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const|
  581. If ``true``, the window will have no borders.
  582. .. rst-class:: classref-item-separator
  583. ----
  584. .. _class_Window_property_content_scale_aspect:
  585. .. rst-class:: classref-property
  586. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **content_scale_aspect** = ``0``
  587. .. rst-class:: classref-property-setget
  588. - void **set_content_scale_aspect** **(** :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` value **)**
  589. - :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **get_content_scale_aspect** **(** **)**
  590. Specifies how the content's aspect behaves when the **Window** is resized. The base aspect is determined by :ref:`content_scale_size<class_Window_property_content_scale_size>`.
  591. .. rst-class:: classref-item-separator
  592. ----
  593. .. _class_Window_property_content_scale_factor:
  594. .. rst-class:: classref-property
  595. :ref:`float<class_float>` **content_scale_factor** = ``1.0``
  596. .. rst-class:: classref-property-setget
  597. - void **set_content_scale_factor** **(** :ref:`float<class_float>` value **)**
  598. - :ref:`float<class_float>` **get_content_scale_factor** **(** **)**
  599. Specifies the base scale of **Window**'s content when its :ref:`size<class_Window_property_size>` is equal to :ref:`content_scale_size<class_Window_property_content_scale_size>`.
  600. .. rst-class:: classref-item-separator
  601. ----
  602. .. _class_Window_property_content_scale_mode:
  603. .. rst-class:: classref-property
  604. :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **content_scale_mode** = ``0``
  605. .. rst-class:: classref-property-setget
  606. - void **set_content_scale_mode** **(** :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` value **)**
  607. - :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **get_content_scale_mode** **(** **)**
  608. Specifies how the content is scaled when the **Window** is resized.
  609. .. rst-class:: classref-item-separator
  610. ----
  611. .. _class_Window_property_content_scale_size:
  612. .. rst-class:: classref-property
  613. :ref:`Vector2i<class_Vector2i>` **content_scale_size** = ``Vector2i(0, 0)``
  614. .. rst-class:: classref-property-setget
  615. - void **set_content_scale_size** **(** :ref:`Vector2i<class_Vector2i>` value **)**
  616. - :ref:`Vector2i<class_Vector2i>` **get_content_scale_size** **(** **)**
  617. Base size of the content (i.e. nodes that are drawn inside the window). If non-zero, **Window**'s content will be scaled when the window is resized to a different size.
  618. .. rst-class:: classref-item-separator
  619. ----
  620. .. _class_Window_property_content_scale_stretch:
  621. .. rst-class:: classref-property
  622. :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **content_scale_stretch** = ``0``
  623. .. rst-class:: classref-property-setget
  624. - void **set_content_scale_stretch** **(** :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` value **)**
  625. - :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **get_content_scale_stretch** **(** **)**
  626. The policy to use to determine the final scale factor for 2D elements. This affects how :ref:`content_scale_factor<class_Window_property_content_scale_factor>` is applied, in addition to the automatic scale factor determined by :ref:`content_scale_size<class_Window_property_content_scale_size>`.
  627. .. rst-class:: classref-item-separator
  628. ----
  629. .. _class_Window_property_current_screen:
  630. .. rst-class:: classref-property
  631. :ref:`int<class_int>` **current_screen**
  632. .. rst-class:: classref-property-setget
  633. - void **set_current_screen** **(** :ref:`int<class_int>` value **)**
  634. - :ref:`int<class_int>` **get_current_screen** **(** **)**
  635. The screen the window is currently on.
  636. .. rst-class:: classref-item-separator
  637. ----
  638. .. _class_Window_property_exclusive:
  639. .. rst-class:: classref-property
  640. :ref:`bool<class_bool>` **exclusive** = ``false``
  641. .. rst-class:: classref-property-setget
  642. - void **set_exclusive** **(** :ref:`bool<class_bool>` value **)**
  643. - :ref:`bool<class_bool>` **is_exclusive** **(** **)**
  644. If ``true``, 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**.
  645. Needs :ref:`transient<class_Window_property_transient>` enabled to work.
  646. .. rst-class:: classref-item-separator
  647. ----
  648. .. _class_Window_property_extend_to_title:
  649. .. rst-class:: classref-property
  650. :ref:`bool<class_bool>` **extend_to_title** = ``false``
  651. .. rst-class:: classref-property-setget
  652. - void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)**
  653. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const|
  654. If ``true``, the **Window** contents is expanded to the full size of the window, window title bar is transparent.
  655. \ **Note:** This property is implemented only on macOS.
  656. \ **Note:** This property only works with native windows.
  657. .. rst-class:: classref-item-separator
  658. ----
  659. .. _class_Window_property_initial_position:
  660. .. rst-class:: classref-property
  661. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **initial_position** = ``0``
  662. .. rst-class:: classref-property-setget
  663. - void **set_initial_position** **(** :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` value **)**
  664. - :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **get_initial_position** **(** **)**
  665. Specifies the initial type of position for the **Window**. See :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` constants.
  666. .. rst-class:: classref-item-separator
  667. ----
  668. .. _class_Window_property_max_size:
  669. .. rst-class:: classref-property
  670. :ref:`Vector2i<class_Vector2i>` **max_size** = ``Vector2i(0, 0)``
  671. .. rst-class:: classref-property-setget
  672. - void **set_max_size** **(** :ref:`Vector2i<class_Vector2i>` value **)**
  673. - :ref:`Vector2i<class_Vector2i>` **get_max_size** **(** **)**
  674. If non-zero, the **Window** can't be resized to be bigger than this size.
  675. \ **Note:** This property will be ignored if the value is lower than :ref:`min_size<class_Window_property_min_size>`.
  676. .. rst-class:: classref-item-separator
  677. ----
  678. .. _class_Window_property_min_size:
  679. .. rst-class:: classref-property
  680. :ref:`Vector2i<class_Vector2i>` **min_size** = ``Vector2i(0, 0)``
  681. .. rst-class:: classref-property-setget
  682. - void **set_min_size** **(** :ref:`Vector2i<class_Vector2i>` value **)**
  683. - :ref:`Vector2i<class_Vector2i>` **get_min_size** **(** **)**
  684. If non-zero, the **Window** can't be resized to be smaller than this size.
  685. \ **Note:** This property will be ignored in favor of :ref:`get_contents_minimum_size<class_Window_method_get_contents_minimum_size>` if :ref:`wrap_controls<class_Window_property_wrap_controls>` is enabled and if its size is bigger.
  686. .. rst-class:: classref-item-separator
  687. ----
  688. .. _class_Window_property_mode:
  689. .. rst-class:: classref-property
  690. :ref:`Mode<enum_Window_Mode>` **mode** = ``0``
  691. .. rst-class:: classref-property-setget
  692. - void **set_mode** **(** :ref:`Mode<enum_Window_Mode>` value **)**
  693. - :ref:`Mode<enum_Window_Mode>` **get_mode** **(** **)**
  694. Set's the window's current mode.
  695. \ **Note:** Fullscreen mode is not exclusive full screen on Windows and Linux.
  696. \ **Note:** This method only works with native windows, i.e. the main window and **Window**-derived nodes when :ref:`Viewport.gui_embed_subwindows<class_Viewport_property_gui_embed_subwindows>` is disabled in the main viewport.
  697. .. rst-class:: classref-item-separator
  698. ----
  699. .. _class_Window_property_mouse_passthrough:
  700. .. rst-class:: classref-property
  701. :ref:`bool<class_bool>` **mouse_passthrough** = ``false``
  702. .. rst-class:: classref-property-setget
  703. - void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)**
  704. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const|
  705. If ``true``, all mouse events will be passed to the underlying window of the same application. See also :ref:`mouse_passthrough_polygon<class_Window_property_mouse_passthrough_polygon>`.
  706. \ **Note:** This property is implemented on Linux (X11), macOS and Windows.
  707. \ **Note:** This property only works with native windows.
  708. .. rst-class:: classref-item-separator
  709. ----
  710. .. _class_Window_property_mouse_passthrough_polygon:
  711. .. rst-class:: classref-property
  712. :ref:`PackedVector2Array<class_PackedVector2Array>` **mouse_passthrough_polygon** = ``PackedVector2Array()``
  713. .. rst-class:: classref-property-setget
  714. - void **set_mouse_passthrough_polygon** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` value **)**
  715. - :ref:`PackedVector2Array<class_PackedVector2Array>` **get_mouse_passthrough_polygon** **(** **)**
  716. Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.
  717. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
  718. .. tabs::
  719. .. code-tab:: gdscript
  720. # Set region, using Path2D node.
  721. $Window.mouse_passthrough_polygon = $Path2D.curve.get_baked_points()
  722. # Set region, using Polygon2D node.
  723. $Window.mouse_passthrough_polygon = $Polygon2D.polygon
  724. # Reset region to default.
  725. $Window.mouse_passthrough_polygon = []
  726. .. code-tab:: csharp
  727. // Set region, using Path2D node.
  728. GetNode<Window>("Window").MousePassthrough = GetNode<Path2D>("Path2D").Curve.GetBakedPoints();
  729. // Set region, using Polygon2D node.
  730. GetNode<Window>("Window").MousePassthrough = GetNode<Polygon2D>("Polygon2D").Polygon;
  731. // Reset region to default.
  732. GetNode<Window>("Window").MousePassthrough = new Vector2[] {};
  733. \ **Note:** This property is ignored if :ref:`mouse_passthrough<class_Window_property_mouse_passthrough>` is set to ``true``.
  734. \ **Note:** On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
  735. \ **Note:** This property is implemented on Linux (X11), macOS and Windows.
  736. .. rst-class:: classref-item-separator
  737. ----
  738. .. _class_Window_property_popup_window:
  739. .. rst-class:: classref-property
  740. :ref:`bool<class_bool>` **popup_window** = ``false``
  741. .. rst-class:: classref-property-setget
  742. - void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)**
  743. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const|
  744. If ``true``, 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 :ref:`exclusive<class_Window_property_exclusive>` is enabled).
  745. .. rst-class:: classref-item-separator
  746. ----
  747. .. _class_Window_property_position:
  748. .. rst-class:: classref-property
  749. :ref:`Vector2i<class_Vector2i>` **position** = ``Vector2i(0, 0)``
  750. .. rst-class:: classref-property-setget
  751. - void **set_position** **(** :ref:`Vector2i<class_Vector2i>` value **)**
  752. - :ref:`Vector2i<class_Vector2i>` **get_position** **(** **)**
  753. The window's position in pixels.
  754. If :ref:`ProjectSettings.display/window/subwindows/embed_subwindows<class_ProjectSettings_property_display/window/subwindows/embed_subwindows>` is ``false``, the position is in absolute screen coordinates. This typically applies to editor plugins. If the setting is ``true``, the window's position is in the coordinates of its parent :ref:`Viewport<class_Viewport>`.
  755. \ **Note:** This property only works if :ref:`initial_position<class_Window_property_initial_position>` is set to :ref:`WINDOW_INITIAL_POSITION_ABSOLUTE<class_Window_constant_WINDOW_INITIAL_POSITION_ABSOLUTE>`.
  756. .. rst-class:: classref-item-separator
  757. ----
  758. .. _class_Window_property_size:
  759. .. rst-class:: classref-property
  760. :ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(100, 100)``
  761. .. rst-class:: classref-property-setget
  762. - void **set_size** **(** :ref:`Vector2i<class_Vector2i>` value **)**
  763. - :ref:`Vector2i<class_Vector2i>` **get_size** **(** **)**
  764. The window's size in pixels.
  765. .. rst-class:: classref-item-separator
  766. ----
  767. .. _class_Window_property_theme:
  768. .. rst-class:: classref-property
  769. :ref:`Theme<class_Theme>` **theme**
  770. .. rst-class:: classref-property-setget
  771. - void **set_theme** **(** :ref:`Theme<class_Theme>` value **)**
  772. - :ref:`Theme<class_Theme>` **get_theme** **(** **)**
  773. The :ref:`Theme<class_Theme>` resource this node and all its :ref:`Control<class_Control>` and **Window** children use. If a child node has its own :ref:`Theme<class_Theme>` resource set, theme items are merged with child's definitions having higher priority.
  774. \ **Note:** **Window** styles will have no effect unless the window is embedded.
  775. .. rst-class:: classref-item-separator
  776. ----
  777. .. _class_Window_property_theme_type_variation:
  778. .. rst-class:: classref-property
  779. :ref:`StringName<class_StringName>` **theme_type_variation** = ``&""``
  780. .. rst-class:: classref-property-setget
  781. - void **set_theme_type_variation** **(** :ref:`StringName<class_StringName>` value **)**
  782. - :ref:`StringName<class_StringName>` **get_theme_type_variation** **(** **)**
  783. The name of a theme type variation used by this **Window** to look up its own theme items. See :ref:`Control.theme_type_variation<class_Control_property_theme_type_variation>` for more details.
  784. .. rst-class:: classref-item-separator
  785. ----
  786. .. _class_Window_property_title:
  787. .. rst-class:: classref-property
  788. :ref:`String<class_String>` **title** = ``""``
  789. .. rst-class:: classref-property-setget
  790. - void **set_title** **(** :ref:`String<class_String>` value **)**
  791. - :ref:`String<class_String>` **get_title** **(** **)**
  792. The window's title. If the **Window** is native, title styles set in :ref:`Theme<class_Theme>` will have no effect.
  793. .. rst-class:: classref-item-separator
  794. ----
  795. .. _class_Window_property_transient:
  796. .. rst-class:: classref-property
  797. :ref:`bool<class_bool>` **transient** = ``false``
  798. .. rst-class:: classref-property-setget
  799. - void **set_transient** **(** :ref:`bool<class_bool>` value **)**
  800. - :ref:`bool<class_bool>` **is_transient** **(** **)**
  801. If ``true``, 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.
  802. Note that behavior might be different depending on the platform.
  803. .. rst-class:: classref-item-separator
  804. ----
  805. .. _class_Window_property_transparent:
  806. .. rst-class:: classref-property
  807. :ref:`bool<class_bool>` **transparent** = ``false``
  808. .. rst-class:: classref-property-setget
  809. - void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)**
  810. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const|
  811. If ``true``, the **Window**'s background can be transparent. This is best used with embedded windows.
  812. \ **Note:** Transparency support is implemented on Linux, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
  813. \ **Note:** This property has no effect if either :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>`, or the window's :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` is set to ``false``.
  814. .. rst-class:: classref-item-separator
  815. ----
  816. .. _class_Window_property_unfocusable:
  817. .. rst-class:: classref-property
  818. :ref:`bool<class_bool>` **unfocusable** = ``false``
  819. .. rst-class:: classref-property-setget
  820. - void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)**
  821. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const|
  822. If ``true``, the **Window** can't be focused nor interacted with. It can still be visible.
  823. .. rst-class:: classref-item-separator
  824. ----
  825. .. _class_Window_property_unresizable:
  826. .. rst-class:: classref-property
  827. :ref:`bool<class_bool>` **unresizable** = ``false``
  828. .. rst-class:: classref-property-setget
  829. - void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)**
  830. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const|
  831. If ``true``, the window can't be resized. Minimize and maximize buttons are disabled.
  832. .. rst-class:: classref-item-separator
  833. ----
  834. .. _class_Window_property_visible:
  835. .. rst-class:: classref-property
  836. :ref:`bool<class_bool>` **visible** = ``true``
  837. .. rst-class:: classref-property-setget
  838. - void **set_visible** **(** :ref:`bool<class_bool>` value **)**
  839. - :ref:`bool<class_bool>` **is_visible** **(** **)**
  840. If ``true``, the window is visible.
  841. .. rst-class:: classref-item-separator
  842. ----
  843. .. _class_Window_property_wrap_controls:
  844. .. rst-class:: classref-property
  845. :ref:`bool<class_bool>` **wrap_controls** = ``false``
  846. .. rst-class:: classref-property-setget
  847. - void **set_wrap_controls** **(** :ref:`bool<class_bool>` value **)**
  848. - :ref:`bool<class_bool>` **is_wrapping_controls** **(** **)**
  849. If ``true``, the window's size will automatically update when a child node is added or removed, ignoring :ref:`min_size<class_Window_property_min_size>` if the new size is bigger.
  850. If ``false``, you need to call :ref:`child_controls_changed<class_Window_method_child_controls_changed>` manually.
  851. .. rst-class:: classref-section-separator
  852. ----
  853. .. rst-class:: classref-descriptions-group
  854. Method Descriptions
  855. -------------------
  856. .. _class_Window_method__get_contents_minimum_size:
  857. .. rst-class:: classref-method
  858. :ref:`Vector2<class_Vector2>` **_get_contents_minimum_size** **(** **)** |virtual| |const|
  859. Virtual method to be implemented by the user. Overrides the value returned by :ref:`get_contents_minimum_size<class_Window_method_get_contents_minimum_size>`.
  860. .. rst-class:: classref-item-separator
  861. ----
  862. .. _class_Window_method_add_theme_color_override:
  863. .. rst-class:: classref-method
  864. void **add_theme_color_override** **(** :ref:`StringName<class_StringName>` name, :ref:`Color<class_Color>` color **)**
  865. Creates a local override for a theme :ref:`Color<class_Color>` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_color_override<class_Window_method_remove_theme_color_override>`.
  866. See also :ref:`get_theme_color<class_Window_method_get_theme_color>` and :ref:`Control.add_theme_color_override<class_Control_method_add_theme_color_override>` for more details.
  867. .. rst-class:: classref-item-separator
  868. ----
  869. .. _class_Window_method_add_theme_constant_override:
  870. .. rst-class:: classref-method
  871. void **add_theme_constant_override** **(** :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` constant **)**
  872. Creates a local override for a theme constant with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_constant_override<class_Window_method_remove_theme_constant_override>`.
  873. See also :ref:`get_theme_constant<class_Window_method_get_theme_constant>`.
  874. .. rst-class:: classref-item-separator
  875. ----
  876. .. _class_Window_method_add_theme_font_override:
  877. .. rst-class:: classref-method
  878. void **add_theme_font_override** **(** :ref:`StringName<class_StringName>` name, :ref:`Font<class_Font>` font **)**
  879. Creates a local override for a theme :ref:`Font<class_Font>` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_override<class_Window_method_remove_theme_font_override>`.
  880. See also :ref:`get_theme_font<class_Window_method_get_theme_font>`.
  881. .. rst-class:: classref-item-separator
  882. ----
  883. .. _class_Window_method_add_theme_font_size_override:
  884. .. rst-class:: classref-method
  885. void **add_theme_font_size_override** **(** :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` font_size **)**
  886. Creates a local override for a theme font size with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_size_override<class_Window_method_remove_theme_font_size_override>`.
  887. See also :ref:`get_theme_font_size<class_Window_method_get_theme_font_size>`.
  888. .. rst-class:: classref-item-separator
  889. ----
  890. .. _class_Window_method_add_theme_icon_override:
  891. .. rst-class:: classref-method
  892. void **add_theme_icon_override** **(** :ref:`StringName<class_StringName>` name, :ref:`Texture2D<class_Texture2D>` texture **)**
  893. Creates a local override for a theme icon with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_icon_override<class_Window_method_remove_theme_icon_override>`.
  894. See also :ref:`get_theme_icon<class_Window_method_get_theme_icon>`.
  895. .. rst-class:: classref-item-separator
  896. ----
  897. .. _class_Window_method_add_theme_stylebox_override:
  898. .. rst-class:: classref-method
  899. void **add_theme_stylebox_override** **(** :ref:`StringName<class_StringName>` name, :ref:`StyleBox<class_StyleBox>` stylebox **)**
  900. Creates a local override for a theme :ref:`StyleBox<class_StyleBox>` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_stylebox_override<class_Window_method_remove_theme_stylebox_override>`.
  901. See also :ref:`get_theme_stylebox<class_Window_method_get_theme_stylebox>` and :ref:`Control.add_theme_stylebox_override<class_Control_method_add_theme_stylebox_override>` for more details.
  902. .. rst-class:: classref-item-separator
  903. ----
  904. .. _class_Window_method_begin_bulk_theme_override:
  905. .. rst-class:: classref-method
  906. void **begin_bulk_theme_override** **(** **)**
  907. Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_CHANGED<class_Window_constant_NOTIFICATION_THEME_CHANGED>` until :ref:`end_bulk_theme_override<class_Window_method_end_bulk_theme_override>` is called.
  908. .. rst-class:: classref-item-separator
  909. ----
  910. .. _class_Window_method_can_draw:
  911. .. rst-class:: classref-method
  912. :ref:`bool<class_bool>` **can_draw** **(** **)** |const|
  913. Returns whether the window is being drawn to the screen.
  914. .. rst-class:: classref-item-separator
  915. ----
  916. .. _class_Window_method_child_controls_changed:
  917. .. rst-class:: classref-method
  918. void **child_controls_changed** **(** **)**
  919. Requests an update of the **Window** size to fit underlying :ref:`Control<class_Control>` nodes.
  920. .. rst-class:: classref-item-separator
  921. ----
  922. .. _class_Window_method_end_bulk_theme_override:
  923. .. rst-class:: classref-method
  924. void **end_bulk_theme_override** **(** **)**
  925. Ends a bulk theme override update. See :ref:`begin_bulk_theme_override<class_Window_method_begin_bulk_theme_override>`.
  926. .. rst-class:: classref-item-separator
  927. ----
  928. .. _class_Window_method_get_contents_minimum_size:
  929. .. rst-class:: classref-method
  930. :ref:`Vector2<class_Vector2>` **get_contents_minimum_size** **(** **)** |const|
  931. Returns the combined minimum size from the child :ref:`Control<class_Control>` nodes of the window. Use :ref:`child_controls_changed<class_Window_method_child_controls_changed>` to update it when children nodes have changed.
  932. The value returned by this method can be overridden with :ref:`_get_contents_minimum_size<class_Window_method__get_contents_minimum_size>`.
  933. .. rst-class:: classref-item-separator
  934. ----
  935. .. _class_Window_method_get_flag:
  936. .. rst-class:: classref-method
  937. :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const|
  938. Returns ``true`` if the ``flag`` is set.
  939. .. rst-class:: classref-item-separator
  940. ----
  941. .. _class_Window_method_get_layout_direction:
  942. .. rst-class:: classref-method
  943. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **get_layout_direction** **(** **)** |const|
  944. Returns layout direction and text writing direction.
  945. .. rst-class:: classref-item-separator
  946. ----
  947. .. _class_Window_method_get_position_with_decorations:
  948. .. rst-class:: classref-method
  949. :ref:`Vector2i<class_Vector2i>` **get_position_with_decorations** **(** **)** |const|
  950. Returns the window's position including its border.
  951. .. rst-class:: classref-item-separator
  952. ----
  953. .. _class_Window_method_get_size_with_decorations:
  954. .. rst-class:: classref-method
  955. :ref:`Vector2i<class_Vector2i>` **get_size_with_decorations** **(** **)** |const|
  956. Returns the window's size including its border.
  957. .. rst-class:: classref-item-separator
  958. ----
  959. .. _class_Window_method_get_theme_color:
  960. .. rst-class:: classref-method
  961. :ref:`Color<class_Color>` **get_theme_color** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  962. Returns a :ref:`Color<class_Color>` from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a color item with the specified ``name`` and ``theme_type``.
  963. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for more details.
  964. .. rst-class:: classref-item-separator
  965. ----
  966. .. _class_Window_method_get_theme_constant:
  967. .. rst-class:: classref-method
  968. :ref:`int<class_int>` **get_theme_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  969. Returns a constant from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a constant item with the specified ``name`` and ``theme_type``.
  970. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for more details.
  971. .. rst-class:: classref-item-separator
  972. ----
  973. .. _class_Window_method_get_theme_default_base_scale:
  974. .. rst-class:: classref-method
  975. :ref:`float<class_float>` **get_theme_default_base_scale** **(** **)** |const|
  976. Returns the default base scale value from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a valid :ref:`Theme.default_base_scale<class_Theme_property_default_base_scale>` value.
  977. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  978. .. rst-class:: classref-item-separator
  979. ----
  980. .. _class_Window_method_get_theme_default_font:
  981. .. rst-class:: classref-method
  982. :ref:`Font<class_Font>` **get_theme_default_font** **(** **)** |const|
  983. Returns the default font from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a valid :ref:`Theme.default_font<class_Theme_property_default_font>` value.
  984. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  985. .. rst-class:: classref-item-separator
  986. ----
  987. .. _class_Window_method_get_theme_default_font_size:
  988. .. rst-class:: classref-method
  989. :ref:`int<class_int>` **get_theme_default_font_size** **(** **)** |const|
  990. Returns the default font size value from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a valid :ref:`Theme.default_font_size<class_Theme_property_default_font_size>` value.
  991. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  992. .. rst-class:: classref-item-separator
  993. ----
  994. .. _class_Window_method_get_theme_font:
  995. .. rst-class:: classref-method
  996. :ref:`Font<class_Font>` **get_theme_font** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  997. Returns a :ref:`Font<class_Font>` from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a font item with the specified ``name`` and ``theme_type``.
  998. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  999. .. rst-class:: classref-item-separator
  1000. ----
  1001. .. _class_Window_method_get_theme_font_size:
  1002. .. rst-class:: classref-method
  1003. :ref:`int<class_int>` **get_theme_font_size** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  1004. Returns a font size from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a font size item with the specified ``name`` and ``theme_type``.
  1005. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  1006. .. rst-class:: classref-item-separator
  1007. ----
  1008. .. _class_Window_method_get_theme_icon:
  1009. .. rst-class:: classref-method
  1010. :ref:`Texture2D<class_Texture2D>` **get_theme_icon** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  1011. Returns an icon from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has an icon item with the specified ``name`` and ``theme_type``.
  1012. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  1013. .. rst-class:: classref-item-separator
  1014. ----
  1015. .. _class_Window_method_get_theme_stylebox:
  1016. .. rst-class:: classref-method
  1017. :ref:`StyleBox<class_StyleBox>` **get_theme_stylebox** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  1018. Returns a :ref:`StyleBox<class_StyleBox>` from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a stylebox item with the specified ``name`` and ``theme_type``.
  1019. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  1020. .. rst-class:: classref-item-separator
  1021. ----
  1022. .. _class_Window_method_get_window_id:
  1023. .. rst-class:: classref-method
  1024. :ref:`int<class_int>` **get_window_id** **(** **)** |const|
  1025. Returns the ID of the window.
  1026. .. rst-class:: classref-item-separator
  1027. ----
  1028. .. _class_Window_method_grab_focus:
  1029. .. rst-class:: classref-method
  1030. void **grab_focus** **(** **)**
  1031. Causes the window to grab focus, allowing it to receive user input.
  1032. .. rst-class:: classref-item-separator
  1033. ----
  1034. .. _class_Window_method_has_focus:
  1035. .. rst-class:: classref-method
  1036. :ref:`bool<class_bool>` **has_focus** **(** **)** |const|
  1037. Returns ``true`` if the window is focused.
  1038. .. rst-class:: classref-item-separator
  1039. ----
  1040. .. _class_Window_method_has_theme_color:
  1041. .. rst-class:: classref-method
  1042. :ref:`bool<class_bool>` **has_theme_color** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  1043. Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has a color item with the specified ``name`` and ``theme_type``.
  1044. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  1045. .. rst-class:: classref-item-separator
  1046. ----
  1047. .. _class_Window_method_has_theme_color_override:
  1048. .. rst-class:: classref-method
  1049. :ref:`bool<class_bool>` **has_theme_color_override** **(** :ref:`StringName<class_StringName>` name **)** |const|
  1050. Returns ``true`` if there is a local override for a theme :ref:`Color<class_Color>` with the specified ``name`` in this :ref:`Control<class_Control>` node.
  1051. See :ref:`add_theme_color_override<class_Window_method_add_theme_color_override>`.
  1052. .. rst-class:: classref-item-separator
  1053. ----
  1054. .. _class_Window_method_has_theme_constant:
  1055. .. rst-class:: classref-method
  1056. :ref:`bool<class_bool>` **has_theme_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  1057. Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has a constant item with the specified ``name`` and ``theme_type``.
  1058. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  1059. .. rst-class:: classref-item-separator
  1060. ----
  1061. .. _class_Window_method_has_theme_constant_override:
  1062. .. rst-class:: classref-method
  1063. :ref:`bool<class_bool>` **has_theme_constant_override** **(** :ref:`StringName<class_StringName>` name **)** |const|
  1064. Returns ``true`` if there is a local override for a theme constant with the specified ``name`` in this :ref:`Control<class_Control>` node.
  1065. See :ref:`add_theme_constant_override<class_Window_method_add_theme_constant_override>`.
  1066. .. rst-class:: classref-item-separator
  1067. ----
  1068. .. _class_Window_method_has_theme_font:
  1069. .. rst-class:: classref-method
  1070. :ref:`bool<class_bool>` **has_theme_font** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  1071. Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has a font item with the specified ``name`` and ``theme_type``.
  1072. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  1073. .. rst-class:: classref-item-separator
  1074. ----
  1075. .. _class_Window_method_has_theme_font_override:
  1076. .. rst-class:: classref-method
  1077. :ref:`bool<class_bool>` **has_theme_font_override** **(** :ref:`StringName<class_StringName>` name **)** |const|
  1078. Returns ``true`` if there is a local override for a theme :ref:`Font<class_Font>` with the specified ``name`` in this :ref:`Control<class_Control>` node.
  1079. See :ref:`add_theme_font_override<class_Window_method_add_theme_font_override>`.
  1080. .. rst-class:: classref-item-separator
  1081. ----
  1082. .. _class_Window_method_has_theme_font_size:
  1083. .. rst-class:: classref-method
  1084. :ref:`bool<class_bool>` **has_theme_font_size** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  1085. Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has a font size item with the specified ``name`` and ``theme_type``.
  1086. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  1087. .. rst-class:: classref-item-separator
  1088. ----
  1089. .. _class_Window_method_has_theme_font_size_override:
  1090. .. rst-class:: classref-method
  1091. :ref:`bool<class_bool>` **has_theme_font_size_override** **(** :ref:`StringName<class_StringName>` name **)** |const|
  1092. Returns ``true`` if there is a local override for a theme font size with the specified ``name`` in this :ref:`Control<class_Control>` node.
  1093. See :ref:`add_theme_font_size_override<class_Window_method_add_theme_font_size_override>`.
  1094. .. rst-class:: classref-item-separator
  1095. ----
  1096. .. _class_Window_method_has_theme_icon:
  1097. .. rst-class:: classref-method
  1098. :ref:`bool<class_bool>` **has_theme_icon** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  1099. Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has an icon item with the specified ``name`` and ``theme_type``.
  1100. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  1101. .. rst-class:: classref-item-separator
  1102. ----
  1103. .. _class_Window_method_has_theme_icon_override:
  1104. .. rst-class:: classref-method
  1105. :ref:`bool<class_bool>` **has_theme_icon_override** **(** :ref:`StringName<class_StringName>` name **)** |const|
  1106. Returns ``true`` if there is a local override for a theme icon with the specified ``name`` in this :ref:`Control<class_Control>` node.
  1107. See :ref:`add_theme_icon_override<class_Window_method_add_theme_icon_override>`.
  1108. .. rst-class:: classref-item-separator
  1109. ----
  1110. .. _class_Window_method_has_theme_stylebox:
  1111. .. rst-class:: classref-method
  1112. :ref:`bool<class_bool>` **has_theme_stylebox** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const|
  1113. Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has a stylebox item with the specified ``name`` and ``theme_type``.
  1114. See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for details.
  1115. .. rst-class:: classref-item-separator
  1116. ----
  1117. .. _class_Window_method_has_theme_stylebox_override:
  1118. .. rst-class:: classref-method
  1119. :ref:`bool<class_bool>` **has_theme_stylebox_override** **(** :ref:`StringName<class_StringName>` name **)** |const|
  1120. Returns ``true`` if there is a local override for a theme :ref:`StyleBox<class_StyleBox>` with the specified ``name`` in this :ref:`Control<class_Control>` node.
  1121. See :ref:`add_theme_stylebox_override<class_Window_method_add_theme_stylebox_override>`.
  1122. .. rst-class:: classref-item-separator
  1123. ----
  1124. .. _class_Window_method_hide:
  1125. .. rst-class:: classref-method
  1126. void **hide** **(** **)**
  1127. 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 :ref:`show<class_Window_method_show>`.
  1128. .. rst-class:: classref-item-separator
  1129. ----
  1130. .. _class_Window_method_is_embedded:
  1131. .. rst-class:: classref-method
  1132. :ref:`bool<class_bool>` **is_embedded** **(** **)** |const|
  1133. Returns ``true`` if the window is currently embedded in another window.
  1134. .. rst-class:: classref-item-separator
  1135. ----
  1136. .. _class_Window_method_is_layout_rtl:
  1137. .. rst-class:: classref-method
  1138. :ref:`bool<class_bool>` **is_layout_rtl** **(** **)** |const|
  1139. Returns ``true`` if layout is right-to-left.
  1140. .. rst-class:: classref-item-separator
  1141. ----
  1142. .. _class_Window_method_is_maximize_allowed:
  1143. .. rst-class:: classref-method
  1144. :ref:`bool<class_bool>` **is_maximize_allowed** **(** **)** |const|
  1145. Returns ``true`` if the window can be maximized (the maximize button is enabled).
  1146. .. rst-class:: classref-item-separator
  1147. ----
  1148. .. _class_Window_method_is_using_font_oversampling:
  1149. .. rst-class:: classref-method
  1150. :ref:`bool<class_bool>` **is_using_font_oversampling** **(** **)** |const|
  1151. Returns ``true`` if font oversampling is enabled. See :ref:`set_use_font_oversampling<class_Window_method_set_use_font_oversampling>`.
  1152. .. rst-class:: classref-item-separator
  1153. ----
  1154. .. _class_Window_method_move_to_center:
  1155. .. rst-class:: classref-method
  1156. void **move_to_center** **(** **)**
  1157. Centers a native window on the current screen and an embedded window on its embedder :ref:`Viewport<class_Viewport>`.
  1158. .. rst-class:: classref-item-separator
  1159. ----
  1160. .. _class_Window_method_move_to_foreground:
  1161. .. rst-class:: classref-method
  1162. void **move_to_foreground** **(** **)**
  1163. Moves the **Window** on top of other windows and focuses it.
  1164. .. rst-class:: classref-item-separator
  1165. ----
  1166. .. _class_Window_method_popup:
  1167. .. rst-class:: classref-method
  1168. void **popup** **(** :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)**
  1169. Shows the **Window** and makes it transient (see :ref:`transient<class_Window_property_transient>`). If ``rect`` is provided, it will be set as the **Window**'s size. Fails if called on the main window.
  1170. .. rst-class:: classref-item-separator
  1171. ----
  1172. .. _class_Window_method_popup_centered:
  1173. .. rst-class:: classref-method
  1174. void **popup_centered** **(** :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)**
  1175. 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 :ref:`Viewport<class_Viewport>` instead.
  1176. \ **Note:** Calling it with the default value of ``minsize`` is equivalent to calling it with :ref:`size<class_Window_property_size>`.
  1177. .. rst-class:: classref-item-separator
  1178. ----
  1179. .. _class_Window_method_popup_centered_clamped:
  1180. .. rst-class:: classref-method
  1181. void **popup_centered_clamped** **(** :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0), :ref:`float<class_float>` fallback_ratio=0.75 **)**
  1182. Popups the **Window** centered inside its parent **Window**. ``fallback_ratio`` determines the maximum size of the **Window**, in relation to its parent.
  1183. \ **Note:** Calling it with the default value of ``minsize`` is equivalent to calling it with :ref:`size<class_Window_property_size>`.
  1184. .. rst-class:: classref-item-separator
  1185. ----
  1186. .. _class_Window_method_popup_centered_ratio:
  1187. .. rst-class:: classref-method
  1188. void **popup_centered_ratio** **(** :ref:`float<class_float>` ratio=0.8 **)**
  1189. If **Window** is embedded, popups the **Window** centered inside its embedder and sets its size as a ``ratio`` of embedder's size.
  1190. If **Window** is a native window, popups the **Window** centered inside the screen of its parent **Window** and sets its size as a ``ratio`` of the screen size.
  1191. .. rst-class:: classref-item-separator
  1192. ----
  1193. .. _class_Window_method_popup_exclusive:
  1194. .. rst-class:: classref-method
  1195. void **popup_exclusive** **(** :ref:`Node<class_Node>` from_node, :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)**
  1196. Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup<class_Window_method_popup>` on it. The dialog must have no current parent, otherwise the method fails.
  1197. See also :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when_invisible>` and :ref:`Node.get_last_exclusive_window<class_Node_method_get_last_exclusive_window>`.
  1198. .. rst-class:: classref-item-separator
  1199. ----
  1200. .. _class_Window_method_popup_exclusive_centered:
  1201. .. rst-class:: classref-method
  1202. void **popup_exclusive_centered** **(** :ref:`Node<class_Node>` from_node, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)**
  1203. Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered<class_Window_method_popup_centered>` on it. The dialog must have no current parent, otherwise the method fails.
  1204. See also :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when_invisible>` and :ref:`Node.get_last_exclusive_window<class_Node_method_get_last_exclusive_window>`.
  1205. .. rst-class:: classref-item-separator
  1206. ----
  1207. .. _class_Window_method_popup_exclusive_centered_clamped:
  1208. .. rst-class:: classref-method
  1209. void **popup_exclusive_centered_clamped** **(** :ref:`Node<class_Node>` from_node, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0), :ref:`float<class_float>` fallback_ratio=0.75 **)**
  1210. Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered_clamped<class_Window_method_popup_centered_clamped>` on it. The dialog must have no current parent, otherwise the method fails.
  1211. See also :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when_invisible>` and :ref:`Node.get_last_exclusive_window<class_Node_method_get_last_exclusive_window>`.
  1212. .. rst-class:: classref-item-separator
  1213. ----
  1214. .. _class_Window_method_popup_exclusive_centered_ratio:
  1215. .. rst-class:: classref-method
  1216. void **popup_exclusive_centered_ratio** **(** :ref:`Node<class_Node>` from_node, :ref:`float<class_float>` ratio=0.8 **)**
  1217. Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered_ratio<class_Window_method_popup_centered_ratio>` on it. The dialog must have no current parent, otherwise the method fails.
  1218. See also :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when_invisible>` and :ref:`Node.get_last_exclusive_window<class_Node_method_get_last_exclusive_window>`.
  1219. .. rst-class:: classref-item-separator
  1220. ----
  1221. .. _class_Window_method_popup_exclusive_on_parent:
  1222. .. rst-class:: classref-method
  1223. void **popup_exclusive_on_parent** **(** :ref:`Node<class_Node>` from_node, :ref:`Rect2i<class_Rect2i>` parent_rect **)**
  1224. Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_on_parent<class_Window_method_popup_on_parent>` on it. The dialog must have no current parent, otherwise the method fails.
  1225. See also :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when_invisible>` and :ref:`Node.get_last_exclusive_window<class_Node_method_get_last_exclusive_window>`.
  1226. .. rst-class:: classref-item-separator
  1227. ----
  1228. .. _class_Window_method_popup_on_parent:
  1229. .. rst-class:: classref-method
  1230. void **popup_on_parent** **(** :ref:`Rect2i<class_Rect2i>` parent_rect **)**
  1231. Popups the **Window** with a position shifted by parent **Window**'s position. If the **Window** is embedded, has the same effect as :ref:`popup<class_Window_method_popup>`.
  1232. .. rst-class:: classref-item-separator
  1233. ----
  1234. .. _class_Window_method_remove_theme_color_override:
  1235. .. rst-class:: classref-method
  1236. void **remove_theme_color_override** **(** :ref:`StringName<class_StringName>` name **)**
  1237. Removes a local override for a theme :ref:`Color<class_Color>` with the specified ``name`` previously added by :ref:`add_theme_color_override<class_Window_method_add_theme_color_override>` or via the Inspector dock.
  1238. .. rst-class:: classref-item-separator
  1239. ----
  1240. .. _class_Window_method_remove_theme_constant_override:
  1241. .. rst-class:: classref-method
  1242. void **remove_theme_constant_override** **(** :ref:`StringName<class_StringName>` name **)**
  1243. Removes a local override for a theme constant with the specified ``name`` previously added by :ref:`add_theme_constant_override<class_Window_method_add_theme_constant_override>` or via the Inspector dock.
  1244. .. rst-class:: classref-item-separator
  1245. ----
  1246. .. _class_Window_method_remove_theme_font_override:
  1247. .. rst-class:: classref-method
  1248. void **remove_theme_font_override** **(** :ref:`StringName<class_StringName>` name **)**
  1249. Removes a local override for a theme :ref:`Font<class_Font>` with the specified ``name`` previously added by :ref:`add_theme_font_override<class_Window_method_add_theme_font_override>` or via the Inspector dock.
  1250. .. rst-class:: classref-item-separator
  1251. ----
  1252. .. _class_Window_method_remove_theme_font_size_override:
  1253. .. rst-class:: classref-method
  1254. void **remove_theme_font_size_override** **(** :ref:`StringName<class_StringName>` name **)**
  1255. Removes a local override for a theme font size with the specified ``name`` previously added by :ref:`add_theme_font_size_override<class_Window_method_add_theme_font_size_override>` or via the Inspector dock.
  1256. .. rst-class:: classref-item-separator
  1257. ----
  1258. .. _class_Window_method_remove_theme_icon_override:
  1259. .. rst-class:: classref-method
  1260. void **remove_theme_icon_override** **(** :ref:`StringName<class_StringName>` name **)**
  1261. Removes a local override for a theme icon with the specified ``name`` previously added by :ref:`add_theme_icon_override<class_Window_method_add_theme_icon_override>` or via the Inspector dock.
  1262. .. rst-class:: classref-item-separator
  1263. ----
  1264. .. _class_Window_method_remove_theme_stylebox_override:
  1265. .. rst-class:: classref-method
  1266. void **remove_theme_stylebox_override** **(** :ref:`StringName<class_StringName>` name **)**
  1267. Removes a local override for a theme :ref:`StyleBox<class_StyleBox>` with the specified ``name`` previously added by :ref:`add_theme_stylebox_override<class_Window_method_add_theme_stylebox_override>` or via the Inspector dock.
  1268. .. rst-class:: classref-item-separator
  1269. ----
  1270. .. _class_Window_method_request_attention:
  1271. .. rst-class:: classref-method
  1272. void **request_attention** **(** **)**
  1273. 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.
  1274. .. rst-class:: classref-item-separator
  1275. ----
  1276. .. _class_Window_method_reset_size:
  1277. .. rst-class:: classref-method
  1278. void **reset_size** **(** **)**
  1279. 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).
  1280. .. rst-class:: classref-item-separator
  1281. ----
  1282. .. _class_Window_method_set_flag:
  1283. .. rst-class:: classref-method
  1284. void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)**
  1285. Sets a specified window flag.
  1286. .. rst-class:: classref-item-separator
  1287. ----
  1288. .. _class_Window_method_set_ime_active:
  1289. .. rst-class:: classref-method
  1290. void **set_ime_active** **(** :ref:`bool<class_bool>` active **)**
  1291. If ``active`` is ``true``, enables system's native IME (Input Method Editor).
  1292. .. rst-class:: classref-item-separator
  1293. ----
  1294. .. _class_Window_method_set_ime_position:
  1295. .. rst-class:: classref-method
  1296. void **set_ime_position** **(** :ref:`Vector2i<class_Vector2i>` position **)**
  1297. Moves IME to the given position.
  1298. .. rst-class:: classref-item-separator
  1299. ----
  1300. .. _class_Window_method_set_layout_direction:
  1301. .. rst-class:: classref-method
  1302. void **set_layout_direction** **(** :ref:`LayoutDirection<enum_Window_LayoutDirection>` direction **)**
  1303. Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
  1304. .. rst-class:: classref-item-separator
  1305. ----
  1306. .. _class_Window_method_set_unparent_when_invisible:
  1307. .. rst-class:: classref-method
  1308. void **set_unparent_when_invisible** **(** :ref:`bool<class_bool>` unparent **)**
  1309. If ``unparent`` is ``true``, the window is automatically unparented when going invisible.
  1310. \ **Note:** Make sure to keep a reference to the node, otherwise it will be orphaned. You also need to manually call :ref:`Node.queue_free<class_Node_method_queue_free>` to free the window if it's not parented.
  1311. .. rst-class:: classref-item-separator
  1312. ----
  1313. .. _class_Window_method_set_use_font_oversampling:
  1314. .. rst-class:: classref-method
  1315. void **set_use_font_oversampling** **(** :ref:`bool<class_bool>` enable **)**
  1316. Enables font oversampling. This makes fonts look better when they are scaled up.
  1317. .. rst-class:: classref-item-separator
  1318. ----
  1319. .. _class_Window_method_show:
  1320. .. rst-class:: classref-method
  1321. void **show** **(** **)**
  1322. Makes the **Window** appear. This enables interactions with the **Window** and doesn't change any of its property other than visibility (unlike e.g. :ref:`popup<class_Window_method_popup>`).
  1323. .. rst-class:: classref-section-separator
  1324. ----
  1325. .. rst-class:: classref-descriptions-group
  1326. Theme Property Descriptions
  1327. ---------------------------
  1328. .. _class_Window_theme_color_title_color:
  1329. .. rst-class:: classref-themeproperty
  1330. :ref:`Color<class_Color>` **title_color** = ``Color(0.875, 0.875, 0.875, 1)``
  1331. The color of the title's text.
  1332. .. rst-class:: classref-item-separator
  1333. ----
  1334. .. _class_Window_theme_color_title_outline_modulate:
  1335. .. rst-class:: classref-themeproperty
  1336. :ref:`Color<class_Color>` **title_outline_modulate** = ``Color(1, 1, 1, 1)``
  1337. The color of the title's text outline.
  1338. .. rst-class:: classref-item-separator
  1339. ----
  1340. .. _class_Window_theme_constant_close_h_offset:
  1341. .. rst-class:: classref-themeproperty
  1342. :ref:`int<class_int>` **close_h_offset** = ``18``
  1343. Horizontal position offset of the close button.
  1344. .. rst-class:: classref-item-separator
  1345. ----
  1346. .. _class_Window_theme_constant_close_v_offset:
  1347. .. rst-class:: classref-themeproperty
  1348. :ref:`int<class_int>` **close_v_offset** = ``24``
  1349. Vertical position offset of the close button.
  1350. .. rst-class:: classref-item-separator
  1351. ----
  1352. .. _class_Window_theme_constant_resize_margin:
  1353. .. rst-class:: classref-themeproperty
  1354. :ref:`int<class_int>` **resize_margin** = ``4``
  1355. Defines the outside margin at which the window border can be grabbed with mouse and resized.
  1356. .. rst-class:: classref-item-separator
  1357. ----
  1358. .. _class_Window_theme_constant_title_height:
  1359. .. rst-class:: classref-themeproperty
  1360. :ref:`int<class_int>` **title_height** = ``36``
  1361. Height of the title bar.
  1362. .. rst-class:: classref-item-separator
  1363. ----
  1364. .. _class_Window_theme_constant_title_outline_size:
  1365. .. rst-class:: classref-themeproperty
  1366. :ref:`int<class_int>` **title_outline_size** = ``0``
  1367. The size of the title outline.
  1368. .. rst-class:: classref-item-separator
  1369. ----
  1370. .. _class_Window_theme_font_title_font:
  1371. .. rst-class:: classref-themeproperty
  1372. :ref:`Font<class_Font>` **title_font**
  1373. The font used to draw the title.
  1374. .. rst-class:: classref-item-separator
  1375. ----
  1376. .. _class_Window_theme_font_size_title_font_size:
  1377. .. rst-class:: classref-themeproperty
  1378. :ref:`int<class_int>` **title_font_size**
  1379. The size of the title font.
  1380. .. rst-class:: classref-item-separator
  1381. ----
  1382. .. _class_Window_theme_icon_close:
  1383. .. rst-class:: classref-themeproperty
  1384. :ref:`Texture2D<class_Texture2D>` **close**
  1385. The icon for the close button.
  1386. .. rst-class:: classref-item-separator
  1387. ----
  1388. .. _class_Window_theme_icon_close_pressed:
  1389. .. rst-class:: classref-themeproperty
  1390. :ref:`Texture2D<class_Texture2D>` **close_pressed**
  1391. The icon for the close button when it's being pressed.
  1392. .. rst-class:: classref-item-separator
  1393. ----
  1394. .. _class_Window_theme_style_embedded_border:
  1395. .. rst-class:: classref-themeproperty
  1396. :ref:`StyleBox<class_StyleBox>` **embedded_border**
  1397. 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 ``expand_margin_*`` properties of :ref:`StyleBoxFlat<class_StyleBoxFlat>`.
  1398. \ **Note:** The content background will not be visible unless :ref:`transparent<class_Window_property_transparent>` is enabled.
  1399. .. rst-class:: classref-item-separator
  1400. ----
  1401. .. _class_Window_theme_style_embedded_unfocused_border:
  1402. .. rst-class:: classref-themeproperty
  1403. :ref:`StyleBox<class_StyleBox>` **embedded_unfocused_border**
  1404. The background style used when the **Window** is embedded and unfocused.
  1405. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1406. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1407. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1408. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1409. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1410. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1411. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`