class_codeedit.rst 132 KB

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