class_codeedit.rst 147 KB

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