class_window.rst 160 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941
  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:`String<class_String>` | :ref:`accessibility_description<class_Window_property_accessibility_description>` | ``""`` |
  24. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  25. | :ref:`String<class_String>` | :ref:`accessibility_name<class_Window_property_accessibility_name>` | ``""`` |
  26. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`always_on_top<class_Window_property_always_on_top>` | ``false`` |
  28. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`auto_translate<class_Window_property_auto_translate>` | |
  30. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`borderless<class_Window_property_borderless>` | ``false`` |
  32. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  33. | :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` | :ref:`content_scale_aspect<class_Window_property_content_scale_aspect>` | ``0`` |
  34. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  35. | :ref:`float<class_float>` | :ref:`content_scale_factor<class_Window_property_content_scale_factor>` | ``1.0`` |
  36. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  37. | :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` | :ref:`content_scale_mode<class_Window_property_content_scale_mode>` | ``0`` |
  38. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  39. | :ref:`Vector2i<class_Vector2i>` | :ref:`content_scale_size<class_Window_property_content_scale_size>` | ``Vector2i(0, 0)`` |
  40. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  41. | :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` | :ref:`content_scale_stretch<class_Window_property_content_scale_stretch>` | ``0`` |
  42. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  43. | :ref:`int<class_int>` | :ref:`current_screen<class_Window_property_current_screen>` | |
  44. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  45. | :ref:`bool<class_bool>` | :ref:`exclude_from_capture<class_Window_property_exclude_from_capture>` | ``false`` |
  46. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  47. | :ref:`bool<class_bool>` | :ref:`exclusive<class_Window_property_exclusive>` | ``false`` |
  48. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  49. | :ref:`bool<class_bool>` | :ref:`extend_to_title<class_Window_property_extend_to_title>` | ``false`` |
  50. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  51. | :ref:`bool<class_bool>` | :ref:`force_native<class_Window_property_force_native>` | ``false`` |
  52. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  53. | :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` | :ref:`initial_position<class_Window_property_initial_position>` | ``0`` |
  54. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  55. | :ref:`bool<class_bool>` | :ref:`keep_title_visible<class_Window_property_keep_title_visible>` | ``false`` |
  56. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  57. | :ref:`Vector2i<class_Vector2i>` | :ref:`max_size<class_Window_property_max_size>` | ``Vector2i(0, 0)`` |
  58. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  59. | :ref:`bool<class_bool>` | :ref:`maximize_disabled<class_Window_property_maximize_disabled>` | ``false`` |
  60. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  61. | :ref:`Vector2i<class_Vector2i>` | :ref:`min_size<class_Window_property_min_size>` | ``Vector2i(0, 0)`` |
  62. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  63. | :ref:`bool<class_bool>` | :ref:`minimize_disabled<class_Window_property_minimize_disabled>` | ``false`` |
  64. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  65. | :ref:`Mode<enum_Window_Mode>` | :ref:`mode<class_Window_property_mode>` | ``0`` |
  66. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  67. | :ref:`bool<class_bool>` | :ref:`mouse_passthrough<class_Window_property_mouse_passthrough>` | ``false`` |
  68. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  69. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`mouse_passthrough_polygon<class_Window_property_mouse_passthrough_polygon>` | ``PackedVector2Array()`` |
  70. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  71. | :ref:`Rect2i<class_Rect2i>` | :ref:`nonclient_area<class_Window_property_nonclient_area>` | ``Rect2i(0, 0, 0, 0)`` |
  72. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  73. | :ref:`bool<class_bool>` | :ref:`popup_window<class_Window_property_popup_window>` | ``false`` |
  74. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  75. | :ref:`bool<class_bool>` | :ref:`popup_wm_hint<class_Window_property_popup_wm_hint>` | ``false`` |
  76. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  77. | :ref:`Vector2i<class_Vector2i>` | :ref:`position<class_Window_property_position>` | ``Vector2i(0, 0)`` |
  78. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  79. | :ref:`bool<class_bool>` | :ref:`sharp_corners<class_Window_property_sharp_corners>` | ``false`` |
  80. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  81. | :ref:`Vector2i<class_Vector2i>` | :ref:`size<class_Window_property_size>` | ``Vector2i(100, 100)`` |
  82. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  83. | :ref:`Theme<class_Theme>` | :ref:`theme<class_Window_property_theme>` | |
  84. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  85. | :ref:`StringName<class_StringName>` | :ref:`theme_type_variation<class_Window_property_theme_type_variation>` | ``&""`` |
  86. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  87. | :ref:`String<class_String>` | :ref:`title<class_Window_property_title>` | ``""`` |
  88. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  89. | :ref:`bool<class_bool>` | :ref:`transient<class_Window_property_transient>` | ``false`` |
  90. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  91. | :ref:`bool<class_bool>` | :ref:`transient_to_focused<class_Window_property_transient_to_focused>` | ``false`` |
  92. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  93. | :ref:`bool<class_bool>` | :ref:`transparent<class_Window_property_transparent>` | ``false`` |
  94. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  95. | :ref:`bool<class_bool>` | :ref:`unfocusable<class_Window_property_unfocusable>` | ``false`` |
  96. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  97. | :ref:`bool<class_bool>` | :ref:`unresizable<class_Window_property_unresizable>` | ``false`` |
  98. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  99. | :ref:`bool<class_bool>` | :ref:`visible<class_Window_property_visible>` | ``true`` |
  100. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  101. | :ref:`bool<class_bool>` | :ref:`wrap_controls<class_Window_property_wrap_controls>` | ``false`` |
  102. +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+
  103. .. rst-class:: classref-reftable-group
  104. Methods
  105. -------
  106. .. table::
  107. :widths: auto
  108. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | :ref:`Vector2<class_Vector2>` | :ref:`_get_contents_minimum_size<class_Window_private_method__get_contents_minimum_size>`\ (\ ) |virtual| |const| |
  110. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | |void| | :ref:`add_theme_color_override<class_Window_method_add_theme_color_override>`\ (\ name\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) |
  112. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | |void| | :ref:`add_theme_constant_override<class_Window_method_add_theme_constant_override>`\ (\ name\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) |
  114. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | |void| | :ref:`add_theme_font_override<class_Window_method_add_theme_font_override>`\ (\ name\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) |
  116. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | |void| | :ref:`add_theme_font_size_override<class_Window_method_add_theme_font_size_override>`\ (\ name\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) |
  118. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | |void| | :ref:`add_theme_icon_override<class_Window_method_add_theme_icon_override>`\ (\ name\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) |
  120. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | |void| | :ref:`add_theme_stylebox_override<class_Window_method_add_theme_stylebox_override>`\ (\ name\: :ref:`StringName<class_StringName>`, stylebox\: :ref:`StyleBox<class_StyleBox>`\ ) |
  122. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | |void| | :ref:`begin_bulk_theme_override<class_Window_method_begin_bulk_theme_override>`\ (\ ) |
  124. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | :ref:`bool<class_bool>` | :ref:`can_draw<class_Window_method_can_draw>`\ (\ ) |const| |
  126. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | |void| | :ref:`child_controls_changed<class_Window_method_child_controls_changed>`\ (\ ) |
  128. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | |void| | :ref:`end_bulk_theme_override<class_Window_method_end_bulk_theme_override>`\ (\ ) |
  130. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | :ref:`Vector2<class_Vector2>` | :ref:`get_contents_minimum_size<class_Window_method_get_contents_minimum_size>`\ (\ ) |const| |
  132. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | :ref:`bool<class_bool>` | :ref:`get_flag<class_Window_method_get_flag>`\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| |
  134. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | :ref:`Window<class_Window>` | :ref:`get_focused_window<class_Window_method_get_focused_window>`\ (\ ) |static| |
  136. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | :ref:`LayoutDirection<enum_Window_LayoutDirection>` | :ref:`get_layout_direction<class_Window_method_get_layout_direction>`\ (\ ) |const| |
  138. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | :ref:`Vector2i<class_Vector2i>` | :ref:`get_position_with_decorations<class_Window_method_get_position_with_decorations>`\ (\ ) |const| |
  140. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | :ref:`Vector2i<class_Vector2i>` | :ref:`get_size_with_decorations<class_Window_method_get_size_with_decorations>`\ (\ ) |const| |
  142. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | :ref:`Color<class_Color>` | :ref:`get_theme_color<class_Window_method_get_theme_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  144. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | :ref:`int<class_int>` | :ref:`get_theme_constant<class_Window_method_get_theme_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  146. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | :ref:`float<class_float>` | :ref:`get_theme_default_base_scale<class_Window_method_get_theme_default_base_scale>`\ (\ ) |const| |
  148. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | :ref:`Font<class_Font>` | :ref:`get_theme_default_font<class_Window_method_get_theme_default_font>`\ (\ ) |const| |
  150. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | :ref:`int<class_int>` | :ref:`get_theme_default_font_size<class_Window_method_get_theme_default_font_size>`\ (\ ) |const| |
  152. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | :ref:`Font<class_Font>` | :ref:`get_theme_font<class_Window_method_get_theme_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  154. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | :ref:`int<class_int>` | :ref:`get_theme_font_size<class_Window_method_get_theme_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  156. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_theme_icon<class_Window_method_get_theme_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  158. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | :ref:`StyleBox<class_StyleBox>` | :ref:`get_theme_stylebox<class_Window_method_get_theme_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  160. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | :ref:`int<class_int>` | :ref:`get_window_id<class_Window_method_get_window_id>`\ (\ ) |const| |
  162. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | |void| | :ref:`grab_focus<class_Window_method_grab_focus>`\ (\ ) |
  164. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | :ref:`bool<class_bool>` | :ref:`has_focus<class_Window_method_has_focus>`\ (\ ) |const| |
  166. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | :ref:`bool<class_bool>` | :ref:`has_theme_color<class_Window_method_has_theme_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  168. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | :ref:`bool<class_bool>` | :ref:`has_theme_color_override<class_Window_method_has_theme_color_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  170. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. | :ref:`bool<class_bool>` | :ref:`has_theme_constant<class_Window_method_has_theme_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  172. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  173. | :ref:`bool<class_bool>` | :ref:`has_theme_constant_override<class_Window_method_has_theme_constant_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  174. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  175. | :ref:`bool<class_bool>` | :ref:`has_theme_font<class_Window_method_has_theme_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  176. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  177. | :ref:`bool<class_bool>` | :ref:`has_theme_font_override<class_Window_method_has_theme_font_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  178. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  179. | :ref:`bool<class_bool>` | :ref:`has_theme_font_size<class_Window_method_has_theme_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  180. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  181. | :ref:`bool<class_bool>` | :ref:`has_theme_font_size_override<class_Window_method_has_theme_font_size_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  182. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  183. | :ref:`bool<class_bool>` | :ref:`has_theme_icon<class_Window_method_has_theme_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  184. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  185. | :ref:`bool<class_bool>` | :ref:`has_theme_icon_override<class_Window_method_has_theme_icon_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  186. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  187. | :ref:`bool<class_bool>` | :ref:`has_theme_stylebox<class_Window_method_has_theme_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| |
  188. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  189. | :ref:`bool<class_bool>` | :ref:`has_theme_stylebox_override<class_Window_method_has_theme_stylebox_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  190. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  191. | |void| | :ref:`hide<class_Window_method_hide>`\ (\ ) |
  192. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  193. | :ref:`bool<class_bool>` | :ref:`is_embedded<class_Window_method_is_embedded>`\ (\ ) |const| |
  194. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  195. | :ref:`bool<class_bool>` | :ref:`is_layout_rtl<class_Window_method_is_layout_rtl>`\ (\ ) |const| |
  196. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  197. | :ref:`bool<class_bool>` | :ref:`is_maximize_allowed<class_Window_method_is_maximize_allowed>`\ (\ ) |const| |
  198. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  199. | :ref:`bool<class_bool>` | :ref:`is_using_font_oversampling<class_Window_method_is_using_font_oversampling>`\ (\ ) |const| |
  200. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  201. | |void| | :ref:`move_to_center<class_Window_method_move_to_center>`\ (\ ) |
  202. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  203. | |void| | :ref:`move_to_foreground<class_Window_method_move_to_foreground>`\ (\ ) |
  204. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  205. | |void| | :ref:`popup<class_Window_method_popup>`\ (\ rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) |
  206. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  207. | |void| | :ref:`popup_centered<class_Window_method_popup_centered>`\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) |
  208. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  209. | |void| | :ref:`popup_centered_clamped<class_Window_method_popup_centered_clamped>`\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) |
  210. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  211. | |void| | :ref:`popup_centered_ratio<class_Window_method_popup_centered_ratio>`\ (\ ratio\: :ref:`float<class_float>` = 0.8\ ) |
  212. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  213. | |void| | :ref:`popup_exclusive<class_Window_method_popup_exclusive>`\ (\ from_node\: :ref:`Node<class_Node>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) |
  214. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  215. | |void| | :ref:`popup_exclusive_centered<class_Window_method_popup_exclusive_centered>`\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) |
  216. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  217. | |void| | :ref:`popup_exclusive_centered_clamped<class_Window_method_popup_exclusive_centered_clamped>`\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) |
  218. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  219. | |void| | :ref:`popup_exclusive_centered_ratio<class_Window_method_popup_exclusive_centered_ratio>`\ (\ from_node\: :ref:`Node<class_Node>`, ratio\: :ref:`float<class_float>` = 0.8\ ) |
  220. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  221. | |void| | :ref:`popup_exclusive_on_parent<class_Window_method_popup_exclusive_on_parent>`\ (\ from_node\: :ref:`Node<class_Node>`, parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) |
  222. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  223. | |void| | :ref:`popup_on_parent<class_Window_method_popup_on_parent>`\ (\ parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) |
  224. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  225. | |void| | :ref:`remove_theme_color_override<class_Window_method_remove_theme_color_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
  226. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  227. | |void| | :ref:`remove_theme_constant_override<class_Window_method_remove_theme_constant_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
  228. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  229. | |void| | :ref:`remove_theme_font_override<class_Window_method_remove_theme_font_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
  230. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  231. | |void| | :ref:`remove_theme_font_size_override<class_Window_method_remove_theme_font_size_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
  232. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  233. | |void| | :ref:`remove_theme_icon_override<class_Window_method_remove_theme_icon_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
  234. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  235. | |void| | :ref:`remove_theme_stylebox_override<class_Window_method_remove_theme_stylebox_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
  236. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  237. | |void| | :ref:`request_attention<class_Window_method_request_attention>`\ (\ ) |
  238. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  239. | |void| | :ref:`reset_size<class_Window_method_reset_size>`\ (\ ) |
  240. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  241. | |void| | :ref:`set_flag<class_Window_method_set_flag>`\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) |
  242. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  243. | |void| | :ref:`set_ime_active<class_Window_method_set_ime_active>`\ (\ active\: :ref:`bool<class_bool>`\ ) |
  244. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  245. | |void| | :ref:`set_ime_position<class_Window_method_set_ime_position>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |
  246. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  247. | |void| | :ref:`set_layout_direction<class_Window_method_set_layout_direction>`\ (\ direction\: :ref:`LayoutDirection<enum_Window_LayoutDirection>`\ ) |
  248. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  249. | |void| | :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when_invisible>`\ (\ unparent\: :ref:`bool<class_bool>`\ ) |
  250. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  251. | |void| | :ref:`set_use_font_oversampling<class_Window_method_set_use_font_oversampling>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  252. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  253. | |void| | :ref:`show<class_Window_method_show>`\ (\ ) |
  254. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  255. | |void| | :ref:`start_drag<class_Window_method_start_drag>`\ (\ ) |
  256. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  257. | |void| | :ref:`start_resize<class_Window_method_start_resize>`\ (\ edge\: :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>`\ ) |
  258. +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  259. .. rst-class:: classref-reftable-group
  260. Theme Properties
  261. ----------------
  262. .. table::
  263. :widths: auto
  264. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  265. | :ref:`Color<class_Color>` | :ref:`title_color<class_Window_theme_color_title_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  266. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  267. | :ref:`Color<class_Color>` | :ref:`title_outline_modulate<class_Window_theme_color_title_outline_modulate>` | ``Color(0, 0, 0, 1)`` |
  268. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  269. | :ref:`int<class_int>` | :ref:`close_h_offset<class_Window_theme_constant_close_h_offset>` | ``18`` |
  270. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  271. | :ref:`int<class_int>` | :ref:`close_v_offset<class_Window_theme_constant_close_v_offset>` | ``24`` |
  272. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  273. | :ref:`int<class_int>` | :ref:`resize_margin<class_Window_theme_constant_resize_margin>` | ``4`` |
  274. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  275. | :ref:`int<class_int>` | :ref:`title_height<class_Window_theme_constant_title_height>` | ``36`` |
  276. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  277. | :ref:`int<class_int>` | :ref:`title_outline_size<class_Window_theme_constant_title_outline_size>` | ``0`` |
  278. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  279. | :ref:`Font<class_Font>` | :ref:`title_font<class_Window_theme_font_title_font>` | |
  280. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  281. | :ref:`int<class_int>` | :ref:`title_font_size<class_Window_theme_font_size_title_font_size>` | |
  282. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  283. | :ref:`Texture2D<class_Texture2D>` | :ref:`close<class_Window_theme_icon_close>` | |
  284. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  285. | :ref:`Texture2D<class_Texture2D>` | :ref:`close_pressed<class_Window_theme_icon_close_pressed>` | |
  286. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  287. | :ref:`StyleBox<class_StyleBox>` | :ref:`embedded_border<class_Window_theme_style_embedded_border>` | |
  288. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  289. | :ref:`StyleBox<class_StyleBox>` | :ref:`embedded_unfocused_border<class_Window_theme_style_embedded_unfocused_border>` | |
  290. +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+
  291. .. rst-class:: classref-section-separator
  292. ----
  293. .. rst-class:: classref-descriptions-group
  294. Signals
  295. -------
  296. .. _class_Window_signal_about_to_popup:
  297. .. rst-class:: classref-signal
  298. **about_to_popup**\ (\ ) :ref:`🔗<class_Window_signal_about_to_popup>`
  299. Emitted right after :ref:`popup()<class_Window_method_popup>` call, before the **Window** appears or does anything.
  300. .. rst-class:: classref-item-separator
  301. ----
  302. .. _class_Window_signal_close_requested:
  303. .. rst-class:: classref-signal
  304. **close_requested**\ (\ ) :ref:`🔗<class_Window_signal_close_requested>`
  305. 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.
  306. This signal can be used to handle window closing, e.g. by connecting it to :ref:`hide()<class_Window_method_hide>`.
  307. .. rst-class:: classref-item-separator
  308. ----
  309. .. _class_Window_signal_dpi_changed:
  310. .. rst-class:: classref-signal
  311. **dpi_changed**\ (\ ) :ref:`🔗<class_Window_signal_dpi_changed>`
  312. 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).
  313. \ **Note:** Only implemented on macOS and Linux (Wayland).
  314. .. rst-class:: classref-item-separator
  315. ----
  316. .. _class_Window_signal_files_dropped:
  317. .. rst-class:: classref-signal
  318. **files_dropped**\ (\ files\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_Window_signal_files_dropped>`
  319. Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths.
  320. ::
  321. func _ready():
  322. get_window().files_dropped.connect(on_files_dropped)
  323. func on_files_dropped(files):
  324. print(files)
  325. \ **Note:** This signal 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.
  326. .. rst-class:: classref-item-separator
  327. ----
  328. .. _class_Window_signal_focus_entered:
  329. .. rst-class:: classref-signal
  330. **focus_entered**\ (\ ) :ref:`🔗<class_Window_signal_focus_entered>`
  331. Emitted when the **Window** gains focus.
  332. .. rst-class:: classref-item-separator
  333. ----
  334. .. _class_Window_signal_focus_exited:
  335. .. rst-class:: classref-signal
  336. **focus_exited**\ (\ ) :ref:`🔗<class_Window_signal_focus_exited>`
  337. Emitted when the **Window** loses its focus.
  338. .. rst-class:: classref-item-separator
  339. ----
  340. .. _class_Window_signal_go_back_requested:
  341. .. rst-class:: classref-signal
  342. **go_back_requested**\ (\ ) :ref:`🔗<class_Window_signal_go_back_requested>`
  343. 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>`.
  344. .. rst-class:: classref-item-separator
  345. ----
  346. .. _class_Window_signal_mouse_entered:
  347. .. rst-class:: classref-signal
  348. **mouse_entered**\ (\ ) :ref:`🔗<class_Window_signal_mouse_entered>`
  349. 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.
  350. .. rst-class:: classref-item-separator
  351. ----
  352. .. _class_Window_signal_mouse_exited:
  353. .. rst-class:: classref-signal
  354. **mouse_exited**\ (\ ) :ref:`🔗<class_Window_signal_mouse_exited>`
  355. 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.
  356. .. rst-class:: classref-item-separator
  357. ----
  358. .. _class_Window_signal_nonclient_window_input:
  359. .. rst-class:: classref-signal
  360. **nonclient_window_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) :ref:`🔗<class_Window_signal_nonclient_window_input>`
  361. Emitted when the mouse event is received by the custom decoration area defined by :ref:`nonclient_area<class_Window_property_nonclient_area>`, and normal input to the window is blocked (such as when it has an exclusive child opened). ``event``'s position is in the embedder's coordinate system.
  362. .. rst-class:: classref-item-separator
  363. ----
  364. .. _class_Window_signal_theme_changed:
  365. .. rst-class:: classref-signal
  366. **theme_changed**\ (\ ) :ref:`🔗<class_Window_signal_theme_changed>`
  367. Emitted when the :ref:`NOTIFICATION_THEME_CHANGED<class_Window_constant_NOTIFICATION_THEME_CHANGED>` notification is sent.
  368. .. rst-class:: classref-item-separator
  369. ----
  370. .. _class_Window_signal_title_changed:
  371. .. rst-class:: classref-signal
  372. **title_changed**\ (\ ) :ref:`🔗<class_Window_signal_title_changed>`
  373. Emitted when window title bar text is changed.
  374. .. rst-class:: classref-item-separator
  375. ----
  376. .. _class_Window_signal_titlebar_changed:
  377. .. rst-class:: classref-signal
  378. **titlebar_changed**\ (\ ) :ref:`🔗<class_Window_signal_titlebar_changed>`
  379. Emitted when window title bar decorations are changed, e.g. macOS window enter/exit full screen mode, or extend-to-title flag is changed.
  380. .. rst-class:: classref-item-separator
  381. ----
  382. .. _class_Window_signal_visibility_changed:
  383. .. rst-class:: classref-signal
  384. **visibility_changed**\ (\ ) :ref:`🔗<class_Window_signal_visibility_changed>`
  385. Emitted when **Window** is made visible or disappears.
  386. .. rst-class:: classref-item-separator
  387. ----
  388. .. _class_Window_signal_window_input:
  389. .. rst-class:: classref-signal
  390. **window_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) :ref:`🔗<class_Window_signal_window_input>`
  391. 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.
  392. .. rst-class:: classref-section-separator
  393. ----
  394. .. rst-class:: classref-descriptions-group
  395. Enumerations
  396. ------------
  397. .. _enum_Window_Mode:
  398. .. rst-class:: classref-enumeration
  399. enum **Mode**: :ref:`🔗<enum_Window_Mode>`
  400. .. _class_Window_constant_MODE_WINDOWED:
  401. .. rst-class:: classref-enumeration-constant
  402. :ref:`Mode<enum_Window_Mode>` **MODE_WINDOWED** = ``0``
  403. Windowed mode, i.e. **Window** doesn't occupy the whole screen (unless set to the size of the screen).
  404. .. _class_Window_constant_MODE_MINIMIZED:
  405. .. rst-class:: classref-enumeration-constant
  406. :ref:`Mode<enum_Window_Mode>` **MODE_MINIMIZED** = ``1``
  407. 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.
  408. .. _class_Window_constant_MODE_MAXIMIZED:
  409. .. rst-class:: classref-enumeration-constant
  410. :ref:`Mode<enum_Window_Mode>` **MODE_MAXIMIZED** = ``2``
  411. 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.
  412. .. _class_Window_constant_MODE_FULLSCREEN:
  413. .. rst-class:: classref-enumeration-constant
  414. :ref:`Mode<enum_Window_Mode>` **MODE_FULLSCREEN** = ``3``
  415. Full screen mode with full multi-window support.
  416. Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed.
  417. \ **On Android:** This enables immersive mode.
  418. \ **On macOS:** A new desktop is used to display the running project.
  419. \ **Note:** 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.
  420. .. _class_Window_constant_MODE_EXCLUSIVE_FULLSCREEN:
  421. .. rst-class:: classref-enumeration-constant
  422. :ref:`Mode<enum_Window_Mode>` **MODE_EXCLUSIVE_FULLSCREEN** = ``4``
  423. A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition).
  424. Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed.
  425. \ **Note:** This mode might not work with screen recording software.
  426. \ **On Android:** This enables immersive mode.
  427. \ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment.
  428. \ **On macOS:** A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen.
  429. \ **On Linux (X11):** Exclusive full screen mode bypasses compositor.
  430. \ **On Linux (Wayland):** Equivalent to :ref:`MODE_FULLSCREEN<class_Window_constant_MODE_FULLSCREEN>`.
  431. \ **Note:** 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.
  432. .. rst-class:: classref-item-separator
  433. ----
  434. .. _enum_Window_Flags:
  435. .. rst-class:: classref-enumeration
  436. enum **Flags**: :ref:`🔗<enum_Window_Flags>`
  437. .. _class_Window_constant_FLAG_RESIZE_DISABLED:
  438. .. rst-class:: classref-enumeration-constant
  439. :ref:`Flags<enum_Window_Flags>` **FLAG_RESIZE_DISABLED** = ``0``
  440. 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>`.
  441. .. _class_Window_constant_FLAG_BORDERLESS:
  442. .. rst-class:: classref-enumeration-constant
  443. :ref:`Flags<enum_Window_Flags>` **FLAG_BORDERLESS** = ``1``
  444. 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>`.
  445. .. _class_Window_constant_FLAG_ALWAYS_ON_TOP:
  446. .. rst-class:: classref-enumeration-constant
  447. :ref:`Flags<enum_Window_Flags>` **FLAG_ALWAYS_ON_TOP** = ``2``
  448. 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>`.
  449. .. _class_Window_constant_FLAG_TRANSPARENT:
  450. .. rst-class:: classref-enumeration-constant
  451. :ref:`Flags<enum_Window_Flags>` **FLAG_TRANSPARENT** = ``3``
  452. The window background can be transparent. Set with :ref:`transparent<class_Window_property_transparent>`.
  453. \ **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``.
  454. .. _class_Window_constant_FLAG_NO_FOCUS:
  455. .. rst-class:: classref-enumeration-constant
  456. :ref:`Flags<enum_Window_Flags>` **FLAG_NO_FOCUS** = ``4``
  457. The window can't be focused. No-focus window will ignore all input, except mouse clicks. Set with :ref:`unfocusable<class_Window_property_unfocusable>`.
  458. .. _class_Window_constant_FLAG_POPUP:
  459. .. rst-class:: classref-enumeration-constant
  460. :ref:`Flags<enum_Window_Flags>` **FLAG_POPUP** = ``5``
  461. 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>`).
  462. \ **Note:** This flag has no effect in embedded windows (unless said window is a :ref:`Popup<class_Popup>`).
  463. .. _class_Window_constant_FLAG_EXTEND_TO_TITLE:
  464. .. rst-class:: classref-enumeration-constant
  465. :ref:`Flags<enum_Window_Flags>` **FLAG_EXTEND_TO_TITLE** = ``6``
  466. 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>`.
  467. \ **Note:** This flag is implemented only on macOS.
  468. \ **Note:** This flag has no effect in embedded windows.
  469. .. _class_Window_constant_FLAG_MOUSE_PASSTHROUGH:
  470. .. rst-class:: classref-enumeration-constant
  471. :ref:`Flags<enum_Window_Flags>` **FLAG_MOUSE_PASSTHROUGH** = ``7``
  472. All mouse events are passed to the underlying window of the same application.
  473. \ **Note:** This flag has no effect in embedded windows.
  474. .. _class_Window_constant_FLAG_SHARP_CORNERS:
  475. .. rst-class:: classref-enumeration-constant
  476. :ref:`Flags<enum_Window_Flags>` **FLAG_SHARP_CORNERS** = ``8``
  477. Window style is overridden, forcing sharp corners.
  478. \ **Note:** This flag has no effect in embedded windows.
  479. \ **Note:** This flag is implemented only on Windows (11).
  480. .. _class_Window_constant_FLAG_EXCLUDE_FROM_CAPTURE:
  481. .. rst-class:: classref-enumeration-constant
  482. :ref:`Flags<enum_Window_Flags>` **FLAG_EXCLUDE_FROM_CAPTURE** = ``9``
  483. Windows is excluded from screenshots taken by :ref:`DisplayServer.screen_get_image()<class_DisplayServer_method_screen_get_image>`, :ref:`DisplayServer.screen_get_image_rect()<class_DisplayServer_method_screen_get_image_rect>`, and :ref:`DisplayServer.screen_get_pixel()<class_DisplayServer_method_screen_get_pixel>`.
  484. \ **Note:** This flag has no effect in embedded windows.
  485. \ **Note:** This flag is implemented on macOS and Windows (10, 20H1).
  486. \ **Note:** Setting this flag will prevent standard screenshot methods from capturing a window image, but does **NOT** guarantee that other apps won't be able to capture an image. It should not be used as a DRM or security measure.
  487. .. _class_Window_constant_FLAG_POPUP_WM_HINT:
  488. .. rst-class:: classref-enumeration-constant
  489. :ref:`Flags<enum_Window_Flags>` **FLAG_POPUP_WM_HINT** = ``10``
  490. Signals the window manager that this window is supposed to be an implementation-defined "popup" (usually a floating, borderless, untileable and immovable child window).
  491. .. _class_Window_constant_FLAG_MINIMIZE_DISABLED:
  492. .. rst-class:: classref-enumeration-constant
  493. :ref:`Flags<enum_Window_Flags>` **FLAG_MINIMIZE_DISABLED** = ``11``
  494. Window minimize button is disabled.
  495. \ **Note:** This flag is implemented on macOS and Windows.
  496. .. _class_Window_constant_FLAG_MAXIMIZE_DISABLED:
  497. .. rst-class:: classref-enumeration-constant
  498. :ref:`Flags<enum_Window_Flags>` **FLAG_MAXIMIZE_DISABLED** = ``12``
  499. Window maximize button is disabled.
  500. \ **Note:** This flag is implemented on macOS and Windows.
  501. .. _class_Window_constant_FLAG_MAX:
  502. .. rst-class:: classref-enumeration-constant
  503. :ref:`Flags<enum_Window_Flags>` **FLAG_MAX** = ``13``
  504. Max value of the :ref:`Flags<enum_Window_Flags>`.
  505. .. rst-class:: classref-item-separator
  506. ----
  507. .. _enum_Window_ContentScaleMode:
  508. .. rst-class:: classref-enumeration
  509. enum **ContentScaleMode**: :ref:`🔗<enum_Window_ContentScaleMode>`
  510. .. _class_Window_constant_CONTENT_SCALE_MODE_DISABLED:
  511. .. rst-class:: classref-enumeration-constant
  512. :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **CONTENT_SCALE_MODE_DISABLED** = ``0``
  513. The content will not be scaled to match the **Window**'s size.
  514. .. _class_Window_constant_CONTENT_SCALE_MODE_CANVAS_ITEMS:
  515. .. rst-class:: classref-enumeration-constant
  516. :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **CONTENT_SCALE_MODE_CANVAS_ITEMS** = ``1``
  517. 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.
  518. .. _class_Window_constant_CONTENT_SCALE_MODE_VIEWPORT:
  519. .. rst-class:: classref-enumeration-constant
  520. :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **CONTENT_SCALE_MODE_VIEWPORT** = ``2``
  521. 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.
  522. .. rst-class:: classref-item-separator
  523. ----
  524. .. _enum_Window_ContentScaleAspect:
  525. .. rst-class:: classref-enumeration
  526. enum **ContentScaleAspect**: :ref:`🔗<enum_Window_ContentScaleAspect>`
  527. .. _class_Window_constant_CONTENT_SCALE_ASPECT_IGNORE:
  528. .. rst-class:: classref-enumeration-constant
  529. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_IGNORE** = ``0``
  530. The aspect will be ignored. Scaling will simply stretch the content to fit the target size.
  531. .. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP:
  532. .. rst-class:: classref-enumeration-constant
  533. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_KEEP** = ``1``
  534. 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.
  535. .. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_WIDTH:
  536. .. rst-class:: classref-enumeration-constant
  537. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_KEEP_WIDTH** = ``2``
  538. The content can be expanded vertically. Scaling horizontally will result in keeping the width ratio and then black bars on left and right sides.
  539. .. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_HEIGHT:
  540. .. rst-class:: classref-enumeration-constant
  541. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_KEEP_HEIGHT** = ``3``
  542. The content can be expanded horizontally. Scaling vertically will result in keeping the height ratio and then black bars on top and bottom sides.
  543. .. _class_Window_constant_CONTENT_SCALE_ASPECT_EXPAND:
  544. .. rst-class:: classref-enumeration-constant
  545. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **CONTENT_SCALE_ASPECT_EXPAND** = ``4``
  546. 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.
  547. .. rst-class:: classref-item-separator
  548. ----
  549. .. _enum_Window_ContentScaleStretch:
  550. .. rst-class:: classref-enumeration
  551. enum **ContentScaleStretch**: :ref:`🔗<enum_Window_ContentScaleStretch>`
  552. .. _class_Window_constant_CONTENT_SCALE_STRETCH_FRACTIONAL:
  553. .. rst-class:: classref-enumeration-constant
  554. :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **CONTENT_SCALE_STRETCH_FRACTIONAL** = ``0``
  555. 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.
  556. .. _class_Window_constant_CONTENT_SCALE_STRETCH_INTEGER:
  557. .. rst-class:: classref-enumeration-constant
  558. :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **CONTENT_SCALE_STRETCH_INTEGER** = ``1``
  559. 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.
  560. .. rst-class:: classref-item-separator
  561. ----
  562. .. _enum_Window_LayoutDirection:
  563. .. rst-class:: classref-enumeration
  564. enum **LayoutDirection**: :ref:`🔗<enum_Window_LayoutDirection>`
  565. .. _class_Window_constant_LAYOUT_DIRECTION_INHERITED:
  566. .. rst-class:: classref-enumeration-constant
  567. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_INHERITED** = ``0``
  568. Automatic layout direction, determined from the parent window layout direction.
  569. .. _class_Window_constant_LAYOUT_DIRECTION_APPLICATION_LOCALE:
  570. .. rst-class:: classref-enumeration-constant
  571. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_APPLICATION_LOCALE** = ``1``
  572. Automatic layout direction, determined from the current locale.
  573. .. _class_Window_constant_LAYOUT_DIRECTION_LTR:
  574. .. rst-class:: classref-enumeration-constant
  575. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_LTR** = ``2``
  576. Left-to-right layout direction.
  577. .. _class_Window_constant_LAYOUT_DIRECTION_RTL:
  578. .. rst-class:: classref-enumeration-constant
  579. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_RTL** = ``3``
  580. Right-to-left layout direction.
  581. .. _class_Window_constant_LAYOUT_DIRECTION_SYSTEM_LOCALE:
  582. .. rst-class:: classref-enumeration-constant
  583. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_SYSTEM_LOCALE** = ``4``
  584. Automatic layout direction, determined from the system locale.
  585. .. _class_Window_constant_LAYOUT_DIRECTION_MAX:
  586. .. rst-class:: classref-enumeration-constant
  587. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_MAX** = ``5``
  588. Represents the size of the :ref:`LayoutDirection<enum_Window_LayoutDirection>` enum.
  589. .. _class_Window_constant_LAYOUT_DIRECTION_LOCALE:
  590. .. rst-class:: classref-enumeration-constant
  591. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **LAYOUT_DIRECTION_LOCALE** = ``1``
  592. **Deprecated:** Use :ref:`LAYOUT_DIRECTION_APPLICATION_LOCALE<class_Window_constant_LAYOUT_DIRECTION_APPLICATION_LOCALE>` instead.
  593. .. rst-class:: classref-item-separator
  594. ----
  595. .. _enum_Window_WindowInitialPosition:
  596. .. rst-class:: classref-enumeration
  597. enum **WindowInitialPosition**: :ref:`🔗<enum_Window_WindowInitialPosition>`
  598. .. _class_Window_constant_WINDOW_INITIAL_POSITION_ABSOLUTE:
  599. .. rst-class:: classref-enumeration-constant
  600. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_ABSOLUTE** = ``0``
  601. Initial window position is determined by :ref:`position<class_Window_property_position>`.
  602. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_PRIMARY_SCREEN:
  603. .. rst-class:: classref-enumeration-constant
  604. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_PRIMARY_SCREEN** = ``1``
  605. Initial window position is the center of the primary screen.
  606. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN:
  607. .. rst-class:: classref-enumeration-constant
  608. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN** = ``2``
  609. Initial window position is the center of the main window screen.
  610. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN:
  611. .. rst-class:: classref-enumeration-constant
  612. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN** = ``3``
  613. Initial window position is the center of :ref:`current_screen<class_Window_property_current_screen>` screen.
  614. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS:
  615. .. rst-class:: classref-enumeration-constant
  616. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS** = ``4``
  617. Initial window position is the center of the screen containing the mouse pointer.
  618. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS:
  619. .. rst-class:: classref-enumeration-constant
  620. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS** = ``5``
  621. Initial window position is the center of the screen containing the window with the keyboard focus.
  622. .. rst-class:: classref-section-separator
  623. ----
  624. .. rst-class:: classref-descriptions-group
  625. Constants
  626. ---------
  627. .. _class_Window_constant_NOTIFICATION_VISIBILITY_CHANGED:
  628. .. rst-class:: classref-constant
  629. **NOTIFICATION_VISIBILITY_CHANGED** = ``30`` :ref:`🔗<class_Window_constant_NOTIFICATION_VISIBILITY_CHANGED>`
  630. Emitted when **Window**'s visibility changes, right before :ref:`visibility_changed<class_Window_signal_visibility_changed>`.
  631. .. _class_Window_constant_NOTIFICATION_THEME_CHANGED:
  632. .. rst-class:: classref-constant
  633. **NOTIFICATION_THEME_CHANGED** = ``32`` :ref:`🔗<class_Window_constant_NOTIFICATION_THEME_CHANGED>`
  634. Sent when the node needs to refresh its theme items. This happens in one of the following cases:
  635. - The :ref:`theme<class_Window_property_theme>` property is changed on this node or any of its ancestors.
  636. - The :ref:`theme_type_variation<class_Window_property_theme_type_variation>` property is changed on this node.
  637. - The node enters the scene tree.
  638. \ **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.
  639. .. rst-class:: classref-section-separator
  640. ----
  641. .. rst-class:: classref-descriptions-group
  642. Property Descriptions
  643. ---------------------
  644. .. _class_Window_property_accessibility_description:
  645. .. rst-class:: classref-property
  646. :ref:`String<class_String>` **accessibility_description** = ``""`` :ref:`🔗<class_Window_property_accessibility_description>`
  647. .. rst-class:: classref-property-setget
  648. - |void| **set_accessibility_description**\ (\ value\: :ref:`String<class_String>`\ )
  649. - :ref:`String<class_String>` **get_accessibility_description**\ (\ )
  650. The human-readable node description that is reported to assistive apps.
  651. .. rst-class:: classref-item-separator
  652. ----
  653. .. _class_Window_property_accessibility_name:
  654. .. rst-class:: classref-property
  655. :ref:`String<class_String>` **accessibility_name** = ``""`` :ref:`🔗<class_Window_property_accessibility_name>`
  656. .. rst-class:: classref-property-setget
  657. - |void| **set_accessibility_name**\ (\ value\: :ref:`String<class_String>`\ )
  658. - :ref:`String<class_String>` **get_accessibility_name**\ (\ )
  659. The human-readable node name that is reported to assistive apps.
  660. .. rst-class:: classref-item-separator
  661. ----
  662. .. _class_Window_property_always_on_top:
  663. .. rst-class:: classref-property
  664. :ref:`bool<class_bool>` **always_on_top** = ``false`` :ref:`🔗<class_Window_property_always_on_top>`
  665. .. rst-class:: classref-property-setget
  666. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  667. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  668. If ``true``, the window will be on top of all other windows. Does not work if :ref:`transient<class_Window_property_transient>` is enabled.
  669. .. rst-class:: classref-item-separator
  670. ----
  671. .. _class_Window_property_auto_translate:
  672. .. rst-class:: classref-property
  673. :ref:`bool<class_bool>` **auto_translate** :ref:`🔗<class_Window_property_auto_translate>`
  674. .. rst-class:: classref-property-setget
  675. - |void| **set_auto_translate**\ (\ value\: :ref:`bool<class_bool>`\ )
  676. - :ref:`bool<class_bool>` **is_auto_translating**\ (\ )
  677. **Deprecated:** Use :ref:`Node.auto_translate_mode<class_Node_property_auto_translate_mode>` and :ref:`Node.can_auto_translate()<class_Node_method_can_auto_translate>` instead.
  678. Toggles if any text should automatically change to its translated version depending on the current locale.
  679. .. rst-class:: classref-item-separator
  680. ----
  681. .. _class_Window_property_borderless:
  682. .. rst-class:: classref-property
  683. :ref:`bool<class_bool>` **borderless** = ``false`` :ref:`🔗<class_Window_property_borderless>`
  684. .. rst-class:: classref-property-setget
  685. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  686. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  687. If ``true``, the window will have no borders.
  688. .. rst-class:: classref-item-separator
  689. ----
  690. .. _class_Window_property_content_scale_aspect:
  691. .. rst-class:: classref-property
  692. :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **content_scale_aspect** = ``0`` :ref:`🔗<class_Window_property_content_scale_aspect>`
  693. .. rst-class:: classref-property-setget
  694. - |void| **set_content_scale_aspect**\ (\ value\: :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>`\ )
  695. - :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **get_content_scale_aspect**\ (\ )
  696. 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>`.
  697. .. rst-class:: classref-item-separator
  698. ----
  699. .. _class_Window_property_content_scale_factor:
  700. .. rst-class:: classref-property
  701. :ref:`float<class_float>` **content_scale_factor** = ``1.0`` :ref:`🔗<class_Window_property_content_scale_factor>`
  702. .. rst-class:: classref-property-setget
  703. - |void| **set_content_scale_factor**\ (\ value\: :ref:`float<class_float>`\ )
  704. - :ref:`float<class_float>` **get_content_scale_factor**\ (\ )
  705. 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>`. See also :ref:`Viewport.get_stretch_transform()<class_Viewport_method_get_stretch_transform>`.
  706. .. rst-class:: classref-item-separator
  707. ----
  708. .. _class_Window_property_content_scale_mode:
  709. .. rst-class:: classref-property
  710. :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **content_scale_mode** = ``0`` :ref:`🔗<class_Window_property_content_scale_mode>`
  711. .. rst-class:: classref-property-setget
  712. - |void| **set_content_scale_mode**\ (\ value\: :ref:`ContentScaleMode<enum_Window_ContentScaleMode>`\ )
  713. - :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **get_content_scale_mode**\ (\ )
  714. Specifies how the content is scaled when the **Window** is resized.
  715. .. rst-class:: classref-item-separator
  716. ----
  717. .. _class_Window_property_content_scale_size:
  718. .. rst-class:: classref-property
  719. :ref:`Vector2i<class_Vector2i>` **content_scale_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_content_scale_size>`
  720. .. rst-class:: classref-property-setget
  721. - |void| **set_content_scale_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
  722. - :ref:`Vector2i<class_Vector2i>` **get_content_scale_size**\ (\ )
  723. 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.
  724. .. rst-class:: classref-item-separator
  725. ----
  726. .. _class_Window_property_content_scale_stretch:
  727. .. rst-class:: classref-property
  728. :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **content_scale_stretch** = ``0`` :ref:`🔗<class_Window_property_content_scale_stretch>`
  729. .. rst-class:: classref-property-setget
  730. - |void| **set_content_scale_stretch**\ (\ value\: :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>`\ )
  731. - :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **get_content_scale_stretch**\ (\ )
  732. 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>`.
  733. .. rst-class:: classref-item-separator
  734. ----
  735. .. _class_Window_property_current_screen:
  736. .. rst-class:: classref-property
  737. :ref:`int<class_int>` **current_screen** :ref:`🔗<class_Window_property_current_screen>`
  738. .. rst-class:: classref-property-setget
  739. - |void| **set_current_screen**\ (\ value\: :ref:`int<class_int>`\ )
  740. - :ref:`int<class_int>` **get_current_screen**\ (\ )
  741. The screen the window is currently on.
  742. .. rst-class:: classref-item-separator
  743. ----
  744. .. _class_Window_property_exclude_from_capture:
  745. .. rst-class:: classref-property
  746. :ref:`bool<class_bool>` **exclude_from_capture** = ``false`` :ref:`🔗<class_Window_property_exclude_from_capture>`
  747. .. rst-class:: classref-property-setget
  748. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  749. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  750. If ``true``, the **Window** is excluded from screenshots taken by :ref:`DisplayServer.screen_get_image()<class_DisplayServer_method_screen_get_image>`, :ref:`DisplayServer.screen_get_image_rect()<class_DisplayServer_method_screen_get_image_rect>`, and :ref:`DisplayServer.screen_get_pixel()<class_DisplayServer_method_screen_get_pixel>`.
  751. \ **Note:** This property is implemented on macOS and Windows.
  752. \ **Note:** Enabling this setting will prevent standard screenshot methods from capturing a window image, but does **NOT** guarantee that other apps won't be able to capture an image. It should not be used as a DRM or security measure.
  753. .. rst-class:: classref-item-separator
  754. ----
  755. .. _class_Window_property_exclusive:
  756. .. rst-class:: classref-property
  757. :ref:`bool<class_bool>` **exclusive** = ``false`` :ref:`🔗<class_Window_property_exclusive>`
  758. .. rst-class:: classref-property-setget
  759. - |void| **set_exclusive**\ (\ value\: :ref:`bool<class_bool>`\ )
  760. - :ref:`bool<class_bool>` **is_exclusive**\ (\ )
  761. 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**.
  762. Needs :ref:`transient<class_Window_property_transient>` enabled to work.
  763. .. rst-class:: classref-item-separator
  764. ----
  765. .. _class_Window_property_extend_to_title:
  766. .. rst-class:: classref-property
  767. :ref:`bool<class_bool>` **extend_to_title** = ``false`` :ref:`🔗<class_Window_property_extend_to_title>`
  768. .. rst-class:: classref-property-setget
  769. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  770. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  771. If ``true``, the **Window** contents is expanded to the full size of the window, window title bar is transparent.
  772. \ **Note:** This property is implemented only on macOS.
  773. \ **Note:** This property only works with native windows.
  774. .. rst-class:: classref-item-separator
  775. ----
  776. .. _class_Window_property_force_native:
  777. .. rst-class:: classref-property
  778. :ref:`bool<class_bool>` **force_native** = ``false`` :ref:`🔗<class_Window_property_force_native>`
  779. .. rst-class:: classref-property-setget
  780. - |void| **set_force_native**\ (\ value\: :ref:`bool<class_bool>`\ )
  781. - :ref:`bool<class_bool>` **get_force_native**\ (\ )
  782. If ``true``, native window will be used regardless of parent viewport and project settings.
  783. .. rst-class:: classref-item-separator
  784. ----
  785. .. _class_Window_property_initial_position:
  786. .. rst-class:: classref-property
  787. :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **initial_position** = ``0`` :ref:`🔗<class_Window_property_initial_position>`
  788. .. rst-class:: classref-property-setget
  789. - |void| **set_initial_position**\ (\ value\: :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>`\ )
  790. - :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **get_initial_position**\ (\ )
  791. Specifies the initial type of position for the **Window**.
  792. .. rst-class:: classref-item-separator
  793. ----
  794. .. _class_Window_property_keep_title_visible:
  795. .. rst-class:: classref-property
  796. :ref:`bool<class_bool>` **keep_title_visible** = ``false`` :ref:`🔗<class_Window_property_keep_title_visible>`
  797. .. rst-class:: classref-property-setget
  798. - |void| **set_keep_title_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
  799. - :ref:`bool<class_bool>` **get_keep_title_visible**\ (\ )
  800. If ``true``, the **Window** width is expanded to keep the title bar text fully visible.
  801. .. rst-class:: classref-item-separator
  802. ----
  803. .. _class_Window_property_max_size:
  804. .. rst-class:: classref-property
  805. :ref:`Vector2i<class_Vector2i>` **max_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_max_size>`
  806. .. rst-class:: classref-property-setget
  807. - |void| **set_max_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
  808. - :ref:`Vector2i<class_Vector2i>` **get_max_size**\ (\ )
  809. If non-zero, the **Window** can't be resized to be bigger than this size.
  810. \ **Note:** This property will be ignored if the value is lower than :ref:`min_size<class_Window_property_min_size>`.
  811. .. rst-class:: classref-item-separator
  812. ----
  813. .. _class_Window_property_maximize_disabled:
  814. .. rst-class:: classref-property
  815. :ref:`bool<class_bool>` **maximize_disabled** = ``false`` :ref:`🔗<class_Window_property_maximize_disabled>`
  816. .. rst-class:: classref-property-setget
  817. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  818. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  819. If ``true``, the **Window**'s maximize button is disabled.
  820. \ **Note:** If both minimize and maximize buttons are disabled, buttons are fully hidden, and only close button is visible.
  821. \ **Note:** This property is implemented only on macOS and Windows.
  822. .. rst-class:: classref-item-separator
  823. ----
  824. .. _class_Window_property_min_size:
  825. .. rst-class:: classref-property
  826. :ref:`Vector2i<class_Vector2i>` **min_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_min_size>`
  827. .. rst-class:: classref-property-setget
  828. - |void| **set_min_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
  829. - :ref:`Vector2i<class_Vector2i>` **get_min_size**\ (\ )
  830. If non-zero, the **Window** can't be resized to be smaller than this size.
  831. \ **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.
  832. .. rst-class:: classref-item-separator
  833. ----
  834. .. _class_Window_property_minimize_disabled:
  835. .. rst-class:: classref-property
  836. :ref:`bool<class_bool>` **minimize_disabled** = ``false`` :ref:`🔗<class_Window_property_minimize_disabled>`
  837. .. rst-class:: classref-property-setget
  838. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  839. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  840. If ``true``, the **Window**'s minimize button is disabled.
  841. \ **Note:** If both minimize and maximize buttons are disabled, buttons are fully hidden, and only close button is visible.
  842. \ **Note:** This property is implemented only on macOS and Windows.
  843. .. rst-class:: classref-item-separator
  844. ----
  845. .. _class_Window_property_mode:
  846. .. rst-class:: classref-property
  847. :ref:`Mode<enum_Window_Mode>` **mode** = ``0`` :ref:`🔗<class_Window_property_mode>`
  848. .. rst-class:: classref-property-setget
  849. - |void| **set_mode**\ (\ value\: :ref:`Mode<enum_Window_Mode>`\ )
  850. - :ref:`Mode<enum_Window_Mode>` **get_mode**\ (\ )
  851. Set's the window's current mode.
  852. \ **Note:** Fullscreen mode is not exclusive full screen on Windows and Linux.
  853. \ **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.
  854. .. rst-class:: classref-item-separator
  855. ----
  856. .. _class_Window_property_mouse_passthrough:
  857. .. rst-class:: classref-property
  858. :ref:`bool<class_bool>` **mouse_passthrough** = ``false`` :ref:`🔗<class_Window_property_mouse_passthrough>`
  859. .. rst-class:: classref-property-setget
  860. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  861. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  862. 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>`.
  863. \ **Note:** This property is implemented on Linux (X11), macOS and Windows.
  864. \ **Note:** This property only works with native windows.
  865. .. rst-class:: classref-item-separator
  866. ----
  867. .. _class_Window_property_mouse_passthrough_polygon:
  868. .. rst-class:: classref-property
  869. :ref:`PackedVector2Array<class_PackedVector2Array>` **mouse_passthrough_polygon** = ``PackedVector2Array()`` :ref:`🔗<class_Window_property_mouse_passthrough_polygon>`
  870. .. rst-class:: classref-property-setget
  871. - |void| **set_mouse_passthrough_polygon**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ )
  872. - :ref:`PackedVector2Array<class_PackedVector2Array>` **get_mouse_passthrough_polygon**\ (\ )
  873. Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.
  874. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
  875. .. tabs::
  876. .. code-tab:: gdscript
  877. # Set region, using Path2D node.
  878. $Window.mouse_passthrough_polygon = $Path2D.curve.get_baked_points()
  879. # Set region, using Polygon2D node.
  880. $Window.mouse_passthrough_polygon = $Polygon2D.polygon
  881. # Reset region to default.
  882. $Window.mouse_passthrough_polygon = []
  883. .. code-tab:: csharp
  884. // Set region, using Path2D node.
  885. GetNode<Window>("Window").MousePassthroughPolygon = GetNode<Path2D>("Path2D").Curve.GetBakedPoints();
  886. // Set region, using Polygon2D node.
  887. GetNode<Window>("Window").MousePassthroughPolygon = GetNode<Polygon2D>("Polygon2D").Polygon;
  888. // Reset region to default.
  889. GetNode<Window>("Window").MousePassthroughPolygon = [];
  890. \ **Note:** This property is ignored if :ref:`mouse_passthrough<class_Window_property_mouse_passthrough>` is set to ``true``.
  891. \ **Note:** On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
  892. \ **Note:** This property is implemented on Linux (X11), macOS and Windows.
  893. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details.
  894. .. rst-class:: classref-item-separator
  895. ----
  896. .. _class_Window_property_nonclient_area:
  897. .. rst-class:: classref-property
  898. :ref:`Rect2i<class_Rect2i>` **nonclient_area** = ``Rect2i(0, 0, 0, 0)`` :ref:`🔗<class_Window_property_nonclient_area>`
  899. .. rst-class:: classref-property-setget
  900. - |void| **set_nonclient_area**\ (\ value\: :ref:`Rect2i<class_Rect2i>`\ )
  901. - :ref:`Rect2i<class_Rect2i>` **get_nonclient_area**\ (\ )
  902. If set, defines the window's custom decoration area which will receive mouse input, even if normal input to the window is blocked (such as when it has an exclusive child opened). See also :ref:`nonclient_window_input<class_Window_signal_nonclient_window_input>`.
  903. .. rst-class:: classref-item-separator
  904. ----
  905. .. _class_Window_property_popup_window:
  906. .. rst-class:: classref-property
  907. :ref:`bool<class_bool>` **popup_window** = ``false`` :ref:`🔗<class_Window_property_popup_window>`
  908. .. rst-class:: classref-property-setget
  909. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  910. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  911. 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).
  912. .. rst-class:: classref-item-separator
  913. ----
  914. .. _class_Window_property_popup_wm_hint:
  915. .. rst-class:: classref-property
  916. :ref:`bool<class_bool>` **popup_wm_hint** = ``false`` :ref:`🔗<class_Window_property_popup_wm_hint>`
  917. .. rst-class:: classref-property-setget
  918. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  919. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  920. If ``true``, the **Window** will signal to the window manager that it is supposed to be an implementation-defined "popup" (usually a floating, borderless, untileable and immovable child window).
  921. .. rst-class:: classref-item-separator
  922. ----
  923. .. _class_Window_property_position:
  924. .. rst-class:: classref-property
  925. :ref:`Vector2i<class_Vector2i>` **position** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_position>`
  926. .. rst-class:: classref-property-setget
  927. - |void| **set_position**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
  928. - :ref:`Vector2i<class_Vector2i>` **get_position**\ (\ )
  929. The window's position in pixels.
  930. 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>`.
  931. \ **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>`.
  932. .. rst-class:: classref-item-separator
  933. ----
  934. .. _class_Window_property_sharp_corners:
  935. .. rst-class:: classref-property
  936. :ref:`bool<class_bool>` **sharp_corners** = ``false`` :ref:`🔗<class_Window_property_sharp_corners>`
  937. .. rst-class:: classref-property-setget
  938. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  939. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  940. If ``true``, the **Window** will override the OS window style to display sharp corners.
  941. \ **Note:** This property is implemented only on Windows (11).
  942. \ **Note:** This property only works with native windows.
  943. .. rst-class:: classref-item-separator
  944. ----
  945. .. _class_Window_property_size:
  946. .. rst-class:: classref-property
  947. :ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(100, 100)`` :ref:`🔗<class_Window_property_size>`
  948. .. rst-class:: classref-property-setget
  949. - |void| **set_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
  950. - :ref:`Vector2i<class_Vector2i>` **get_size**\ (\ )
  951. The window's size in pixels.
  952. .. rst-class:: classref-item-separator
  953. ----
  954. .. _class_Window_property_theme:
  955. .. rst-class:: classref-property
  956. :ref:`Theme<class_Theme>` **theme** :ref:`🔗<class_Window_property_theme>`
  957. .. rst-class:: classref-property-setget
  958. - |void| **set_theme**\ (\ value\: :ref:`Theme<class_Theme>`\ )
  959. - :ref:`Theme<class_Theme>` **get_theme**\ (\ )
  960. 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.
  961. \ **Note:** **Window** styles will have no effect unless the window is embedded.
  962. .. rst-class:: classref-item-separator
  963. ----
  964. .. _class_Window_property_theme_type_variation:
  965. .. rst-class:: classref-property
  966. :ref:`StringName<class_StringName>` **theme_type_variation** = ``&""`` :ref:`🔗<class_Window_property_theme_type_variation>`
  967. .. rst-class:: classref-property-setget
  968. - |void| **set_theme_type_variation**\ (\ value\: :ref:`StringName<class_StringName>`\ )
  969. - :ref:`StringName<class_StringName>` **get_theme_type_variation**\ (\ )
  970. 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.
  971. .. rst-class:: classref-item-separator
  972. ----
  973. .. _class_Window_property_title:
  974. .. rst-class:: classref-property
  975. :ref:`String<class_String>` **title** = ``""`` :ref:`🔗<class_Window_property_title>`
  976. .. rst-class:: classref-property-setget
  977. - |void| **set_title**\ (\ value\: :ref:`String<class_String>`\ )
  978. - :ref:`String<class_String>` **get_title**\ (\ )
  979. The window's title. If the **Window** is native, title styles set in :ref:`Theme<class_Theme>` will have no effect.
  980. .. rst-class:: classref-item-separator
  981. ----
  982. .. _class_Window_property_transient:
  983. .. rst-class:: classref-property
  984. :ref:`bool<class_bool>` **transient** = ``false`` :ref:`🔗<class_Window_property_transient>`
  985. .. rst-class:: classref-property-setget
  986. - |void| **set_transient**\ (\ value\: :ref:`bool<class_bool>`\ )
  987. - :ref:`bool<class_bool>` **is_transient**\ (\ )
  988. 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.
  989. Note that behavior might be different depending on the platform.
  990. .. rst-class:: classref-item-separator
  991. ----
  992. .. _class_Window_property_transient_to_focused:
  993. .. rst-class:: classref-property
  994. :ref:`bool<class_bool>` **transient_to_focused** = ``false`` :ref:`🔗<class_Window_property_transient_to_focused>`
  995. .. rst-class:: classref-property-setget
  996. - |void| **set_transient_to_focused**\ (\ value\: :ref:`bool<class_bool>`\ )
  997. - :ref:`bool<class_bool>` **is_transient_to_focused**\ (\ )
  998. If ``true``, and the **Window** is :ref:`transient<class_Window_property_transient>`, this window will (at the time of becoming visible) become transient to the currently focused window instead of the immediate parent window in the hierarchy. Note that the transient parent is assigned at the time this window becomes visible, so changing it afterwards has no effect until re-shown.
  999. .. rst-class:: classref-item-separator
  1000. ----
  1001. .. _class_Window_property_transparent:
  1002. .. rst-class:: classref-property
  1003. :ref:`bool<class_bool>` **transparent** = ``false`` :ref:`🔗<class_Window_property_transparent>`
  1004. .. rst-class:: classref-property-setget
  1005. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  1006. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  1007. If ``true``, the **Window**'s background can be transparent. This is best used with embedded windows.
  1008. \ **Note:** Transparency support is implemented on Linux, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
  1009. \ **Note:** This property has no effect if :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>` is set to ``false``.
  1010. .. rst-class:: classref-item-separator
  1011. ----
  1012. .. _class_Window_property_unfocusable:
  1013. .. rst-class:: classref-property
  1014. :ref:`bool<class_bool>` **unfocusable** = ``false`` :ref:`🔗<class_Window_property_unfocusable>`
  1015. .. rst-class:: classref-property-setget
  1016. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  1017. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  1018. If ``true``, the **Window** can't be focused nor interacted with. It can still be visible.
  1019. .. rst-class:: classref-item-separator
  1020. ----
  1021. .. _class_Window_property_unresizable:
  1022. .. rst-class:: classref-property
  1023. :ref:`bool<class_bool>` **unresizable** = ``false`` :ref:`🔗<class_Window_property_unresizable>`
  1024. .. rst-class:: classref-property-setget
  1025. - |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ )
  1026. - :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const|
  1027. If ``true``, the window can't be resized.
  1028. .. rst-class:: classref-item-separator
  1029. ----
  1030. .. _class_Window_property_visible:
  1031. .. rst-class:: classref-property
  1032. :ref:`bool<class_bool>` **visible** = ``true`` :ref:`🔗<class_Window_property_visible>`
  1033. .. rst-class:: classref-property-setget
  1034. - |void| **set_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
  1035. - :ref:`bool<class_bool>` **is_visible**\ (\ )
  1036. If ``true``, the window is visible.
  1037. .. rst-class:: classref-item-separator
  1038. ----
  1039. .. _class_Window_property_wrap_controls:
  1040. .. rst-class:: classref-property
  1041. :ref:`bool<class_bool>` **wrap_controls** = ``false`` :ref:`🔗<class_Window_property_wrap_controls>`
  1042. .. rst-class:: classref-property-setget
  1043. - |void| **set_wrap_controls**\ (\ value\: :ref:`bool<class_bool>`\ )
  1044. - :ref:`bool<class_bool>` **is_wrapping_controls**\ (\ )
  1045. 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.
  1046. If ``false``, you need to call :ref:`child_controls_changed()<class_Window_method_child_controls_changed>` manually.
  1047. .. rst-class:: classref-section-separator
  1048. ----
  1049. .. rst-class:: classref-descriptions-group
  1050. Method Descriptions
  1051. -------------------
  1052. .. _class_Window_private_method__get_contents_minimum_size:
  1053. .. rst-class:: classref-method
  1054. :ref:`Vector2<class_Vector2>` **_get_contents_minimum_size**\ (\ ) |virtual| |const| :ref:`🔗<class_Window_private_method__get_contents_minimum_size>`
  1055. 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>`.
  1056. .. rst-class:: classref-item-separator
  1057. ----
  1058. .. _class_Window_method_add_theme_color_override:
  1059. .. rst-class:: classref-method
  1060. |void| **add_theme_color_override**\ (\ name\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Window_method_add_theme_color_override>`
  1061. 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>`.
  1062. 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.
  1063. .. rst-class:: classref-item-separator
  1064. ----
  1065. .. _class_Window_method_add_theme_constant_override:
  1066. .. rst-class:: classref-method
  1067. |void| **add_theme_constant_override**\ (\ name\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Window_method_add_theme_constant_override>`
  1068. 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>`.
  1069. See also :ref:`get_theme_constant()<class_Window_method_get_theme_constant>`.
  1070. .. rst-class:: classref-item-separator
  1071. ----
  1072. .. _class_Window_method_add_theme_font_override:
  1073. .. rst-class:: classref-method
  1074. |void| **add_theme_font_override**\ (\ name\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) :ref:`🔗<class_Window_method_add_theme_font_override>`
  1075. 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>`.
  1076. See also :ref:`get_theme_font()<class_Window_method_get_theme_font>`.
  1077. .. rst-class:: classref-item-separator
  1078. ----
  1079. .. _class_Window_method_add_theme_font_size_override:
  1080. .. rst-class:: classref-method
  1081. |void| **add_theme_font_size_override**\ (\ name\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Window_method_add_theme_font_size_override>`
  1082. 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>`.
  1083. See also :ref:`get_theme_font_size()<class_Window_method_get_theme_font_size>`.
  1084. .. rst-class:: classref-item-separator
  1085. ----
  1086. .. _class_Window_method_add_theme_icon_override:
  1087. .. rst-class:: classref-method
  1088. |void| **add_theme_icon_override**\ (\ name\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_Window_method_add_theme_icon_override>`
  1089. 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>`.
  1090. See also :ref:`get_theme_icon()<class_Window_method_get_theme_icon>`.
  1091. .. rst-class:: classref-item-separator
  1092. ----
  1093. .. _class_Window_method_add_theme_stylebox_override:
  1094. .. rst-class:: classref-method
  1095. |void| **add_theme_stylebox_override**\ (\ name\: :ref:`StringName<class_StringName>`, stylebox\: :ref:`StyleBox<class_StyleBox>`\ ) :ref:`🔗<class_Window_method_add_theme_stylebox_override>`
  1096. 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>`.
  1097. 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.
  1098. .. rst-class:: classref-item-separator
  1099. ----
  1100. .. _class_Window_method_begin_bulk_theme_override:
  1101. .. rst-class:: classref-method
  1102. |void| **begin_bulk_theme_override**\ (\ ) :ref:`🔗<class_Window_method_begin_bulk_theme_override>`
  1103. 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.
  1104. .. rst-class:: classref-item-separator
  1105. ----
  1106. .. _class_Window_method_can_draw:
  1107. .. rst-class:: classref-method
  1108. :ref:`bool<class_bool>` **can_draw**\ (\ ) |const| :ref:`🔗<class_Window_method_can_draw>`
  1109. Returns whether the window is being drawn to the screen.
  1110. .. rst-class:: classref-item-separator
  1111. ----
  1112. .. _class_Window_method_child_controls_changed:
  1113. .. rst-class:: classref-method
  1114. |void| **child_controls_changed**\ (\ ) :ref:`🔗<class_Window_method_child_controls_changed>`
  1115. Requests an update of the **Window** size to fit underlying :ref:`Control<class_Control>` nodes.
  1116. .. rst-class:: classref-item-separator
  1117. ----
  1118. .. _class_Window_method_end_bulk_theme_override:
  1119. .. rst-class:: classref-method
  1120. |void| **end_bulk_theme_override**\ (\ ) :ref:`🔗<class_Window_method_end_bulk_theme_override>`
  1121. Ends a bulk theme override update. See :ref:`begin_bulk_theme_override()<class_Window_method_begin_bulk_theme_override>`.
  1122. .. rst-class:: classref-item-separator
  1123. ----
  1124. .. _class_Window_method_get_contents_minimum_size:
  1125. .. rst-class:: classref-method
  1126. :ref:`Vector2<class_Vector2>` **get_contents_minimum_size**\ (\ ) |const| :ref:`🔗<class_Window_method_get_contents_minimum_size>`
  1127. 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 child nodes have changed.
  1128. The value returned by this method can be overridden with :ref:`_get_contents_minimum_size()<class_Window_private_method__get_contents_minimum_size>`.
  1129. .. rst-class:: classref-item-separator
  1130. ----
  1131. .. _class_Window_method_get_flag:
  1132. .. rst-class:: classref-method
  1133. :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| :ref:`🔗<class_Window_method_get_flag>`
  1134. Returns ``true`` if the ``flag`` is set.
  1135. .. rst-class:: classref-item-separator
  1136. ----
  1137. .. _class_Window_method_get_focused_window:
  1138. .. rst-class:: classref-method
  1139. :ref:`Window<class_Window>` **get_focused_window**\ (\ ) |static| :ref:`🔗<class_Window_method_get_focused_window>`
  1140. Returns the focused window.
  1141. .. rst-class:: classref-item-separator
  1142. ----
  1143. .. _class_Window_method_get_layout_direction:
  1144. .. rst-class:: classref-method
  1145. :ref:`LayoutDirection<enum_Window_LayoutDirection>` **get_layout_direction**\ (\ ) |const| :ref:`🔗<class_Window_method_get_layout_direction>`
  1146. Returns layout direction and text writing direction.
  1147. .. rst-class:: classref-item-separator
  1148. ----
  1149. .. _class_Window_method_get_position_with_decorations:
  1150. .. rst-class:: classref-method
  1151. :ref:`Vector2i<class_Vector2i>` **get_position_with_decorations**\ (\ ) |const| :ref:`🔗<class_Window_method_get_position_with_decorations>`
  1152. Returns the window's position including its border.
  1153. \ **Note:** If :ref:`visible<class_Window_property_visible>` is ``false``, this method returns the same value as :ref:`position<class_Window_property_position>`.
  1154. .. rst-class:: classref-item-separator
  1155. ----
  1156. .. _class_Window_method_get_size_with_decorations:
  1157. .. rst-class:: classref-method
  1158. :ref:`Vector2i<class_Vector2i>` **get_size_with_decorations**\ (\ ) |const| :ref:`🔗<class_Window_method_get_size_with_decorations>`
  1159. Returns the window's size including its border.
  1160. \ **Note:** If :ref:`visible<class_Window_property_visible>` is ``false``, this method returns the same value as :ref:`size<class_Window_property_size>`.
  1161. .. rst-class:: classref-item-separator
  1162. ----
  1163. .. _class_Window_method_get_theme_color:
  1164. .. rst-class:: classref-method
  1165. :ref:`Color<class_Color>` **get_theme_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_color>`
  1166. 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``.
  1167. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for more details.
  1168. .. rst-class:: classref-item-separator
  1169. ----
  1170. .. _class_Window_method_get_theme_constant:
  1171. .. rst-class:: classref-method
  1172. :ref:`int<class_int>` **get_theme_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_constant>`
  1173. 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``.
  1174. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for more details.
  1175. .. rst-class:: classref-item-separator
  1176. ----
  1177. .. _class_Window_method_get_theme_default_base_scale:
  1178. .. rst-class:: classref-method
  1179. :ref:`float<class_float>` **get_theme_default_base_scale**\ (\ ) |const| :ref:`🔗<class_Window_method_get_theme_default_base_scale>`
  1180. 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.
  1181. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1182. .. rst-class:: classref-item-separator
  1183. ----
  1184. .. _class_Window_method_get_theme_default_font:
  1185. .. rst-class:: classref-method
  1186. :ref:`Font<class_Font>` **get_theme_default_font**\ (\ ) |const| :ref:`🔗<class_Window_method_get_theme_default_font>`
  1187. 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.
  1188. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1189. .. rst-class:: classref-item-separator
  1190. ----
  1191. .. _class_Window_method_get_theme_default_font_size:
  1192. .. rst-class:: classref-method
  1193. :ref:`int<class_int>` **get_theme_default_font_size**\ (\ ) |const| :ref:`🔗<class_Window_method_get_theme_default_font_size>`
  1194. 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.
  1195. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1196. .. rst-class:: classref-item-separator
  1197. ----
  1198. .. _class_Window_method_get_theme_font:
  1199. .. rst-class:: classref-method
  1200. :ref:`Font<class_Font>` **get_theme_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_font>`
  1201. 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``.
  1202. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1203. .. rst-class:: classref-item-separator
  1204. ----
  1205. .. _class_Window_method_get_theme_font_size:
  1206. .. rst-class:: classref-method
  1207. :ref:`int<class_int>` **get_theme_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_font_size>`
  1208. 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``.
  1209. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1210. .. rst-class:: classref-item-separator
  1211. ----
  1212. .. _class_Window_method_get_theme_icon:
  1213. .. rst-class:: classref-method
  1214. :ref:`Texture2D<class_Texture2D>` **get_theme_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_icon>`
  1215. 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``.
  1216. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1217. .. rst-class:: classref-item-separator
  1218. ----
  1219. .. _class_Window_method_get_theme_stylebox:
  1220. .. rst-class:: classref-method
  1221. :ref:`StyleBox<class_StyleBox>` **get_theme_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_stylebox>`
  1222. 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``.
  1223. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1224. .. rst-class:: classref-item-separator
  1225. ----
  1226. .. _class_Window_method_get_window_id:
  1227. .. rst-class:: classref-method
  1228. :ref:`int<class_int>` **get_window_id**\ (\ ) |const| :ref:`🔗<class_Window_method_get_window_id>`
  1229. Returns the ID of the window.
  1230. .. rst-class:: classref-item-separator
  1231. ----
  1232. .. _class_Window_method_grab_focus:
  1233. .. rst-class:: classref-method
  1234. |void| **grab_focus**\ (\ ) :ref:`🔗<class_Window_method_grab_focus>`
  1235. Causes the window to grab focus, allowing it to receive user input.
  1236. .. rst-class:: classref-item-separator
  1237. ----
  1238. .. _class_Window_method_has_focus:
  1239. .. rst-class:: classref-method
  1240. :ref:`bool<class_bool>` **has_focus**\ (\ ) |const| :ref:`🔗<class_Window_method_has_focus>`
  1241. Returns ``true`` if the window is focused.
  1242. .. rst-class:: classref-item-separator
  1243. ----
  1244. .. _class_Window_method_has_theme_color:
  1245. .. rst-class:: classref-method
  1246. :ref:`bool<class_bool>` **has_theme_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_color>`
  1247. 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``.
  1248. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1249. .. rst-class:: classref-item-separator
  1250. ----
  1251. .. _class_Window_method_has_theme_color_override:
  1252. .. rst-class:: classref-method
  1253. :ref:`bool<class_bool>` **has_theme_color_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_color_override>`
  1254. 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.
  1255. See :ref:`add_theme_color_override()<class_Window_method_add_theme_color_override>`.
  1256. .. rst-class:: classref-item-separator
  1257. ----
  1258. .. _class_Window_method_has_theme_constant:
  1259. .. rst-class:: classref-method
  1260. :ref:`bool<class_bool>` **has_theme_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_constant>`
  1261. 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``.
  1262. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1263. .. rst-class:: classref-item-separator
  1264. ----
  1265. .. _class_Window_method_has_theme_constant_override:
  1266. .. rst-class:: classref-method
  1267. :ref:`bool<class_bool>` **has_theme_constant_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_constant_override>`
  1268. Returns ``true`` if there is a local override for a theme constant with the specified ``name`` in this :ref:`Control<class_Control>` node.
  1269. See :ref:`add_theme_constant_override()<class_Window_method_add_theme_constant_override>`.
  1270. .. rst-class:: classref-item-separator
  1271. ----
  1272. .. _class_Window_method_has_theme_font:
  1273. .. rst-class:: classref-method
  1274. :ref:`bool<class_bool>` **has_theme_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_font>`
  1275. 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``.
  1276. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1277. .. rst-class:: classref-item-separator
  1278. ----
  1279. .. _class_Window_method_has_theme_font_override:
  1280. .. rst-class:: classref-method
  1281. :ref:`bool<class_bool>` **has_theme_font_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_font_override>`
  1282. 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.
  1283. See :ref:`add_theme_font_override()<class_Window_method_add_theme_font_override>`.
  1284. .. rst-class:: classref-item-separator
  1285. ----
  1286. .. _class_Window_method_has_theme_font_size:
  1287. .. rst-class:: classref-method
  1288. :ref:`bool<class_bool>` **has_theme_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_font_size>`
  1289. 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``.
  1290. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1291. .. rst-class:: classref-item-separator
  1292. ----
  1293. .. _class_Window_method_has_theme_font_size_override:
  1294. .. rst-class:: classref-method
  1295. :ref:`bool<class_bool>` **has_theme_font_size_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_font_size_override>`
  1296. Returns ``true`` if there is a local override for a theme font size with the specified ``name`` in this :ref:`Control<class_Control>` node.
  1297. See :ref:`add_theme_font_size_override()<class_Window_method_add_theme_font_size_override>`.
  1298. .. rst-class:: classref-item-separator
  1299. ----
  1300. .. _class_Window_method_has_theme_icon:
  1301. .. rst-class:: classref-method
  1302. :ref:`bool<class_bool>` **has_theme_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_icon>`
  1303. 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``.
  1304. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1305. .. rst-class:: classref-item-separator
  1306. ----
  1307. .. _class_Window_method_has_theme_icon_override:
  1308. .. rst-class:: classref-method
  1309. :ref:`bool<class_bool>` **has_theme_icon_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_icon_override>`
  1310. Returns ``true`` if there is a local override for a theme icon with the specified ``name`` in this :ref:`Control<class_Control>` node.
  1311. See :ref:`add_theme_icon_override()<class_Window_method_add_theme_icon_override>`.
  1312. .. rst-class:: classref-item-separator
  1313. ----
  1314. .. _class_Window_method_has_theme_stylebox:
  1315. .. rst-class:: classref-method
  1316. :ref:`bool<class_bool>` **has_theme_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_stylebox>`
  1317. 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``.
  1318. See :ref:`Control.get_theme_color()<class_Control_method_get_theme_color>` for details.
  1319. .. rst-class:: classref-item-separator
  1320. ----
  1321. .. _class_Window_method_has_theme_stylebox_override:
  1322. .. rst-class:: classref-method
  1323. :ref:`bool<class_bool>` **has_theme_stylebox_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_stylebox_override>`
  1324. 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.
  1325. See :ref:`add_theme_stylebox_override()<class_Window_method_add_theme_stylebox_override>`.
  1326. .. rst-class:: classref-item-separator
  1327. ----
  1328. .. _class_Window_method_hide:
  1329. .. rst-class:: classref-method
  1330. |void| **hide**\ (\ ) :ref:`🔗<class_Window_method_hide>`
  1331. 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>`.
  1332. .. rst-class:: classref-item-separator
  1333. ----
  1334. .. _class_Window_method_is_embedded:
  1335. .. rst-class:: classref-method
  1336. :ref:`bool<class_bool>` **is_embedded**\ (\ ) |const| :ref:`🔗<class_Window_method_is_embedded>`
  1337. Returns ``true`` if the window is currently embedded in another window.
  1338. .. rst-class:: classref-item-separator
  1339. ----
  1340. .. _class_Window_method_is_layout_rtl:
  1341. .. rst-class:: classref-method
  1342. :ref:`bool<class_bool>` **is_layout_rtl**\ (\ ) |const| :ref:`🔗<class_Window_method_is_layout_rtl>`
  1343. Returns ``true`` if the layout is right-to-left.
  1344. .. rst-class:: classref-item-separator
  1345. ----
  1346. .. _class_Window_method_is_maximize_allowed:
  1347. .. rst-class:: classref-method
  1348. :ref:`bool<class_bool>` **is_maximize_allowed**\ (\ ) |const| :ref:`🔗<class_Window_method_is_maximize_allowed>`
  1349. Returns ``true`` if the window can be maximized (the maximize button is enabled).
  1350. .. rst-class:: classref-item-separator
  1351. ----
  1352. .. _class_Window_method_is_using_font_oversampling:
  1353. .. rst-class:: classref-method
  1354. :ref:`bool<class_bool>` **is_using_font_oversampling**\ (\ ) |const| :ref:`🔗<class_Window_method_is_using_font_oversampling>`
  1355. Returns ``true`` if font oversampling is enabled. See :ref:`set_use_font_oversampling()<class_Window_method_set_use_font_oversampling>`.
  1356. .. rst-class:: classref-item-separator
  1357. ----
  1358. .. _class_Window_method_move_to_center:
  1359. .. rst-class:: classref-method
  1360. |void| **move_to_center**\ (\ ) :ref:`🔗<class_Window_method_move_to_center>`
  1361. Centers a native window on the current screen and an embedded window on its embedder :ref:`Viewport<class_Viewport>`.
  1362. .. rst-class:: classref-item-separator
  1363. ----
  1364. .. _class_Window_method_move_to_foreground:
  1365. .. rst-class:: classref-method
  1366. |void| **move_to_foreground**\ (\ ) :ref:`🔗<class_Window_method_move_to_foreground>`
  1367. **Deprecated:** Use :ref:`grab_focus()<class_Window_method_grab_focus>` instead.
  1368. Causes the window to grab focus, allowing it to receive user input.
  1369. .. rst-class:: classref-item-separator
  1370. ----
  1371. .. _class_Window_method_popup:
  1372. .. rst-class:: classref-method
  1373. |void| **popup**\ (\ rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) :ref:`🔗<class_Window_method_popup>`
  1374. 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.
  1375. If :ref:`ProjectSettings.display/window/subwindows/embed_subwindows<class_ProjectSettings_property_display/window/subwindows/embed_subwindows>` is ``true`` (single-window mode), ``rect``'s coordinates are global and relative to the main window's top-left corner (excluding window decorations). If ``rect``'s position coordinates are negative, the window will be located outside the main window and may not be visible as a result.
  1376. If :ref:`ProjectSettings.display/window/subwindows/embed_subwindows<class_ProjectSettings_property_display/window/subwindows/embed_subwindows>` is ``false`` (multi-window mode), ``rect``'s coordinates are global and relative to the top-left corner of the leftmost screen. If ``rect``'s position coordinates are negative, the window will be placed at the top-left corner of the screen.
  1377. \ **Note:** ``rect`` must be in global coordinates if specified.
  1378. .. rst-class:: classref-item-separator
  1379. ----
  1380. .. _class_Window_method_popup_centered:
  1381. .. rst-class:: classref-method
  1382. |void| **popup_centered**\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) :ref:`🔗<class_Window_method_popup_centered>`
  1383. 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.
  1384. \ **Note:** Calling it with the default value of ``minsize`` is equivalent to calling it with :ref:`size<class_Window_property_size>`.
  1385. .. rst-class:: classref-item-separator
  1386. ----
  1387. .. _class_Window_method_popup_centered_clamped:
  1388. .. rst-class:: classref-method
  1389. |void| **popup_centered_clamped**\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) :ref:`🔗<class_Window_method_popup_centered_clamped>`
  1390. Popups the **Window** centered inside its parent **Window**. ``fallback_ratio`` determines the maximum size of the **Window**, in relation to its parent.
  1391. \ **Note:** Calling it with the default value of ``minsize`` is equivalent to calling it with :ref:`size<class_Window_property_size>`.
  1392. .. rst-class:: classref-item-separator
  1393. ----
  1394. .. _class_Window_method_popup_centered_ratio:
  1395. .. rst-class:: classref-method
  1396. |void| **popup_centered_ratio**\ (\ ratio\: :ref:`float<class_float>` = 0.8\ ) :ref:`🔗<class_Window_method_popup_centered_ratio>`
  1397. If **Window** is embedded, popups the **Window** centered inside its embedder and sets its size as a ``ratio`` of embedder's size.
  1398. 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.
  1399. .. rst-class:: classref-item-separator
  1400. ----
  1401. .. _class_Window_method_popup_exclusive:
  1402. .. rst-class:: classref-method
  1403. |void| **popup_exclusive**\ (\ from_node\: :ref:`Node<class_Node>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) :ref:`🔗<class_Window_method_popup_exclusive>`
  1404. 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.
  1405. 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>`.
  1406. .. rst-class:: classref-item-separator
  1407. ----
  1408. .. _class_Window_method_popup_exclusive_centered:
  1409. .. rst-class:: classref-method
  1410. |void| **popup_exclusive_centered**\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) :ref:`🔗<class_Window_method_popup_exclusive_centered>`
  1411. 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.
  1412. 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>`.
  1413. .. rst-class:: classref-item-separator
  1414. ----
  1415. .. _class_Window_method_popup_exclusive_centered_clamped:
  1416. .. rst-class:: classref-method
  1417. |void| **popup_exclusive_centered_clamped**\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) :ref:`🔗<class_Window_method_popup_exclusive_centered_clamped>`
  1418. 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.
  1419. 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>`.
  1420. .. rst-class:: classref-item-separator
  1421. ----
  1422. .. _class_Window_method_popup_exclusive_centered_ratio:
  1423. .. rst-class:: classref-method
  1424. |void| **popup_exclusive_centered_ratio**\ (\ from_node\: :ref:`Node<class_Node>`, ratio\: :ref:`float<class_float>` = 0.8\ ) :ref:`🔗<class_Window_method_popup_exclusive_centered_ratio>`
  1425. 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.
  1426. 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>`.
  1427. .. rst-class:: classref-item-separator
  1428. ----
  1429. .. _class_Window_method_popup_exclusive_on_parent:
  1430. .. rst-class:: classref-method
  1431. |void| **popup_exclusive_on_parent**\ (\ from_node\: :ref:`Node<class_Node>`, parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`🔗<class_Window_method_popup_exclusive_on_parent>`
  1432. 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.
  1433. 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>`.
  1434. .. rst-class:: classref-item-separator
  1435. ----
  1436. .. _class_Window_method_popup_on_parent:
  1437. .. rst-class:: classref-method
  1438. |void| **popup_on_parent**\ (\ parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`🔗<class_Window_method_popup_on_parent>`
  1439. 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>`.
  1440. .. rst-class:: classref-item-separator
  1441. ----
  1442. .. _class_Window_method_remove_theme_color_override:
  1443. .. rst-class:: classref-method
  1444. |void| **remove_theme_color_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_color_override>`
  1445. 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.
  1446. .. rst-class:: classref-item-separator
  1447. ----
  1448. .. _class_Window_method_remove_theme_constant_override:
  1449. .. rst-class:: classref-method
  1450. |void| **remove_theme_constant_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_constant_override>`
  1451. 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.
  1452. .. rst-class:: classref-item-separator
  1453. ----
  1454. .. _class_Window_method_remove_theme_font_override:
  1455. .. rst-class:: classref-method
  1456. |void| **remove_theme_font_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_font_override>`
  1457. 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.
  1458. .. rst-class:: classref-item-separator
  1459. ----
  1460. .. _class_Window_method_remove_theme_font_size_override:
  1461. .. rst-class:: classref-method
  1462. |void| **remove_theme_font_size_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_font_size_override>`
  1463. 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.
  1464. .. rst-class:: classref-item-separator
  1465. ----
  1466. .. _class_Window_method_remove_theme_icon_override:
  1467. .. rst-class:: classref-method
  1468. |void| **remove_theme_icon_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_icon_override>`
  1469. 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.
  1470. .. rst-class:: classref-item-separator
  1471. ----
  1472. .. _class_Window_method_remove_theme_stylebox_override:
  1473. .. rst-class:: classref-method
  1474. |void| **remove_theme_stylebox_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_stylebox_override>`
  1475. 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.
  1476. .. rst-class:: classref-item-separator
  1477. ----
  1478. .. _class_Window_method_request_attention:
  1479. .. rst-class:: classref-method
  1480. |void| **request_attention**\ (\ ) :ref:`🔗<class_Window_method_request_attention>`
  1481. 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.
  1482. .. rst-class:: classref-item-separator
  1483. ----
  1484. .. _class_Window_method_reset_size:
  1485. .. rst-class:: classref-method
  1486. |void| **reset_size**\ (\ ) :ref:`🔗<class_Window_method_reset_size>`
  1487. 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).
  1488. .. rst-class:: classref-item-separator
  1489. ----
  1490. .. _class_Window_method_set_flag:
  1491. .. rst-class:: classref-method
  1492. |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_flag>`
  1493. Sets a specified window flag.
  1494. .. rst-class:: classref-item-separator
  1495. ----
  1496. .. _class_Window_method_set_ime_active:
  1497. .. rst-class:: classref-method
  1498. |void| **set_ime_active**\ (\ active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_ime_active>`
  1499. If ``active`` is ``true``, enables system's native IME (Input Method Editor).
  1500. .. rst-class:: classref-item-separator
  1501. ----
  1502. .. _class_Window_method_set_ime_position:
  1503. .. rst-class:: classref-method
  1504. |void| **set_ime_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Window_method_set_ime_position>`
  1505. Moves IME to the given position.
  1506. .. rst-class:: classref-item-separator
  1507. ----
  1508. .. _class_Window_method_set_layout_direction:
  1509. .. rst-class:: classref-method
  1510. |void| **set_layout_direction**\ (\ direction\: :ref:`LayoutDirection<enum_Window_LayoutDirection>`\ ) :ref:`🔗<class_Window_method_set_layout_direction>`
  1511. Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
  1512. .. rst-class:: classref-item-separator
  1513. ----
  1514. .. _class_Window_method_set_unparent_when_invisible:
  1515. .. rst-class:: classref-method
  1516. |void| **set_unparent_when_invisible**\ (\ unparent\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_unparent_when_invisible>`
  1517. If ``unparent`` is ``true``, the window is automatically unparented when going invisible.
  1518. \ **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.
  1519. .. rst-class:: classref-item-separator
  1520. ----
  1521. .. _class_Window_method_set_use_font_oversampling:
  1522. .. rst-class:: classref-method
  1523. |void| **set_use_font_oversampling**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_use_font_oversampling>`
  1524. Enables font oversampling. This makes fonts look better when they are scaled up.
  1525. .. rst-class:: classref-item-separator
  1526. ----
  1527. .. _class_Window_method_show:
  1528. .. rst-class:: classref-method
  1529. |void| **show**\ (\ ) :ref:`🔗<class_Window_method_show>`
  1530. 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>`).
  1531. .. rst-class:: classref-item-separator
  1532. ----
  1533. .. _class_Window_method_start_drag:
  1534. .. rst-class:: classref-method
  1535. |void| **start_drag**\ (\ ) :ref:`🔗<class_Window_method_start_drag>`
  1536. Starts an interactive drag operation on the window, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's title bar. Using this method allows the window to participate in space switching, tiling, and other system features.
  1537. .. rst-class:: classref-item-separator
  1538. ----
  1539. .. _class_Window_method_start_resize:
  1540. .. rst-class:: classref-method
  1541. |void| **start_resize**\ (\ edge\: :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>`\ ) :ref:`🔗<class_Window_method_start_resize>`
  1542. Starts an interactive resize operation on the window, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's edge.
  1543. .. rst-class:: classref-section-separator
  1544. ----
  1545. .. rst-class:: classref-descriptions-group
  1546. Theme Property Descriptions
  1547. ---------------------------
  1548. .. _class_Window_theme_color_title_color:
  1549. .. rst-class:: classref-themeproperty
  1550. :ref:`Color<class_Color>` **title_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_Window_theme_color_title_color>`
  1551. The color of the title's text.
  1552. .. rst-class:: classref-item-separator
  1553. ----
  1554. .. _class_Window_theme_color_title_outline_modulate:
  1555. .. rst-class:: classref-themeproperty
  1556. :ref:`Color<class_Color>` **title_outline_modulate** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Window_theme_color_title_outline_modulate>`
  1557. The color of the title's text outline.
  1558. .. rst-class:: classref-item-separator
  1559. ----
  1560. .. _class_Window_theme_constant_close_h_offset:
  1561. .. rst-class:: classref-themeproperty
  1562. :ref:`int<class_int>` **close_h_offset** = ``18`` :ref:`🔗<class_Window_theme_constant_close_h_offset>`
  1563. Horizontal position offset of the close button, relative to the end of the title bar, towards the beginning of the title bar.
  1564. .. rst-class:: classref-item-separator
  1565. ----
  1566. .. _class_Window_theme_constant_close_v_offset:
  1567. .. rst-class:: classref-themeproperty
  1568. :ref:`int<class_int>` **close_v_offset** = ``24`` :ref:`🔗<class_Window_theme_constant_close_v_offset>`
  1569. Vertical position offset of the close button, relative to the bottom of the title bar, towards the top of the title bar.
  1570. .. rst-class:: classref-item-separator
  1571. ----
  1572. .. _class_Window_theme_constant_resize_margin:
  1573. .. rst-class:: classref-themeproperty
  1574. :ref:`int<class_int>` **resize_margin** = ``4`` :ref:`🔗<class_Window_theme_constant_resize_margin>`
  1575. Defines the outside margin at which the window border can be grabbed with mouse and resized.
  1576. .. rst-class:: classref-item-separator
  1577. ----
  1578. .. _class_Window_theme_constant_title_height:
  1579. .. rst-class:: classref-themeproperty
  1580. :ref:`int<class_int>` **title_height** = ``36`` :ref:`🔗<class_Window_theme_constant_title_height>`
  1581. Height of the title bar.
  1582. .. rst-class:: classref-item-separator
  1583. ----
  1584. .. _class_Window_theme_constant_title_outline_size:
  1585. .. rst-class:: classref-themeproperty
  1586. :ref:`int<class_int>` **title_outline_size** = ``0`` :ref:`🔗<class_Window_theme_constant_title_outline_size>`
  1587. The size of the title outline.
  1588. .. rst-class:: classref-item-separator
  1589. ----
  1590. .. _class_Window_theme_font_title_font:
  1591. .. rst-class:: classref-themeproperty
  1592. :ref:`Font<class_Font>` **title_font** :ref:`🔗<class_Window_theme_font_title_font>`
  1593. The font used to draw the title.
  1594. .. rst-class:: classref-item-separator
  1595. ----
  1596. .. _class_Window_theme_font_size_title_font_size:
  1597. .. rst-class:: classref-themeproperty
  1598. :ref:`int<class_int>` **title_font_size** :ref:`🔗<class_Window_theme_font_size_title_font_size>`
  1599. The size of the title font.
  1600. .. rst-class:: classref-item-separator
  1601. ----
  1602. .. _class_Window_theme_icon_close:
  1603. .. rst-class:: classref-themeproperty
  1604. :ref:`Texture2D<class_Texture2D>` **close** :ref:`🔗<class_Window_theme_icon_close>`
  1605. The icon for the close button.
  1606. .. rst-class:: classref-item-separator
  1607. ----
  1608. .. _class_Window_theme_icon_close_pressed:
  1609. .. rst-class:: classref-themeproperty
  1610. :ref:`Texture2D<class_Texture2D>` **close_pressed** :ref:`🔗<class_Window_theme_icon_close_pressed>`
  1611. The icon for the close button when it's being pressed.
  1612. .. rst-class:: classref-item-separator
  1613. ----
  1614. .. _class_Window_theme_style_embedded_border:
  1615. .. rst-class:: classref-themeproperty
  1616. :ref:`StyleBox<class_StyleBox>` **embedded_border** :ref:`🔗<class_Window_theme_style_embedded_border>`
  1617. 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>`.
  1618. \ **Note:** The content background will not be visible unless :ref:`transparent<class_Window_property_transparent>` is enabled.
  1619. .. rst-class:: classref-item-separator
  1620. ----
  1621. .. _class_Window_theme_style_embedded_unfocused_border:
  1622. .. rst-class:: classref-themeproperty
  1623. :ref:`StyleBox<class_StyleBox>` **embedded_unfocused_border** :ref:`🔗<class_Window_theme_style_embedded_unfocused_border>`
  1624. The background style used when the **Window** is embedded and unfocused.
  1625. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1626. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  1627. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1628. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1629. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1630. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1631. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1632. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  1633. .. |void| replace:: :abbr:`void (No return value.)`