class_codeedit.rst 117 KB

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