class_window.rst 149 KB

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