class_window.rst 158 KB

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