class_codeedit.rst 114 KB

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