class_window.rst 131 KB

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