class_codeedit.rst 143 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287
  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/CodeEdit.xml.
  6. .. _class_CodeEdit:
  7. CodeEdit
  8. ========
  9. **Inherits:** :ref:`TextEdit<class_TextEdit>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A multiline text editor designed for editing code.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. CodeEdit is a specialized :ref:`TextEdit<class_TextEdit>` designed for editing plain text code files. It has many features commonly found in code editors such as line numbers, line folding, code completion, indent management, and string/comment management.
  15. \ **Note:** Regardless of locale, **CodeEdit** will by default always use left-to-right text direction to correctly display source code.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`auto_brace_completion_enabled<class_CodeEdit_property_auto_brace_completion_enabled>` | ``false`` |
  23. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  24. | :ref:`bool<class_bool>` | :ref:`auto_brace_completion_highlight_matching<class_CodeEdit_property_auto_brace_completion_highlight_matching>` | ``false`` |
  25. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  26. | :ref:`Dictionary<class_Dictionary>` | :ref:`auto_brace_completion_pairs<class_CodeEdit_property_auto_brace_completion_pairs>` | ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }`` |
  27. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`code_completion_enabled<class_CodeEdit_property_code_completion_enabled>` | ``false`` |
  29. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  30. | :ref:`String[]<class_String>` | :ref:`code_completion_prefixes<class_CodeEdit_property_code_completion_prefixes>` | ``[]`` |
  31. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  32. | :ref:`String[]<class_String>` | :ref:`delimiter_comments<class_CodeEdit_property_delimiter_comments>` | ``[]`` |
  33. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  34. | :ref:`String[]<class_String>` | :ref:`delimiter_strings<class_CodeEdit_property_delimiter_strings>` | ``["' '", "\" \""]`` |
  35. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  36. | :ref:`bool<class_bool>` | :ref:`gutters_draw_bookmarks<class_CodeEdit_property_gutters_draw_bookmarks>` | ``false`` |
  37. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  38. | :ref:`bool<class_bool>` | :ref:`gutters_draw_breakpoints_gutter<class_CodeEdit_property_gutters_draw_breakpoints_gutter>` | ``false`` |
  39. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  40. | :ref:`bool<class_bool>` | :ref:`gutters_draw_executing_lines<class_CodeEdit_property_gutters_draw_executing_lines>` | ``false`` |
  41. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  42. | :ref:`bool<class_bool>` | :ref:`gutters_draw_fold_gutter<class_CodeEdit_property_gutters_draw_fold_gutter>` | ``false`` |
  43. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  44. | :ref:`bool<class_bool>` | :ref:`gutters_draw_line_numbers<class_CodeEdit_property_gutters_draw_line_numbers>` | ``false`` |
  45. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  46. | :ref:`bool<class_bool>` | :ref:`gutters_zero_pad_line_numbers<class_CodeEdit_property_gutters_zero_pad_line_numbers>` | ``false`` |
  47. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  48. | :ref:`bool<class_bool>` | :ref:`indent_automatic<class_CodeEdit_property_indent_automatic>` | ``false`` |
  49. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  50. | :ref:`String[]<class_String>` | :ref:`indent_automatic_prefixes<class_CodeEdit_property_indent_automatic_prefixes>` | ``[":", "{", "[", "("]`` |
  51. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  52. | :ref:`int<class_int>` | :ref:`indent_size<class_CodeEdit_property_indent_size>` | ``4`` |
  53. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  54. | :ref:`bool<class_bool>` | :ref:`indent_use_spaces<class_CodeEdit_property_indent_use_spaces>` | ``false`` |
  55. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  56. | :ref:`LayoutDirection<enum_Control_LayoutDirection>` | layout_direction | ``2`` (overrides :ref:`Control<class_Control_property_layout_direction>`) |
  57. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  58. | :ref:`bool<class_bool>` | :ref:`line_folding<class_CodeEdit_property_line_folding>` | ``false`` |
  59. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  60. | :ref:`int[]<class_int>` | :ref:`line_length_guidelines<class_CodeEdit_property_line_length_guidelines>` | ``[]`` |
  61. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  62. | :ref:`bool<class_bool>` | :ref:`symbol_lookup_on_click<class_CodeEdit_property_symbol_lookup_on_click>` | ``false`` |
  63. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  64. | :ref:`TextDirection<enum_Control_TextDirection>` | text_direction | ``1`` (overrides :ref:`TextEdit<class_TextEdit_property_text_direction>`) |
  65. +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  66. .. rst-class:: classref-reftable-group
  67. Methods
  68. -------
  69. .. table::
  70. :widths: auto
  71. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | void | :ref:`_confirm_code_completion<class_CodeEdit_method__confirm_code_completion>` **(** :ref:`bool<class_bool>` replace **)** |virtual| |
  73. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_filter_code_completion_candidates<class_CodeEdit_method__filter_code_completion_candidates>` **(** :ref:`Dictionary[]<class_Dictionary>` candidates **)** |virtual| |const| |
  75. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | void | :ref:`_request_code_completion<class_CodeEdit_method__request_code_completion>` **(** :ref:`bool<class_bool>` force **)** |virtual| |
  77. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | void | :ref:`add_auto_brace_completion_pair<class_CodeEdit_method_add_auto_brace_completion_pair>` **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key **)** |
  79. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | void | :ref:`add_code_completion_option<class_CodeEdit_method_add_code_completion_option>` **(** :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` type, :ref:`String<class_String>` display_text, :ref:`String<class_String>` insert_text, :ref:`Color<class_Color>` text_color=Color(1, 1, 1, 1), :ref:`Resource<class_Resource>` icon=null, :ref:`Variant<class_Variant>` value=0, :ref:`int<class_int>` location=1024 **)** |
  81. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | void | :ref:`add_comment_delimiter<class_CodeEdit_method_add_comment_delimiter>` **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key, :ref:`bool<class_bool>` line_only=false **)** |
  83. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | void | :ref:`add_string_delimiter<class_CodeEdit_method_add_string_delimiter>` **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key, :ref:`bool<class_bool>` line_only=false **)** |
  85. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`bool<class_bool>` | :ref:`can_fold_line<class_CodeEdit_method_can_fold_line>` **(** :ref:`int<class_int>` line **)** |const| |
  87. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | void | :ref:`cancel_code_completion<class_CodeEdit_method_cancel_code_completion>` **(** **)** |
  89. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | void | :ref:`clear_bookmarked_lines<class_CodeEdit_method_clear_bookmarked_lines>` **(** **)** |
  91. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | void | :ref:`clear_breakpointed_lines<class_CodeEdit_method_clear_breakpointed_lines>` **(** **)** |
  93. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | void | :ref:`clear_comment_delimiters<class_CodeEdit_method_clear_comment_delimiters>` **(** **)** |
  95. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | void | :ref:`clear_executing_lines<class_CodeEdit_method_clear_executing_lines>` **(** **)** |
  97. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | void | :ref:`clear_string_delimiters<class_CodeEdit_method_clear_string_delimiters>` **(** **)** |
  99. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | void | :ref:`confirm_code_completion<class_CodeEdit_method_confirm_code_completion>` **(** :ref:`bool<class_bool>` replace=false **)** |
  101. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | void | :ref:`convert_indent<class_CodeEdit_method_convert_indent>` **(** :ref:`int<class_int>` from_line=-1, :ref:`int<class_int>` to_line=-1 **)** |
  103. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | void | :ref:`create_code_region<class_CodeEdit_method_create_code_region>` **(** **)** |
  105. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | void | :ref:`do_indent<class_CodeEdit_method_do_indent>` **(** **)** |
  107. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | void | :ref:`fold_all_lines<class_CodeEdit_method_fold_all_lines>` **(** **)** |
  109. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | void | :ref:`fold_line<class_CodeEdit_method_fold_line>` **(** :ref:`int<class_int>` line **)** |
  111. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`String<class_String>` | :ref:`get_auto_brace_completion_close_key<class_CodeEdit_method_get_auto_brace_completion_close_key>` **(** :ref:`String<class_String>` open_key **)** |const| |
  113. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_bookmarked_lines<class_CodeEdit_method_get_bookmarked_lines>` **(** **)** |const| |
  115. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_breakpointed_lines<class_CodeEdit_method_get_breakpointed_lines>` **(** **)** |const| |
  117. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`Dictionary<class_Dictionary>` | :ref:`get_code_completion_option<class_CodeEdit_method_get_code_completion_option>` **(** :ref:`int<class_int>` index **)** |const| |
  119. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_code_completion_options<class_CodeEdit_method_get_code_completion_options>` **(** **)** |const| |
  121. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`int<class_int>` | :ref:`get_code_completion_selected_index<class_CodeEdit_method_get_code_completion_selected_index>` **(** **)** |const| |
  123. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`String<class_String>` | :ref:`get_code_region_end_tag<class_CodeEdit_method_get_code_region_end_tag>` **(** **)** |const| |
  125. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`String<class_String>` | :ref:`get_code_region_start_tag<class_CodeEdit_method_get_code_region_start_tag>` **(** **)** |const| |
  127. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`String<class_String>` | :ref:`get_delimiter_end_key<class_CodeEdit_method_get_delimiter_end_key>` **(** :ref:`int<class_int>` delimiter_index **)** |const| |
  129. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`Vector2<class_Vector2>` | :ref:`get_delimiter_end_position<class_CodeEdit_method_get_delimiter_end_position>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| |
  131. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`String<class_String>` | :ref:`get_delimiter_start_key<class_CodeEdit_method_get_delimiter_start_key>` **(** :ref:`int<class_int>` delimiter_index **)** |const| |
  133. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`Vector2<class_Vector2>` | :ref:`get_delimiter_start_position<class_CodeEdit_method_get_delimiter_start_position>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| |
  135. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_executing_lines<class_CodeEdit_method_get_executing_lines>` **(** **)** |const| |
  137. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`int[]<class_int>` | :ref:`get_folded_lines<class_CodeEdit_method_get_folded_lines>` **(** **)** |const| |
  139. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`String<class_String>` | :ref:`get_text_for_code_completion<class_CodeEdit_method_get_text_for_code_completion>` **(** **)** |const| |
  141. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :ref:`String<class_String>` | :ref:`get_text_for_symbol_lookup<class_CodeEdit_method_get_text_for_symbol_lookup>` **(** **)** |const| |
  143. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :ref:`String<class_String>` | :ref:`get_text_with_cursor_char<class_CodeEdit_method_get_text_with_cursor_char>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| |
  145. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :ref:`bool<class_bool>` | :ref:`has_auto_brace_completion_close_key<class_CodeEdit_method_has_auto_brace_completion_close_key>` **(** :ref:`String<class_String>` close_key **)** |const| |
  147. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`bool<class_bool>` | :ref:`has_auto_brace_completion_open_key<class_CodeEdit_method_has_auto_brace_completion_open_key>` **(** :ref:`String<class_String>` open_key **)** |const| |
  149. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`bool<class_bool>` | :ref:`has_comment_delimiter<class_CodeEdit_method_has_comment_delimiter>` **(** :ref:`String<class_String>` start_key **)** |const| |
  151. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`bool<class_bool>` | :ref:`has_string_delimiter<class_CodeEdit_method_has_string_delimiter>` **(** :ref:`String<class_String>` start_key **)** |const| |
  153. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | void | :ref:`indent_lines<class_CodeEdit_method_indent_lines>` **(** **)** |
  155. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | :ref:`int<class_int>` | :ref:`is_in_comment<class_CodeEdit_method_is_in_comment>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column=-1 **)** |const| |
  157. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | :ref:`int<class_int>` | :ref:`is_in_string<class_CodeEdit_method_is_in_string>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column=-1 **)** |const| |
  159. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | :ref:`bool<class_bool>` | :ref:`is_line_bookmarked<class_CodeEdit_method_is_line_bookmarked>` **(** :ref:`int<class_int>` line **)** |const| |
  161. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | :ref:`bool<class_bool>` | :ref:`is_line_breakpointed<class_CodeEdit_method_is_line_breakpointed>` **(** :ref:`int<class_int>` line **)** |const| |
  163. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | :ref:`bool<class_bool>` | :ref:`is_line_code_region_end<class_CodeEdit_method_is_line_code_region_end>` **(** :ref:`int<class_int>` line **)** |const| |
  165. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | :ref:`bool<class_bool>` | :ref:`is_line_code_region_start<class_CodeEdit_method_is_line_code_region_start>` **(** :ref:`int<class_int>` line **)** |const| |
  167. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | :ref:`bool<class_bool>` | :ref:`is_line_executing<class_CodeEdit_method_is_line_executing>` **(** :ref:`int<class_int>` line **)** |const| |
  169. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | :ref:`bool<class_bool>` | :ref:`is_line_folded<class_CodeEdit_method_is_line_folded>` **(** :ref:`int<class_int>` line **)** |const| |
  171. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | void | :ref:`remove_comment_delimiter<class_CodeEdit_method_remove_comment_delimiter>` **(** :ref:`String<class_String>` start_key **)** |
  173. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | void | :ref:`remove_string_delimiter<class_CodeEdit_method_remove_string_delimiter>` **(** :ref:`String<class_String>` start_key **)** |
  175. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | void | :ref:`request_code_completion<class_CodeEdit_method_request_code_completion>` **(** :ref:`bool<class_bool>` force=false **)** |
  177. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | void | :ref:`set_code_completion_selected_index<class_CodeEdit_method_set_code_completion_selected_index>` **(** :ref:`int<class_int>` index **)** |
  179. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | void | :ref:`set_code_hint<class_CodeEdit_method_set_code_hint>` **(** :ref:`String<class_String>` code_hint **)** |
  181. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | void | :ref:`set_code_hint_draw_below<class_CodeEdit_method_set_code_hint_draw_below>` **(** :ref:`bool<class_bool>` draw_below **)** |
  183. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | void | :ref:`set_code_region_tags<class_CodeEdit_method_set_code_region_tags>` **(** :ref:`String<class_String>` start="region", :ref:`String<class_String>` end="endregion" **)** |
  185. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | void | :ref:`set_line_as_bookmarked<class_CodeEdit_method_set_line_as_bookmarked>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` bookmarked **)** |
  187. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | void | :ref:`set_line_as_breakpoint<class_CodeEdit_method_set_line_as_breakpoint>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` breakpointed **)** |
  189. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | void | :ref:`set_line_as_executing<class_CodeEdit_method_set_line_as_executing>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` executing **)** |
  191. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | void | :ref:`set_symbol_lookup_word_as_valid<class_CodeEdit_method_set_symbol_lookup_word_as_valid>` **(** :ref:`bool<class_bool>` valid **)** |
  193. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | void | :ref:`toggle_foldable_line<class_CodeEdit_method_toggle_foldable_line>` **(** :ref:`int<class_int>` line **)** |
  195. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | void | :ref:`unfold_all_lines<class_CodeEdit_method_unfold_all_lines>` **(** **)** |
  197. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | void | :ref:`unfold_line<class_CodeEdit_method_unfold_line>` **(** :ref:`int<class_int>` line **)** |
  199. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | void | :ref:`unindent_lines<class_CodeEdit_method_unindent_lines>` **(** **)** |
  201. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | void | :ref:`update_code_completion_options<class_CodeEdit_method_update_code_completion_options>` **(** :ref:`bool<class_bool>` force **)** |
  203. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. .. rst-class:: classref-reftable-group
  205. Theme Properties
  206. ----------------
  207. .. table::
  208. :widths: auto
  209. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  210. | :ref:`Color<class_Color>` | :ref:`background_color<class_CodeEdit_theme_color_background_color>` | ``Color(0, 0, 0, 0)`` |
  211. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  212. | :ref:`Color<class_Color>` | :ref:`bookmark_color<class_CodeEdit_theme_color_bookmark_color>` | ``Color(0.5, 0.64, 1, 0.8)`` |
  213. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  214. | :ref:`Color<class_Color>` | :ref:`brace_mismatch_color<class_CodeEdit_theme_color_brace_mismatch_color>` | ``Color(1, 0.2, 0.2, 1)`` |
  215. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  216. | :ref:`Color<class_Color>` | :ref:`breakpoint_color<class_CodeEdit_theme_color_breakpoint_color>` | ``Color(0.9, 0.29, 0.3, 1)`` |
  217. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  218. | :ref:`Color<class_Color>` | :ref:`caret_background_color<class_CodeEdit_theme_color_caret_background_color>` | ``Color(0, 0, 0, 1)`` |
  219. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  220. | :ref:`Color<class_Color>` | :ref:`caret_color<class_CodeEdit_theme_color_caret_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  221. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  222. | :ref:`Color<class_Color>` | :ref:`code_folding_color<class_CodeEdit_theme_color_code_folding_color>` | ``Color(0.8, 0.8, 0.8, 0.8)`` |
  223. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  224. | :ref:`Color<class_Color>` | :ref:`completion_background_color<class_CodeEdit_theme_color_completion_background_color>` | ``Color(0.17, 0.16, 0.2, 1)`` |
  225. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  226. | :ref:`Color<class_Color>` | :ref:`completion_existing_color<class_CodeEdit_theme_color_completion_existing_color>` | ``Color(0.87, 0.87, 0.87, 0.13)`` |
  227. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  228. | :ref:`Color<class_Color>` | :ref:`completion_font_color<class_CodeEdit_theme_color_completion_font_color>` | ``Color(0.67, 0.67, 0.67, 1)`` |
  229. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  230. | :ref:`Color<class_Color>` | :ref:`completion_scroll_color<class_CodeEdit_theme_color_completion_scroll_color>` | ``Color(1, 1, 1, 0.29)`` |
  231. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  232. | :ref:`Color<class_Color>` | :ref:`completion_scroll_hovered_color<class_CodeEdit_theme_color_completion_scroll_hovered_color>` | ``Color(1, 1, 1, 0.4)`` |
  233. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  234. | :ref:`Color<class_Color>` | :ref:`completion_selected_color<class_CodeEdit_theme_color_completion_selected_color>` | ``Color(0.26, 0.26, 0.27, 1)`` |
  235. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  236. | :ref:`Color<class_Color>` | :ref:`current_line_color<class_CodeEdit_theme_color_current_line_color>` | ``Color(0.25, 0.25, 0.26, 0.8)`` |
  237. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  238. | :ref:`Color<class_Color>` | :ref:`executing_line_color<class_CodeEdit_theme_color_executing_line_color>` | ``Color(0.98, 0.89, 0.27, 1)`` |
  239. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  240. | :ref:`Color<class_Color>` | :ref:`folded_code_region_color<class_CodeEdit_theme_color_folded_code_region_color>` | ``Color(0.68, 0.46, 0.77, 0.2)`` |
  241. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  242. | :ref:`Color<class_Color>` | :ref:`font_color<class_CodeEdit_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  243. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  244. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_CodeEdit_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
  245. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  246. | :ref:`Color<class_Color>` | :ref:`font_placeholder_color<class_CodeEdit_theme_color_font_placeholder_color>` | ``Color(0.875, 0.875, 0.875, 0.6)`` |
  247. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  248. | :ref:`Color<class_Color>` | :ref:`font_readonly_color<class_CodeEdit_theme_color_font_readonly_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
  249. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  250. | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_CodeEdit_theme_color_font_selected_color>` | ``Color(0, 0, 0, 0)`` |
  251. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  252. | :ref:`Color<class_Color>` | :ref:`line_length_guideline_color<class_CodeEdit_theme_color_line_length_guideline_color>` | ``Color(0.3, 0.5, 0.8, 0.1)`` |
  253. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  254. | :ref:`Color<class_Color>` | :ref:`line_number_color<class_CodeEdit_theme_color_line_number_color>` | ``Color(0.67, 0.67, 0.67, 0.4)`` |
  255. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  256. | :ref:`Color<class_Color>` | :ref:`search_result_border_color<class_CodeEdit_theme_color_search_result_border_color>` | ``Color(0.3, 0.3, 0.3, 0.4)`` |
  257. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  258. | :ref:`Color<class_Color>` | :ref:`search_result_color<class_CodeEdit_theme_color_search_result_color>` | ``Color(0.3, 0.3, 0.3, 1)`` |
  259. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  260. | :ref:`Color<class_Color>` | :ref:`selection_color<class_CodeEdit_theme_color_selection_color>` | ``Color(0.5, 0.5, 0.5, 1)`` |
  261. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  262. | :ref:`Color<class_Color>` | :ref:`word_highlighted_color<class_CodeEdit_theme_color_word_highlighted_color>` | ``Color(0.8, 0.9, 0.9, 0.15)`` |
  263. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  264. | :ref:`int<class_int>` | :ref:`completion_lines<class_CodeEdit_theme_constant_completion_lines>` | ``7`` |
  265. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  266. | :ref:`int<class_int>` | :ref:`completion_max_width<class_CodeEdit_theme_constant_completion_max_width>` | ``50`` |
  267. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  268. | :ref:`int<class_int>` | :ref:`completion_scroll_width<class_CodeEdit_theme_constant_completion_scroll_width>` | ``6`` |
  269. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  270. | :ref:`int<class_int>` | :ref:`line_spacing<class_CodeEdit_theme_constant_line_spacing>` | ``4`` |
  271. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  272. | :ref:`int<class_int>` | :ref:`outline_size<class_CodeEdit_theme_constant_outline_size>` | ``0`` |
  273. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  274. | :ref:`Font<class_Font>` | :ref:`font<class_CodeEdit_theme_font_font>` | |
  275. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  276. | :ref:`int<class_int>` | :ref:`font_size<class_CodeEdit_theme_font_size_font_size>` | |
  277. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  278. | :ref:`Texture2D<class_Texture2D>` | :ref:`bookmark<class_CodeEdit_theme_icon_bookmark>` | |
  279. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  280. | :ref:`Texture2D<class_Texture2D>` | :ref:`breakpoint<class_CodeEdit_theme_icon_breakpoint>` | |
  281. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  282. | :ref:`Texture2D<class_Texture2D>` | :ref:`can_fold<class_CodeEdit_theme_icon_can_fold>` | |
  283. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  284. | :ref:`Texture2D<class_Texture2D>` | :ref:`can_fold_code_region<class_CodeEdit_theme_icon_can_fold_code_region>` | |
  285. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  286. | :ref:`Texture2D<class_Texture2D>` | :ref:`executing_line<class_CodeEdit_theme_icon_executing_line>` | |
  287. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  288. | :ref:`Texture2D<class_Texture2D>` | :ref:`folded<class_CodeEdit_theme_icon_folded>` | |
  289. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  290. | :ref:`Texture2D<class_Texture2D>` | :ref:`folded_code_region<class_CodeEdit_theme_icon_folded_code_region>` | |
  291. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  292. | :ref:`Texture2D<class_Texture2D>` | :ref:`folded_eol_icon<class_CodeEdit_theme_icon_folded_eol_icon>` | |
  293. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  294. | :ref:`Texture2D<class_Texture2D>` | :ref:`space<class_CodeEdit_theme_icon_space>` | |
  295. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  296. | :ref:`Texture2D<class_Texture2D>` | :ref:`tab<class_CodeEdit_theme_icon_tab>` | |
  297. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  298. | :ref:`StyleBox<class_StyleBox>` | :ref:`completion<class_CodeEdit_theme_style_completion>` | |
  299. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  300. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_CodeEdit_theme_style_focus>` | |
  301. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  302. | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_CodeEdit_theme_style_normal>` | |
  303. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  304. | :ref:`StyleBox<class_StyleBox>` | :ref:`read_only<class_CodeEdit_theme_style_read_only>` | |
  305. +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
  306. .. rst-class:: classref-section-separator
  307. ----
  308. .. rst-class:: classref-descriptions-group
  309. Signals
  310. -------
  311. .. _class_CodeEdit_signal_breakpoint_toggled:
  312. .. rst-class:: classref-signal
  313. **breakpoint_toggled** **(** :ref:`int<class_int>` line **)**
  314. Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line.
  315. .. rst-class:: classref-item-separator
  316. ----
  317. .. _class_CodeEdit_signal_code_completion_requested:
  318. .. rst-class:: classref-signal
  319. **code_completion_requested** **(** **)**
  320. Emitted when the user requests code completion.
  321. .. rst-class:: classref-item-separator
  322. ----
  323. .. _class_CodeEdit_signal_symbol_lookup:
  324. .. rst-class:: classref-signal
  325. **symbol_lookup** **(** :ref:`String<class_String>` symbol, :ref:`int<class_int>` line, :ref:`int<class_int>` column **)**
  326. Emitted when the user has clicked on a valid symbol.
  327. .. rst-class:: classref-item-separator
  328. ----
  329. .. _class_CodeEdit_signal_symbol_validate:
  330. .. rst-class:: classref-signal
  331. **symbol_validate** **(** :ref:`String<class_String>` symbol **)**
  332. Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling :ref:`set_symbol_lookup_word_as_valid<class_CodeEdit_method_set_symbol_lookup_word_as_valid>`.
  333. .. rst-class:: classref-section-separator
  334. ----
  335. .. rst-class:: classref-descriptions-group
  336. Enumerations
  337. ------------
  338. .. _enum_CodeEdit_CodeCompletionKind:
  339. .. rst-class:: classref-enumeration
  340. enum **CodeCompletionKind**:
  341. .. _class_CodeEdit_constant_KIND_CLASS:
  342. .. rst-class:: classref-enumeration-constant
  343. :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_CLASS** = ``0``
  344. Marks the option as a class.
  345. .. _class_CodeEdit_constant_KIND_FUNCTION:
  346. .. rst-class:: classref-enumeration-constant
  347. :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_FUNCTION** = ``1``
  348. Marks the option as a function.
  349. .. _class_CodeEdit_constant_KIND_SIGNAL:
  350. .. rst-class:: classref-enumeration-constant
  351. :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_SIGNAL** = ``2``
  352. Marks the option as a Godot signal.
  353. .. _class_CodeEdit_constant_KIND_VARIABLE:
  354. .. rst-class:: classref-enumeration-constant
  355. :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_VARIABLE** = ``3``
  356. Marks the option as a variable.
  357. .. _class_CodeEdit_constant_KIND_MEMBER:
  358. .. rst-class:: classref-enumeration-constant
  359. :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_MEMBER** = ``4``
  360. Marks the option as a member.
  361. .. _class_CodeEdit_constant_KIND_ENUM:
  362. .. rst-class:: classref-enumeration-constant
  363. :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_ENUM** = ``5``
  364. Marks the option as an enum entry.
  365. .. _class_CodeEdit_constant_KIND_CONSTANT:
  366. .. rst-class:: classref-enumeration-constant
  367. :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_CONSTANT** = ``6``
  368. Marks the option as a constant.
  369. .. _class_CodeEdit_constant_KIND_NODE_PATH:
  370. .. rst-class:: classref-enumeration-constant
  371. :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_NODE_PATH** = ``7``
  372. Marks the option as a Godot node path.
  373. .. _class_CodeEdit_constant_KIND_FILE_PATH:
  374. .. rst-class:: classref-enumeration-constant
  375. :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_FILE_PATH** = ``8``
  376. Marks the option as a file path.
  377. .. _class_CodeEdit_constant_KIND_PLAIN_TEXT:
  378. .. rst-class:: classref-enumeration-constant
  379. :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_PLAIN_TEXT** = ``9``
  380. Marks the option as unclassified or plain text.
  381. .. rst-class:: classref-item-separator
  382. ----
  383. .. _enum_CodeEdit_CodeCompletionLocation:
  384. .. rst-class:: classref-enumeration
  385. enum **CodeCompletionLocation**:
  386. .. _class_CodeEdit_constant_LOCATION_LOCAL:
  387. .. rst-class:: classref-enumeration-constant
  388. :ref:`CodeCompletionLocation<enum_CodeEdit_CodeCompletionLocation>` **LOCATION_LOCAL** = ``0``
  389. The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes).
  390. .. _class_CodeEdit_constant_LOCATION_PARENT_MASK:
  391. .. rst-class:: classref-enumeration-constant
  392. :ref:`CodeCompletionLocation<enum_CodeEdit_CodeCompletionLocation>` **LOCATION_PARENT_MASK** = ``256``
  393. The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in the class or a parent class.
  394. .. _class_CodeEdit_constant_LOCATION_OTHER_USER_CODE:
  395. .. rst-class:: classref-enumeration-constant
  396. :ref:`CodeCompletionLocation<enum_CodeEdit_CodeCompletionLocation>` **LOCATION_OTHER_USER_CODE** = ``512``
  397. The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons).
  398. .. _class_CodeEdit_constant_LOCATION_OTHER:
  399. .. rst-class:: classref-enumeration-constant
  400. :ref:`CodeCompletionLocation<enum_CodeEdit_CodeCompletionLocation>` **LOCATION_OTHER** = ``1024``
  401. The option is from other engine code, not covered by the other enum constants - e.g. built-in classes.
  402. .. rst-class:: classref-section-separator
  403. ----
  404. .. rst-class:: classref-descriptions-group
  405. Property Descriptions
  406. ---------------------
  407. .. _class_CodeEdit_property_auto_brace_completion_enabled:
  408. .. rst-class:: classref-property
  409. :ref:`bool<class_bool>` **auto_brace_completion_enabled** = ``false``
  410. .. rst-class:: classref-property-setget
  411. - void **set_auto_brace_completion_enabled** **(** :ref:`bool<class_bool>` value **)**
  412. - :ref:`bool<class_bool>` **is_auto_brace_completion_enabled** **(** **)**
  413. Sets whether brace pairs should be autocompleted.
  414. .. rst-class:: classref-item-separator
  415. ----
  416. .. _class_CodeEdit_property_auto_brace_completion_highlight_matching:
  417. .. rst-class:: classref-property
  418. :ref:`bool<class_bool>` **auto_brace_completion_highlight_matching** = ``false``
  419. .. rst-class:: classref-property-setget
  420. - void **set_highlight_matching_braces_enabled** **(** :ref:`bool<class_bool>` value **)**
  421. - :ref:`bool<class_bool>` **is_highlight_matching_braces_enabled** **(** **)**
  422. Highlight mismatching brace pairs.
  423. .. rst-class:: classref-item-separator
  424. ----
  425. .. _class_CodeEdit_property_auto_brace_completion_pairs:
  426. .. rst-class:: classref-property
  427. :ref:`Dictionary<class_Dictionary>` **auto_brace_completion_pairs** = ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }``
  428. .. rst-class:: classref-property-setget
  429. - void **set_auto_brace_completion_pairs** **(** :ref:`Dictionary<class_Dictionary>` value **)**
  430. - :ref:`Dictionary<class_Dictionary>` **get_auto_brace_completion_pairs** **(** **)**
  431. Sets the brace pairs to be autocompleted.
  432. .. rst-class:: classref-item-separator
  433. ----
  434. .. _class_CodeEdit_property_code_completion_enabled:
  435. .. rst-class:: classref-property
  436. :ref:`bool<class_bool>` **code_completion_enabled** = ``false``
  437. .. rst-class:: classref-property-setget
  438. - void **set_code_completion_enabled** **(** :ref:`bool<class_bool>` value **)**
  439. - :ref:`bool<class_bool>` **is_code_completion_enabled** **(** **)**
  440. Sets whether code completion is allowed.
  441. .. rst-class:: classref-item-separator
  442. ----
  443. .. _class_CodeEdit_property_code_completion_prefixes:
  444. .. rst-class:: classref-property
  445. :ref:`String[]<class_String>` **code_completion_prefixes** = ``[]``
  446. .. rst-class:: classref-property-setget
  447. - void **set_code_completion_prefixes** **(** :ref:`String[]<class_String>` value **)**
  448. - :ref:`String[]<class_String>` **get_code_completion_prefixes** **(** **)**
  449. Sets prefixes that will trigger code completion.
  450. .. rst-class:: classref-item-separator
  451. ----
  452. .. _class_CodeEdit_property_delimiter_comments:
  453. .. rst-class:: classref-property
  454. :ref:`String[]<class_String>` **delimiter_comments** = ``[]``
  455. .. rst-class:: classref-property-setget
  456. - void **set_comment_delimiters** **(** :ref:`String[]<class_String>` value **)**
  457. - :ref:`String[]<class_String>` **get_comment_delimiters** **(** **)**
  458. Sets the comment delimiters. All existing comment delimiters will be removed.
  459. .. rst-class:: classref-item-separator
  460. ----
  461. .. _class_CodeEdit_property_delimiter_strings:
  462. .. rst-class:: classref-property
  463. :ref:`String[]<class_String>` **delimiter_strings** = ``["' '", "\" \""]``
  464. .. rst-class:: classref-property-setget
  465. - void **set_string_delimiters** **(** :ref:`String[]<class_String>` value **)**
  466. - :ref:`String[]<class_String>` **get_string_delimiters** **(** **)**
  467. Sets the string delimiters. All existing string delimiters will be removed.
  468. .. rst-class:: classref-item-separator
  469. ----
  470. .. _class_CodeEdit_property_gutters_draw_bookmarks:
  471. .. rst-class:: classref-property
  472. :ref:`bool<class_bool>` **gutters_draw_bookmarks** = ``false``
  473. .. rst-class:: classref-property-setget
  474. - void **set_draw_bookmarks_gutter** **(** :ref:`bool<class_bool>` value **)**
  475. - :ref:`bool<class_bool>` **is_drawing_bookmarks_gutter** **(** **)**
  476. Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines.
  477. .. rst-class:: classref-item-separator
  478. ----
  479. .. _class_CodeEdit_property_gutters_draw_breakpoints_gutter:
  480. .. rst-class:: classref-property
  481. :ref:`bool<class_bool>` **gutters_draw_breakpoints_gutter** = ``false``
  482. .. rst-class:: classref-property-setget
  483. - void **set_draw_breakpoints_gutter** **(** :ref:`bool<class_bool>` value **)**
  484. - :ref:`bool<class_bool>` **is_drawing_breakpoints_gutter** **(** **)**
  485. Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines.
  486. .. rst-class:: classref-item-separator
  487. ----
  488. .. _class_CodeEdit_property_gutters_draw_executing_lines:
  489. .. rst-class:: classref-property
  490. :ref:`bool<class_bool>` **gutters_draw_executing_lines** = ``false``
  491. .. rst-class:: classref-property-setget
  492. - void **set_draw_executing_lines_gutter** **(** :ref:`bool<class_bool>` value **)**
  493. - :ref:`bool<class_bool>` **is_drawing_executing_lines_gutter** **(** **)**
  494. Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines.
  495. .. rst-class:: classref-item-separator
  496. ----
  497. .. _class_CodeEdit_property_gutters_draw_fold_gutter:
  498. .. rst-class:: classref-property
  499. :ref:`bool<class_bool>` **gutters_draw_fold_gutter** = ``false``
  500. .. rst-class:: classref-property-setget
  501. - void **set_draw_fold_gutter** **(** :ref:`bool<class_bool>` value **)**
  502. - :ref:`bool<class_bool>` **is_drawing_fold_gutter** **(** **)**
  503. Sets if foldable lines icons should be drawn in the gutter.
  504. .. rst-class:: classref-item-separator
  505. ----
  506. .. _class_CodeEdit_property_gutters_draw_line_numbers:
  507. .. rst-class:: classref-property
  508. :ref:`bool<class_bool>` **gutters_draw_line_numbers** = ``false``
  509. .. rst-class:: classref-property-setget
  510. - void **set_draw_line_numbers** **(** :ref:`bool<class_bool>` value **)**
  511. - :ref:`bool<class_bool>` **is_draw_line_numbers_enabled** **(** **)**
  512. Sets if line numbers should be drawn in the gutter.
  513. .. rst-class:: classref-item-separator
  514. ----
  515. .. _class_CodeEdit_property_gutters_zero_pad_line_numbers:
  516. .. rst-class:: classref-property
  517. :ref:`bool<class_bool>` **gutters_zero_pad_line_numbers** = ``false``
  518. .. rst-class:: classref-property-setget
  519. - void **set_line_numbers_zero_padded** **(** :ref:`bool<class_bool>` value **)**
  520. - :ref:`bool<class_bool>` **is_line_numbers_zero_padded** **(** **)**
  521. Sets if line numbers drawn in the gutter are zero padded.
  522. .. rst-class:: classref-item-separator
  523. ----
  524. .. _class_CodeEdit_property_indent_automatic:
  525. .. rst-class:: classref-property
  526. :ref:`bool<class_bool>` **indent_automatic** = ``false``
  527. .. rst-class:: classref-property-setget
  528. - void **set_auto_indent_enabled** **(** :ref:`bool<class_bool>` value **)**
  529. - :ref:`bool<class_bool>` **is_auto_indent_enabled** **(** **)**
  530. Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found.
  531. .. rst-class:: classref-item-separator
  532. ----
  533. .. _class_CodeEdit_property_indent_automatic_prefixes:
  534. .. rst-class:: classref-property
  535. :ref:`String[]<class_String>` **indent_automatic_prefixes** = ``[":", "{", "[", "("]``
  536. .. rst-class:: classref-property-setget
  537. - void **set_auto_indent_prefixes** **(** :ref:`String[]<class_String>` value **)**
  538. - :ref:`String[]<class_String>` **get_auto_indent_prefixes** **(** **)**
  539. Prefixes to trigger an automatic indent.
  540. .. rst-class:: classref-item-separator
  541. ----
  542. .. _class_CodeEdit_property_indent_size:
  543. .. rst-class:: classref-property
  544. :ref:`int<class_int>` **indent_size** = ``4``
  545. .. rst-class:: classref-property-setget
  546. - void **set_indent_size** **(** :ref:`int<class_int>` value **)**
  547. - :ref:`int<class_int>` **get_indent_size** **(** **)**
  548. Size of tabs, if ``indent_use_spaces`` is enabled the number of spaces to use.
  549. .. rst-class:: classref-item-separator
  550. ----
  551. .. _class_CodeEdit_property_indent_use_spaces:
  552. .. rst-class:: classref-property
  553. :ref:`bool<class_bool>` **indent_use_spaces** = ``false``
  554. .. rst-class:: classref-property-setget
  555. - void **set_indent_using_spaces** **(** :ref:`bool<class_bool>` value **)**
  556. - :ref:`bool<class_bool>` **is_indent_using_spaces** **(** **)**
  557. Use spaces instead of tabs for indentation.
  558. .. rst-class:: classref-item-separator
  559. ----
  560. .. _class_CodeEdit_property_line_folding:
  561. .. rst-class:: classref-property
  562. :ref:`bool<class_bool>` **line_folding** = ``false``
  563. .. rst-class:: classref-property-setget
  564. - void **set_line_folding_enabled** **(** :ref:`bool<class_bool>` value **)**
  565. - :ref:`bool<class_bool>` **is_line_folding_enabled** **(** **)**
  566. Sets whether line folding is allowed.
  567. .. rst-class:: classref-item-separator
  568. ----
  569. .. _class_CodeEdit_property_line_length_guidelines:
  570. .. rst-class:: classref-property
  571. :ref:`int[]<class_int>` **line_length_guidelines** = ``[]``
  572. .. rst-class:: classref-property-setget
  573. - void **set_line_length_guidelines** **(** :ref:`int[]<class_int>` value **)**
  574. - :ref:`int[]<class_int>` **get_line_length_guidelines** **(** **)**
  575. Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently.
  576. .. rst-class:: classref-item-separator
  577. ----
  578. .. _class_CodeEdit_property_symbol_lookup_on_click:
  579. .. rst-class:: classref-property
  580. :ref:`bool<class_bool>` **symbol_lookup_on_click** = ``false``
  581. .. rst-class:: classref-property-setget
  582. - void **set_symbol_lookup_on_click_enabled** **(** :ref:`bool<class_bool>` value **)**
  583. - :ref:`bool<class_bool>` **is_symbol_lookup_on_click_enabled** **(** **)**
  584. Set when a validated word from :ref:`symbol_validate<class_CodeEdit_signal_symbol_validate>` is clicked, the :ref:`symbol_lookup<class_CodeEdit_signal_symbol_lookup>` should be emitted.
  585. .. rst-class:: classref-section-separator
  586. ----
  587. .. rst-class:: classref-descriptions-group
  588. Method Descriptions
  589. -------------------
  590. .. _class_CodeEdit_method__confirm_code_completion:
  591. .. rst-class:: classref-method
  592. void **_confirm_code_completion** **(** :ref:`bool<class_bool>` replace **)** |virtual|
  593. Override this method to define how the selected entry should be inserted. If ``replace`` is true, any existing text should be replaced.
  594. .. rst-class:: classref-item-separator
  595. ----
  596. .. _class_CodeEdit_method__filter_code_completion_candidates:
  597. .. rst-class:: classref-method
  598. :ref:`Dictionary[]<class_Dictionary>` **_filter_code_completion_candidates** **(** :ref:`Dictionary[]<class_Dictionary>` candidates **)** |virtual| |const|
  599. Override this method to define what items in ``candidates`` should be displayed.
  600. Both ``candidates`` and the return is a :ref:`Array<class_Array>` of :ref:`Dictionary<class_Dictionary>`, see :ref:`get_code_completion_option<class_CodeEdit_method_get_code_completion_option>` for :ref:`Dictionary<class_Dictionary>` content.
  601. .. rst-class:: classref-item-separator
  602. ----
  603. .. _class_CodeEdit_method__request_code_completion:
  604. .. rst-class:: classref-method
  605. void **_request_code_completion** **(** :ref:`bool<class_bool>` force **)** |virtual|
  606. Override this method to define what happens when the user requests code completion. If ``force`` is true, any checks should be bypassed.
  607. .. rst-class:: classref-item-separator
  608. ----
  609. .. _class_CodeEdit_method_add_auto_brace_completion_pair:
  610. .. rst-class:: classref-method
  611. void **add_auto_brace_completion_pair** **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key **)**
  612. Adds a brace pair.
  613. Both the start and end keys must be symbols. Only the start key has to be unique.
  614. .. rst-class:: classref-item-separator
  615. ----
  616. .. _class_CodeEdit_method_add_code_completion_option:
  617. .. rst-class:: classref-method
  618. void **add_code_completion_option** **(** :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` type, :ref:`String<class_String>` display_text, :ref:`String<class_String>` insert_text, :ref:`Color<class_Color>` text_color=Color(1, 1, 1, 1), :ref:`Resource<class_Resource>` icon=null, :ref:`Variant<class_Variant>` value=0, :ref:`int<class_int>` location=1024 **)**
  619. Submits an item to the queue of potential candidates for the autocomplete menu. Call :ref:`update_code_completion_options<class_CodeEdit_method_update_code_completion_options>` to update the list.
  620. \ ``location`` indicates location of the option relative to the location of the code completion query. See :ref:`CodeCompletionLocation<enum_CodeEdit_CodeCompletionLocation>` for how to set this value.
  621. \ **Note:** This list will replace all current candidates.
  622. .. rst-class:: classref-item-separator
  623. ----
  624. .. _class_CodeEdit_method_add_comment_delimiter:
  625. .. rst-class:: classref-method
  626. void **add_comment_delimiter** **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key, :ref:`bool<class_bool>` line_only=false **)**
  627. Adds a comment delimiter.
  628. Both the start and end keys must be symbols. Only the start key has to be unique.
  629. \ ``line_only`` denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to ``true``.
  630. .. rst-class:: classref-item-separator
  631. ----
  632. .. _class_CodeEdit_method_add_string_delimiter:
  633. .. rst-class:: classref-method
  634. void **add_string_delimiter** **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key, :ref:`bool<class_bool>` line_only=false **)**
  635. Adds a string delimiter.
  636. Both the start and end keys must be symbols. Only the start key has to be unique.
  637. \ ``line_only`` denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to ``true``.
  638. .. rst-class:: classref-item-separator
  639. ----
  640. .. _class_CodeEdit_method_can_fold_line:
  641. .. rst-class:: classref-method
  642. :ref:`bool<class_bool>` **can_fold_line** **(** :ref:`int<class_int>` line **)** |const|
  643. Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block.
  644. .. rst-class:: classref-item-separator
  645. ----
  646. .. _class_CodeEdit_method_cancel_code_completion:
  647. .. rst-class:: classref-method
  648. void **cancel_code_completion** **(** **)**
  649. Cancels the autocomplete menu.
  650. .. rst-class:: classref-item-separator
  651. ----
  652. .. _class_CodeEdit_method_clear_bookmarked_lines:
  653. .. rst-class:: classref-method
  654. void **clear_bookmarked_lines** **(** **)**
  655. Clears all bookmarked lines.
  656. .. rst-class:: classref-item-separator
  657. ----
  658. .. _class_CodeEdit_method_clear_breakpointed_lines:
  659. .. rst-class:: classref-method
  660. void **clear_breakpointed_lines** **(** **)**
  661. Clears all breakpointed lines.
  662. .. rst-class:: classref-item-separator
  663. ----
  664. .. _class_CodeEdit_method_clear_comment_delimiters:
  665. .. rst-class:: classref-method
  666. void **clear_comment_delimiters** **(** **)**
  667. Removes all comment delimiters.
  668. .. rst-class:: classref-item-separator
  669. ----
  670. .. _class_CodeEdit_method_clear_executing_lines:
  671. .. rst-class:: classref-method
  672. void **clear_executing_lines** **(** **)**
  673. Clears all executed lines.
  674. .. rst-class:: classref-item-separator
  675. ----
  676. .. _class_CodeEdit_method_clear_string_delimiters:
  677. .. rst-class:: classref-method
  678. void **clear_string_delimiters** **(** **)**
  679. Removes all string delimiters.
  680. .. rst-class:: classref-item-separator
  681. ----
  682. .. _class_CodeEdit_method_confirm_code_completion:
  683. .. rst-class:: classref-method
  684. void **confirm_code_completion** **(** :ref:`bool<class_bool>` replace=false **)**
  685. Inserts the selected entry into the text. If ``replace`` is true, any existing text is replaced rather then merged.
  686. .. rst-class:: classref-item-separator
  687. ----
  688. .. _class_CodeEdit_method_convert_indent:
  689. .. rst-class:: classref-method
  690. void **convert_indent** **(** :ref:`int<class_int>` from_line=-1, :ref:`int<class_int>` to_line=-1 **)**
  691. Converts the indents of lines between ``from_line`` and ``to_line`` to tabs or spaces as set by :ref:`indent_use_spaces<class_CodeEdit_property_indent_use_spaces>`.
  692. Values of ``-1`` convert the entire text.
  693. .. rst-class:: classref-item-separator
  694. ----
  695. .. _class_CodeEdit_method_create_code_region:
  696. .. rst-class:: classref-method
  697. void **create_code_region** **(** **)**
  698. Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see :ref:`add_comment_delimiter<class_CodeEdit_method_add_comment_delimiter>`).
  699. A code region is a part of code that is highlighted when folded and can help organize your script.
  700. Code region start and end tags can be customized (see :ref:`set_code_region_tags<class_CodeEdit_method_set_code_region_tags>`).
  701. Code regions are delimited using start and end tags (respectively ``region`` and ``endregion`` by default) preceded by one line comment delimiter. (eg. ``#region`` and ``#endregion``)
  702. .. rst-class:: classref-item-separator
  703. ----
  704. .. _class_CodeEdit_method_do_indent:
  705. .. rst-class:: classref-method
  706. void **do_indent** **(** **)**
  707. Perform an indent as if the user activated the "ui_text_indent" action.
  708. .. rst-class:: classref-item-separator
  709. ----
  710. .. _class_CodeEdit_method_fold_all_lines:
  711. .. rst-class:: classref-method
  712. void **fold_all_lines** **(** **)**
  713. Folds all lines that are possible to be folded (see :ref:`can_fold_line<class_CodeEdit_method_can_fold_line>`).
  714. .. rst-class:: classref-item-separator
  715. ----
  716. .. _class_CodeEdit_method_fold_line:
  717. .. rst-class:: classref-method
  718. void **fold_line** **(** :ref:`int<class_int>` line **)**
  719. Folds the given line, if possible (see :ref:`can_fold_line<class_CodeEdit_method_can_fold_line>`).
  720. .. rst-class:: classref-item-separator
  721. ----
  722. .. _class_CodeEdit_method_get_auto_brace_completion_close_key:
  723. .. rst-class:: classref-method
  724. :ref:`String<class_String>` **get_auto_brace_completion_close_key** **(** :ref:`String<class_String>` open_key **)** |const|
  725. Gets the matching auto brace close key for ``open_key``.
  726. .. rst-class:: classref-item-separator
  727. ----
  728. .. _class_CodeEdit_method_get_bookmarked_lines:
  729. .. rst-class:: classref-method
  730. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_bookmarked_lines** **(** **)** |const|
  731. Gets all bookmarked lines.
  732. .. rst-class:: classref-item-separator
  733. ----
  734. .. _class_CodeEdit_method_get_breakpointed_lines:
  735. .. rst-class:: classref-method
  736. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_breakpointed_lines** **(** **)** |const|
  737. Gets all breakpointed lines.
  738. .. rst-class:: classref-item-separator
  739. ----
  740. .. _class_CodeEdit_method_get_code_completion_option:
  741. .. rst-class:: classref-method
  742. :ref:`Dictionary<class_Dictionary>` **get_code_completion_option** **(** :ref:`int<class_int>` index **)** |const|
  743. Gets the completion option at ``index``. The return :ref:`Dictionary<class_Dictionary>` has the following key-values:
  744. \ ``kind``: :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>`\
  745. \ ``display_text``: Text that is shown on the autocomplete menu.
  746. \ ``insert_text``: Text that is to be inserted when this item is selected.
  747. \ ``font_color``: Color of the text on the autocomplete menu.
  748. \ ``icon``: Icon to draw on the autocomplete menu.
  749. \ ``default_value``: Value of the symbol.
  750. .. rst-class:: classref-item-separator
  751. ----
  752. .. _class_CodeEdit_method_get_code_completion_options:
  753. .. rst-class:: classref-method
  754. :ref:`Dictionary[]<class_Dictionary>` **get_code_completion_options** **(** **)** |const|
  755. Gets all completion options, see :ref:`get_code_completion_option<class_CodeEdit_method_get_code_completion_option>` for return content.
  756. .. rst-class:: classref-item-separator
  757. ----
  758. .. _class_CodeEdit_method_get_code_completion_selected_index:
  759. .. rst-class:: classref-method
  760. :ref:`int<class_int>` **get_code_completion_selected_index** **(** **)** |const|
  761. Gets the index of the current selected completion option.
  762. .. rst-class:: classref-item-separator
  763. ----
  764. .. _class_CodeEdit_method_get_code_region_end_tag:
  765. .. rst-class:: classref-method
  766. :ref:`String<class_String>` **get_code_region_end_tag** **(** **)** |const|
  767. Returns the code region end tag (without comment delimiter).
  768. .. rst-class:: classref-item-separator
  769. ----
  770. .. _class_CodeEdit_method_get_code_region_start_tag:
  771. .. rst-class:: classref-method
  772. :ref:`String<class_String>` **get_code_region_start_tag** **(** **)** |const|
  773. Returns the code region start tag (without comment delimiter).
  774. .. rst-class:: classref-item-separator
  775. ----
  776. .. _class_CodeEdit_method_get_delimiter_end_key:
  777. .. rst-class:: classref-method
  778. :ref:`String<class_String>` **get_delimiter_end_key** **(** :ref:`int<class_int>` delimiter_index **)** |const|
  779. Gets the end key for a string or comment region index.
  780. .. rst-class:: classref-item-separator
  781. ----
  782. .. _class_CodeEdit_method_get_delimiter_end_position:
  783. .. rst-class:: classref-method
  784. :ref:`Vector2<class_Vector2>` **get_delimiter_end_position** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const|
  785. If ``line`` ``column`` is in a string or comment, returns the end position of the region. If not or no end could be found, both :ref:`Vector2<class_Vector2>` values will be ``-1``.
  786. .. rst-class:: classref-item-separator
  787. ----
  788. .. _class_CodeEdit_method_get_delimiter_start_key:
  789. .. rst-class:: classref-method
  790. :ref:`String<class_String>` **get_delimiter_start_key** **(** :ref:`int<class_int>` delimiter_index **)** |const|
  791. Gets the start key for a string or comment region index.
  792. .. rst-class:: classref-item-separator
  793. ----
  794. .. _class_CodeEdit_method_get_delimiter_start_position:
  795. .. rst-class:: classref-method
  796. :ref:`Vector2<class_Vector2>` **get_delimiter_start_position** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const|
  797. If ``line`` ``column`` is in a string or comment, returns the start position of the region. If not or no start could be found, both :ref:`Vector2<class_Vector2>` values will be ``-1``.
  798. .. rst-class:: classref-item-separator
  799. ----
  800. .. _class_CodeEdit_method_get_executing_lines:
  801. .. rst-class:: classref-method
  802. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_executing_lines** **(** **)** |const|
  803. Gets all executing lines.
  804. .. rst-class:: classref-item-separator
  805. ----
  806. .. _class_CodeEdit_method_get_folded_lines:
  807. .. rst-class:: classref-method
  808. :ref:`int[]<class_int>` **get_folded_lines** **(** **)** |const|
  809. Returns all lines that are current folded.
  810. .. rst-class:: classref-item-separator
  811. ----
  812. .. _class_CodeEdit_method_get_text_for_code_completion:
  813. .. rst-class:: classref-method
  814. :ref:`String<class_String>` **get_text_for_code_completion** **(** **)** |const|
  815. Returns the full text with char ``0xFFFF`` at the caret location.
  816. .. rst-class:: classref-item-separator
  817. ----
  818. .. _class_CodeEdit_method_get_text_for_symbol_lookup:
  819. .. rst-class:: classref-method
  820. :ref:`String<class_String>` **get_text_for_symbol_lookup** **(** **)** |const|
  821. Returns the full text with char ``0xFFFF`` at the cursor location.
  822. .. rst-class:: classref-item-separator
  823. ----
  824. .. _class_CodeEdit_method_get_text_with_cursor_char:
  825. .. rst-class:: classref-method
  826. :ref:`String<class_String>` **get_text_with_cursor_char** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const|
  827. Returns the full text with char ``0xFFFF`` at the specified location.
  828. .. rst-class:: classref-item-separator
  829. ----
  830. .. _class_CodeEdit_method_has_auto_brace_completion_close_key:
  831. .. rst-class:: classref-method
  832. :ref:`bool<class_bool>` **has_auto_brace_completion_close_key** **(** :ref:`String<class_String>` close_key **)** |const|
  833. Returns ``true`` if close key ``close_key`` exists.
  834. .. rst-class:: classref-item-separator
  835. ----
  836. .. _class_CodeEdit_method_has_auto_brace_completion_open_key:
  837. .. rst-class:: classref-method
  838. :ref:`bool<class_bool>` **has_auto_brace_completion_open_key** **(** :ref:`String<class_String>` open_key **)** |const|
  839. Returns ``true`` if open key ``open_key`` exists.
  840. .. rst-class:: classref-item-separator
  841. ----
  842. .. _class_CodeEdit_method_has_comment_delimiter:
  843. .. rst-class:: classref-method
  844. :ref:`bool<class_bool>` **has_comment_delimiter** **(** :ref:`String<class_String>` start_key **)** |const|
  845. Returns ``true`` if comment ``start_key`` exists.
  846. .. rst-class:: classref-item-separator
  847. ----
  848. .. _class_CodeEdit_method_has_string_delimiter:
  849. .. rst-class:: classref-method
  850. :ref:`bool<class_bool>` **has_string_delimiter** **(** :ref:`String<class_String>` start_key **)** |const|
  851. Returns ``true`` if string ``start_key`` exists.
  852. .. rst-class:: classref-item-separator
  853. ----
  854. .. _class_CodeEdit_method_indent_lines:
  855. .. rst-class:: classref-method
  856. void **indent_lines** **(** **)**
  857. Indents selected lines, or in the case of no selection the caret line by one.
  858. .. rst-class:: classref-item-separator
  859. ----
  860. .. _class_CodeEdit_method_is_in_comment:
  861. .. rst-class:: classref-method
  862. :ref:`int<class_int>` **is_in_comment** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column=-1 **)** |const|
  863. Returns delimiter index if ``line`` ``column`` is in a comment. If ``column`` is not provided, will return delimiter index if the entire ``line`` is a comment. Otherwise ``-1``.
  864. .. rst-class:: classref-item-separator
  865. ----
  866. .. _class_CodeEdit_method_is_in_string:
  867. .. rst-class:: classref-method
  868. :ref:`int<class_int>` **is_in_string** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column=-1 **)** |const|
  869. Returns the delimiter index if ``line`` ``column`` is in a string. If ``column`` is not provided, will return the delimiter index if the entire ``line`` is a string. Otherwise ``-1``.
  870. .. rst-class:: classref-item-separator
  871. ----
  872. .. _class_CodeEdit_method_is_line_bookmarked:
  873. .. rst-class:: classref-method
  874. :ref:`bool<class_bool>` **is_line_bookmarked** **(** :ref:`int<class_int>` line **)** |const|
  875. Returns whether the line at the specified index is bookmarked or not.
  876. .. rst-class:: classref-item-separator
  877. ----
  878. .. _class_CodeEdit_method_is_line_breakpointed:
  879. .. rst-class:: classref-method
  880. :ref:`bool<class_bool>` **is_line_breakpointed** **(** :ref:`int<class_int>` line **)** |const|
  881. Returns whether the line at the specified index is breakpointed or not.
  882. .. rst-class:: classref-item-separator
  883. ----
  884. .. _class_CodeEdit_method_is_line_code_region_end:
  885. .. rst-class:: classref-method
  886. :ref:`bool<class_bool>` **is_line_code_region_end** **(** :ref:`int<class_int>` line **)** |const|
  887. Returns whether the line at the specified index is a code region end.
  888. .. rst-class:: classref-item-separator
  889. ----
  890. .. _class_CodeEdit_method_is_line_code_region_start:
  891. .. rst-class:: classref-method
  892. :ref:`bool<class_bool>` **is_line_code_region_start** **(** :ref:`int<class_int>` line **)** |const|
  893. Returns whether the line at the specified index is a code region start.
  894. .. rst-class:: classref-item-separator
  895. ----
  896. .. _class_CodeEdit_method_is_line_executing:
  897. .. rst-class:: classref-method
  898. :ref:`bool<class_bool>` **is_line_executing** **(** :ref:`int<class_int>` line **)** |const|
  899. Returns whether the line at the specified index is marked as executing or not.
  900. .. rst-class:: classref-item-separator
  901. ----
  902. .. _class_CodeEdit_method_is_line_folded:
  903. .. rst-class:: classref-method
  904. :ref:`bool<class_bool>` **is_line_folded** **(** :ref:`int<class_int>` line **)** |const|
  905. Returns whether the line at the specified index is folded or not.
  906. .. rst-class:: classref-item-separator
  907. ----
  908. .. _class_CodeEdit_method_remove_comment_delimiter:
  909. .. rst-class:: classref-method
  910. void **remove_comment_delimiter** **(** :ref:`String<class_String>` start_key **)**
  911. Removes the comment delimiter with ``start_key``.
  912. .. rst-class:: classref-item-separator
  913. ----
  914. .. _class_CodeEdit_method_remove_string_delimiter:
  915. .. rst-class:: classref-method
  916. void **remove_string_delimiter** **(** :ref:`String<class_String>` start_key **)**
  917. Removes the string delimiter with ``start_key``.
  918. .. rst-class:: classref-item-separator
  919. ----
  920. .. _class_CodeEdit_method_request_code_completion:
  921. .. rst-class:: classref-method
  922. void **request_code_completion** **(** :ref:`bool<class_bool>` force=false **)**
  923. Emits :ref:`code_completion_requested<class_CodeEdit_signal_code_completion_requested>`, if ``force`` is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal.
  924. .. rst-class:: classref-item-separator
  925. ----
  926. .. _class_CodeEdit_method_set_code_completion_selected_index:
  927. .. rst-class:: classref-method
  928. void **set_code_completion_selected_index** **(** :ref:`int<class_int>` index **)**
  929. Sets the current selected completion option.
  930. .. rst-class:: classref-item-separator
  931. ----
  932. .. _class_CodeEdit_method_set_code_hint:
  933. .. rst-class:: classref-method
  934. void **set_code_hint** **(** :ref:`String<class_String>` code_hint **)**
  935. Sets the code hint text. Pass an empty string to clear.
  936. .. rst-class:: classref-item-separator
  937. ----
  938. .. _class_CodeEdit_method_set_code_hint_draw_below:
  939. .. rst-class:: classref-method
  940. void **set_code_hint_draw_below** **(** :ref:`bool<class_bool>` draw_below **)**
  941. Sets if the code hint should draw below the text.
  942. .. rst-class:: classref-item-separator
  943. ----
  944. .. _class_CodeEdit_method_set_code_region_tags:
  945. .. rst-class:: classref-method
  946. void **set_code_region_tags** **(** :ref:`String<class_String>` start="region", :ref:`String<class_String>` end="endregion" **)**
  947. Sets the code region start and end tags (without comment delimiter).
  948. .. rst-class:: classref-item-separator
  949. ----
  950. .. _class_CodeEdit_method_set_line_as_bookmarked:
  951. .. rst-class:: classref-method
  952. void **set_line_as_bookmarked** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` bookmarked **)**
  953. Sets the line as bookmarked.
  954. .. rst-class:: classref-item-separator
  955. ----
  956. .. _class_CodeEdit_method_set_line_as_breakpoint:
  957. .. rst-class:: classref-method
  958. void **set_line_as_breakpoint** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` breakpointed **)**
  959. Sets the line as breakpointed.
  960. .. rst-class:: classref-item-separator
  961. ----
  962. .. _class_CodeEdit_method_set_line_as_executing:
  963. .. rst-class:: classref-method
  964. void **set_line_as_executing** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` executing **)**
  965. Sets the line as executing.
  966. .. rst-class:: classref-item-separator
  967. ----
  968. .. _class_CodeEdit_method_set_symbol_lookup_word_as_valid:
  969. .. rst-class:: classref-method
  970. void **set_symbol_lookup_word_as_valid** **(** :ref:`bool<class_bool>` valid **)**
  971. Sets the symbol emitted by :ref:`symbol_validate<class_CodeEdit_signal_symbol_validate>` as a valid lookup.
  972. .. rst-class:: classref-item-separator
  973. ----
  974. .. _class_CodeEdit_method_toggle_foldable_line:
  975. .. rst-class:: classref-method
  976. void **toggle_foldable_line** **(** :ref:`int<class_int>` line **)**
  977. Toggle the folding of the code block at the given line.
  978. .. rst-class:: classref-item-separator
  979. ----
  980. .. _class_CodeEdit_method_unfold_all_lines:
  981. .. rst-class:: classref-method
  982. void **unfold_all_lines** **(** **)**
  983. Unfolds all lines, folded or not.
  984. .. rst-class:: classref-item-separator
  985. ----
  986. .. _class_CodeEdit_method_unfold_line:
  987. .. rst-class:: classref-method
  988. void **unfold_line** **(** :ref:`int<class_int>` line **)**
  989. Unfolds all lines that were previously folded.
  990. .. rst-class:: classref-item-separator
  991. ----
  992. .. _class_CodeEdit_method_unindent_lines:
  993. .. rst-class:: classref-method
  994. void **unindent_lines** **(** **)**
  995. Unindents selected lines, or in the case of no selection the caret line by one. Same as performing "ui_text_unindent" action.
  996. .. rst-class:: classref-item-separator
  997. ----
  998. .. _class_CodeEdit_method_update_code_completion_options:
  999. .. rst-class:: classref-method
  1000. void **update_code_completion_options** **(** :ref:`bool<class_bool>` force **)**
  1001. Submits all completion options added with :ref:`add_code_completion_option<class_CodeEdit_method_add_code_completion_option>`. Will try to force the autocomplete menu to popup, if ``force`` is ``true``.
  1002. \ **Note:** This will replace all current candidates.
  1003. .. rst-class:: classref-section-separator
  1004. ----
  1005. .. rst-class:: classref-descriptions-group
  1006. Theme Property Descriptions
  1007. ---------------------------
  1008. .. _class_CodeEdit_theme_color_background_color:
  1009. .. rst-class:: classref-themeproperty
  1010. :ref:`Color<class_Color>` **background_color** = ``Color(0, 0, 0, 0)``
  1011. Sets the background :ref:`Color<class_Color>`.
  1012. .. rst-class:: classref-item-separator
  1013. ----
  1014. .. _class_CodeEdit_theme_color_bookmark_color:
  1015. .. rst-class:: classref-themeproperty
  1016. :ref:`Color<class_Color>` **bookmark_color** = ``Color(0.5, 0.64, 1, 0.8)``
  1017. :ref:`Color<class_Color>` of the bookmark icon for bookmarked lines.
  1018. .. rst-class:: classref-item-separator
  1019. ----
  1020. .. _class_CodeEdit_theme_color_brace_mismatch_color:
  1021. .. rst-class:: classref-themeproperty
  1022. :ref:`Color<class_Color>` **brace_mismatch_color** = ``Color(1, 0.2, 0.2, 1)``
  1023. :ref:`Color<class_Color>` of the text to highlight mismatched braces.
  1024. .. rst-class:: classref-item-separator
  1025. ----
  1026. .. _class_CodeEdit_theme_color_breakpoint_color:
  1027. .. rst-class:: classref-themeproperty
  1028. :ref:`Color<class_Color>` **breakpoint_color** = ``Color(0.9, 0.29, 0.3, 1)``
  1029. :ref:`Color<class_Color>` of the breakpoint icon for bookmarked lines.
  1030. .. rst-class:: classref-item-separator
  1031. ----
  1032. .. _class_CodeEdit_theme_color_caret_background_color:
  1033. .. rst-class:: classref-themeproperty
  1034. :ref:`Color<class_Color>` **caret_background_color** = ``Color(0, 0, 0, 1)``
  1035. :ref:`Color<class_Color>` of the text behind the caret when block caret is enabled.
  1036. .. rst-class:: classref-item-separator
  1037. ----
  1038. .. _class_CodeEdit_theme_color_caret_color:
  1039. .. rst-class:: classref-themeproperty
  1040. :ref:`Color<class_Color>` **caret_color** = ``Color(0.875, 0.875, 0.875, 1)``
  1041. :ref:`Color<class_Color>` of the caret.
  1042. .. rst-class:: classref-item-separator
  1043. ----
  1044. .. _class_CodeEdit_theme_color_code_folding_color:
  1045. .. rst-class:: classref-themeproperty
  1046. :ref:`Color<class_Color>` **code_folding_color** = ``Color(0.8, 0.8, 0.8, 0.8)``
  1047. :ref:`Color<class_Color>` for all icons related to line folding.
  1048. .. rst-class:: classref-item-separator
  1049. ----
  1050. .. _class_CodeEdit_theme_color_completion_background_color:
  1051. .. rst-class:: classref-themeproperty
  1052. :ref:`Color<class_Color>` **completion_background_color** = ``Color(0.17, 0.16, 0.2, 1)``
  1053. Sets the background :ref:`Color<class_Color>` for the code completion popup.
  1054. .. rst-class:: classref-item-separator
  1055. ----
  1056. .. _class_CodeEdit_theme_color_completion_existing_color:
  1057. .. rst-class:: classref-themeproperty
  1058. :ref:`Color<class_Color>` **completion_existing_color** = ``Color(0.87, 0.87, 0.87, 0.13)``
  1059. Background highlight :ref:`Color<class_Color>` for matching text in code completion options.
  1060. .. rst-class:: classref-item-separator
  1061. ----
  1062. .. _class_CodeEdit_theme_color_completion_font_color:
  1063. .. rst-class:: classref-themeproperty
  1064. :ref:`Color<class_Color>` **completion_font_color** = ``Color(0.67, 0.67, 0.67, 1)``
  1065. Font :ref:`Color<class_Color>` for the code completion popup.
  1066. .. rst-class:: classref-item-separator
  1067. ----
  1068. .. _class_CodeEdit_theme_color_completion_scroll_color:
  1069. .. rst-class:: classref-themeproperty
  1070. :ref:`Color<class_Color>` **completion_scroll_color** = ``Color(1, 1, 1, 0.29)``
  1071. :ref:`Color<class_Color>` of the scrollbar in the code completion popup.
  1072. .. rst-class:: classref-item-separator
  1073. ----
  1074. .. _class_CodeEdit_theme_color_completion_scroll_hovered_color:
  1075. .. rst-class:: classref-themeproperty
  1076. :ref:`Color<class_Color>` **completion_scroll_hovered_color** = ``Color(1, 1, 1, 0.4)``
  1077. :ref:`Color<class_Color>` of the scrollbar in the code completion popup when hovered.
  1078. .. rst-class:: classref-item-separator
  1079. ----
  1080. .. _class_CodeEdit_theme_color_completion_selected_color:
  1081. .. rst-class:: classref-themeproperty
  1082. :ref:`Color<class_Color>` **completion_selected_color** = ``Color(0.26, 0.26, 0.27, 1)``
  1083. Background highlight :ref:`Color<class_Color>` for the current selected option item in the code completion popup.
  1084. .. rst-class:: classref-item-separator
  1085. ----
  1086. .. _class_CodeEdit_theme_color_current_line_color:
  1087. .. rst-class:: classref-themeproperty
  1088. :ref:`Color<class_Color>` **current_line_color** = ``Color(0.25, 0.25, 0.26, 0.8)``
  1089. Background :ref:`Color<class_Color>` of the line containing the caret.
  1090. .. rst-class:: classref-item-separator
  1091. ----
  1092. .. _class_CodeEdit_theme_color_executing_line_color:
  1093. .. rst-class:: classref-themeproperty
  1094. :ref:`Color<class_Color>` **executing_line_color** = ``Color(0.98, 0.89, 0.27, 1)``
  1095. :ref:`Color<class_Color>` of the executing icon for executing lines.
  1096. .. rst-class:: classref-item-separator
  1097. ----
  1098. .. _class_CodeEdit_theme_color_folded_code_region_color:
  1099. .. rst-class:: classref-themeproperty
  1100. :ref:`Color<class_Color>` **folded_code_region_color** = ``Color(0.68, 0.46, 0.77, 0.2)``
  1101. :ref:`Color<class_Color>` of background line highlight for folded code region.
  1102. .. rst-class:: classref-item-separator
  1103. ----
  1104. .. _class_CodeEdit_theme_color_font_color:
  1105. .. rst-class:: classref-themeproperty
  1106. :ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)``
  1107. Sets the font :ref:`Color<class_Color>`.
  1108. .. rst-class:: classref-item-separator
  1109. ----
  1110. .. _class_CodeEdit_theme_color_font_outline_color:
  1111. .. rst-class:: classref-themeproperty
  1112. :ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)``
  1113. The tint of text outline of the **CodeEdit**.
  1114. .. rst-class:: classref-item-separator
  1115. ----
  1116. .. _class_CodeEdit_theme_color_font_placeholder_color:
  1117. .. rst-class:: classref-themeproperty
  1118. :ref:`Color<class_Color>` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)``
  1119. Font color for :ref:`TextEdit.placeholder_text<class_TextEdit_property_placeholder_text>`.
  1120. .. rst-class:: classref-item-separator
  1121. ----
  1122. .. _class_CodeEdit_theme_color_font_readonly_color:
  1123. .. rst-class:: classref-themeproperty
  1124. :ref:`Color<class_Color>` **font_readonly_color** = ``Color(0.875, 0.875, 0.875, 0.5)``
  1125. Sets the font :ref:`Color<class_Color>` when :ref:`TextEdit.editable<class_TextEdit_property_editable>` is disabled.
  1126. .. rst-class:: classref-item-separator
  1127. ----
  1128. .. _class_CodeEdit_theme_color_font_selected_color:
  1129. .. rst-class:: classref-themeproperty
  1130. :ref:`Color<class_Color>` **font_selected_color** = ``Color(0, 0, 0, 0)``
  1131. Sets the :ref:`Color<class_Color>` of the selected text. If equal to ``Color(0, 0, 0, 0)``, it will be ignored.
  1132. .. rst-class:: classref-item-separator
  1133. ----
  1134. .. _class_CodeEdit_theme_color_line_length_guideline_color:
  1135. .. rst-class:: classref-themeproperty
  1136. :ref:`Color<class_Color>` **line_length_guideline_color** = ``Color(0.3, 0.5, 0.8, 0.1)``
  1137. :ref:`Color<class_Color>` of the main line length guideline, secondary guidelines will have 50% alpha applied.
  1138. .. rst-class:: classref-item-separator
  1139. ----
  1140. .. _class_CodeEdit_theme_color_line_number_color:
  1141. .. rst-class:: classref-themeproperty
  1142. :ref:`Color<class_Color>` **line_number_color** = ``Color(0.67, 0.67, 0.67, 0.4)``
  1143. Sets the :ref:`Color<class_Color>` of line numbers.
  1144. .. rst-class:: classref-item-separator
  1145. ----
  1146. .. _class_CodeEdit_theme_color_search_result_border_color:
  1147. .. rst-class:: classref-themeproperty
  1148. :ref:`Color<class_Color>` **search_result_border_color** = ``Color(0.3, 0.3, 0.3, 0.4)``
  1149. :ref:`Color<class_Color>` of the border around text that matches the search query.
  1150. .. rst-class:: classref-item-separator
  1151. ----
  1152. .. _class_CodeEdit_theme_color_search_result_color:
  1153. .. rst-class:: classref-themeproperty
  1154. :ref:`Color<class_Color>` **search_result_color** = ``Color(0.3, 0.3, 0.3, 1)``
  1155. :ref:`Color<class_Color>` behind the text that matches the search query.
  1156. .. rst-class:: classref-item-separator
  1157. ----
  1158. .. _class_CodeEdit_theme_color_selection_color:
  1159. .. rst-class:: classref-themeproperty
  1160. :ref:`Color<class_Color>` **selection_color** = ``Color(0.5, 0.5, 0.5, 1)``
  1161. Sets the highlight :ref:`Color<class_Color>` of text selections.
  1162. .. rst-class:: classref-item-separator
  1163. ----
  1164. .. _class_CodeEdit_theme_color_word_highlighted_color:
  1165. .. rst-class:: classref-themeproperty
  1166. :ref:`Color<class_Color>` **word_highlighted_color** = ``Color(0.8, 0.9, 0.9, 0.15)``
  1167. Sets the highlight :ref:`Color<class_Color>` of multiple occurrences. :ref:`TextEdit.highlight_all_occurrences<class_TextEdit_property_highlight_all_occurrences>` has to be enabled.
  1168. .. rst-class:: classref-item-separator
  1169. ----
  1170. .. _class_CodeEdit_theme_constant_completion_lines:
  1171. .. rst-class:: classref-themeproperty
  1172. :ref:`int<class_int>` **completion_lines** = ``7``
  1173. Max number of options to display in the code completion popup at any one time.
  1174. .. rst-class:: classref-item-separator
  1175. ----
  1176. .. _class_CodeEdit_theme_constant_completion_max_width:
  1177. .. rst-class:: classref-themeproperty
  1178. :ref:`int<class_int>` **completion_max_width** = ``50``
  1179. Max width of options in the code completion popup. Options longer then this will be cut off.
  1180. .. rst-class:: classref-item-separator
  1181. ----
  1182. .. _class_CodeEdit_theme_constant_completion_scroll_width:
  1183. .. rst-class:: classref-themeproperty
  1184. :ref:`int<class_int>` **completion_scroll_width** = ``6``
  1185. Width of the scrollbar in the code completion popup.
  1186. .. rst-class:: classref-item-separator
  1187. ----
  1188. .. _class_CodeEdit_theme_constant_line_spacing:
  1189. .. rst-class:: classref-themeproperty
  1190. :ref:`int<class_int>` **line_spacing** = ``4``
  1191. Sets the spacing between the lines.
  1192. .. rst-class:: classref-item-separator
  1193. ----
  1194. .. _class_CodeEdit_theme_constant_outline_size:
  1195. .. rst-class:: classref-themeproperty
  1196. :ref:`int<class_int>` **outline_size** = ``0``
  1197. The size of the text outline.
  1198. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_CodeEdit_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
  1199. .. rst-class:: classref-item-separator
  1200. ----
  1201. .. _class_CodeEdit_theme_font_font:
  1202. .. rst-class:: classref-themeproperty
  1203. :ref:`Font<class_Font>` **font**
  1204. Sets the default :ref:`Font<class_Font>`.
  1205. .. rst-class:: classref-item-separator
  1206. ----
  1207. .. _class_CodeEdit_theme_font_size_font_size:
  1208. .. rst-class:: classref-themeproperty
  1209. :ref:`int<class_int>` **font_size**
  1210. Sets default font size.
  1211. .. rst-class:: classref-item-separator
  1212. ----
  1213. .. _class_CodeEdit_theme_icon_bookmark:
  1214. .. rst-class:: classref-themeproperty
  1215. :ref:`Texture2D<class_Texture2D>` **bookmark**
  1216. Sets a custom :ref:`Texture2D<class_Texture2D>` to draw in the bookmark gutter for bookmarked lines.
  1217. .. rst-class:: classref-item-separator
  1218. ----
  1219. .. _class_CodeEdit_theme_icon_breakpoint:
  1220. .. rst-class:: classref-themeproperty
  1221. :ref:`Texture2D<class_Texture2D>` **breakpoint**
  1222. Sets a custom :ref:`Texture2D<class_Texture2D>` to draw in the breakpoint gutter for breakpointed lines.
  1223. .. rst-class:: classref-item-separator
  1224. ----
  1225. .. _class_CodeEdit_theme_icon_can_fold:
  1226. .. rst-class:: classref-themeproperty
  1227. :ref:`Texture2D<class_Texture2D>` **can_fold**
  1228. Sets a custom :ref:`Texture2D<class_Texture2D>` to draw in the line folding gutter when a line can be folded.
  1229. .. rst-class:: classref-item-separator
  1230. ----
  1231. .. _class_CodeEdit_theme_icon_can_fold_code_region:
  1232. .. rst-class:: classref-themeproperty
  1233. :ref:`Texture2D<class_Texture2D>` **can_fold_code_region**
  1234. Sets a custom :ref:`Texture2D<class_Texture2D>` to draw in the line folding gutter when a code region can be folded.
  1235. .. rst-class:: classref-item-separator
  1236. ----
  1237. .. _class_CodeEdit_theme_icon_executing_line:
  1238. .. rst-class:: classref-themeproperty
  1239. :ref:`Texture2D<class_Texture2D>` **executing_line**
  1240. Icon to draw in the executing gutter for executing lines.
  1241. .. rst-class:: classref-item-separator
  1242. ----
  1243. .. _class_CodeEdit_theme_icon_folded:
  1244. .. rst-class:: classref-themeproperty
  1245. :ref:`Texture2D<class_Texture2D>` **folded**
  1246. Sets a custom :ref:`Texture2D<class_Texture2D>` to draw in the line folding gutter when a line is folded and can be unfolded.
  1247. .. rst-class:: classref-item-separator
  1248. ----
  1249. .. _class_CodeEdit_theme_icon_folded_code_region:
  1250. .. rst-class:: classref-themeproperty
  1251. :ref:`Texture2D<class_Texture2D>` **folded_code_region**
  1252. Sets a custom :ref:`Texture2D<class_Texture2D>` to draw in the line folding gutter when a code region is folded and can be unfolded.
  1253. .. rst-class:: classref-item-separator
  1254. ----
  1255. .. _class_CodeEdit_theme_icon_folded_eol_icon:
  1256. .. rst-class:: classref-themeproperty
  1257. :ref:`Texture2D<class_Texture2D>` **folded_eol_icon**
  1258. Sets a custom :ref:`Texture2D<class_Texture2D>` to draw at the end of a folded line.
  1259. .. rst-class:: classref-item-separator
  1260. ----
  1261. .. _class_CodeEdit_theme_icon_space:
  1262. .. rst-class:: classref-themeproperty
  1263. :ref:`Texture2D<class_Texture2D>` **space**
  1264. Sets a custom :ref:`Texture2D<class_Texture2D>` for space text characters.
  1265. .. rst-class:: classref-item-separator
  1266. ----
  1267. .. _class_CodeEdit_theme_icon_tab:
  1268. .. rst-class:: classref-themeproperty
  1269. :ref:`Texture2D<class_Texture2D>` **tab**
  1270. Sets a custom :ref:`Texture2D<class_Texture2D>` for tab text characters.
  1271. .. rst-class:: classref-item-separator
  1272. ----
  1273. .. _class_CodeEdit_theme_style_completion:
  1274. .. rst-class:: classref-themeproperty
  1275. :ref:`StyleBox<class_StyleBox>` **completion**
  1276. :ref:`StyleBox<class_StyleBox>` for the code completion popup.
  1277. .. rst-class:: classref-item-separator
  1278. ----
  1279. .. _class_CodeEdit_theme_style_focus:
  1280. .. rst-class:: classref-themeproperty
  1281. :ref:`StyleBox<class_StyleBox>` **focus**
  1282. Sets the :ref:`StyleBox<class_StyleBox>` when in focus. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
  1283. .. rst-class:: classref-item-separator
  1284. ----
  1285. .. _class_CodeEdit_theme_style_normal:
  1286. .. rst-class:: classref-themeproperty
  1287. :ref:`StyleBox<class_StyleBox>` **normal**
  1288. Sets the :ref:`StyleBox<class_StyleBox>`.
  1289. .. rst-class:: classref-item-separator
  1290. ----
  1291. .. _class_CodeEdit_theme_style_read_only:
  1292. .. rst-class:: classref-themeproperty
  1293. :ref:`StyleBox<class_StyleBox>` **read_only**
  1294. Sets the :ref:`StyleBox<class_StyleBox>` when :ref:`TextEdit.editable<class_TextEdit_property_editable>` is disabled.
  1295. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1296. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1297. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1298. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1299. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1300. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1301. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`