class_codeedit.rst 125 KB

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