class_textedit.rst 117 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/TextEdit.xml.
  6. .. _class_TextEdit:
  7. TextEdit
  8. ========
  9. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Multiline text editing control.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo.
  15. \ **Note:** When holding down ``Alt``, the vertical scroll wheel will scroll 5 times as fast as it would normally do. This also works in the Godot script editor.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`bookmark_gutter<class_TextEdit_property_bookmark_gutter>` | ``false`` |
  23. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  24. | :ref:`bool<class_bool>` | :ref:`breakpoint_gutter<class_TextEdit_property_breakpoint_gutter>` | ``false`` |
  25. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  26. | :ref:`bool<class_bool>` | :ref:`caret_blink<class_TextEdit_property_caret_blink>` | ``false`` |
  27. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  28. | :ref:`float<class_float>` | :ref:`caret_blink_speed<class_TextEdit_property_caret_blink_speed>` | ``0.65`` |
  29. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  30. | :ref:`bool<class_bool>` | :ref:`caret_block_mode<class_TextEdit_property_caret_block_mode>` | ``false`` |
  31. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  32. | :ref:`bool<class_bool>` | :ref:`caret_moving_by_right_click<class_TextEdit_property_caret_moving_by_right_click>` | ``true`` |
  33. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  34. | :ref:`bool<class_bool>` | :ref:`context_menu_enabled<class_TextEdit_property_context_menu_enabled>` | ``true`` |
  35. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  36. | :ref:`bool<class_bool>` | :ref:`deselect_on_focus_loss_enabled<class_TextEdit_property_deselect_on_focus_loss_enabled>` | ``true`` |
  37. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  38. | :ref:`bool<class_bool>` | :ref:`drag_and_drop_selection_enabled<class_TextEdit_property_drag_and_drop_selection_enabled>` | ``true`` |
  39. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  40. | :ref:`bool<class_bool>` | :ref:`draw_spaces<class_TextEdit_property_draw_spaces>` | ``false`` |
  41. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  42. | :ref:`bool<class_bool>` | :ref:`draw_tabs<class_TextEdit_property_draw_tabs>` | ``false`` |
  43. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  44. | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
  45. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  46. | :ref:`bool<class_bool>` | :ref:`fold_gutter<class_TextEdit_property_fold_gutter>` | ``false`` |
  47. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  48. | :ref:`bool<class_bool>` | :ref:`hiding_enabled<class_TextEdit_property_hiding_enabled>` | ``false`` |
  49. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  50. | :ref:`bool<class_bool>` | :ref:`highlight_all_occurrences<class_TextEdit_property_highlight_all_occurrences>` | ``false`` |
  51. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  52. | :ref:`bool<class_bool>` | :ref:`highlight_current_line<class_TextEdit_property_highlight_current_line>` | ``false`` |
  53. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  54. | :ref:`bool<class_bool>` | :ref:`middle_mouse_paste_enabled<class_TextEdit_property_middle_mouse_paste_enabled>` | ``true`` |
  55. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  56. | :ref:`bool<class_bool>` | :ref:`minimap_draw<class_TextEdit_property_minimap_draw>` | ``false`` |
  57. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`minimap_width<class_TextEdit_property_minimap_width>` | ``80`` |
  59. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  60. | :ref:`CursorShape<enum_Control_CursorShape>` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control<class_Control_property_mouse_default_cursor_shape>`) |
  61. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  62. | :ref:`bool<class_bool>` | :ref:`override_selected_font_color<class_TextEdit_property_override_selected_font_color>` | ``false`` |
  63. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  64. | :ref:`bool<class_bool>` | :ref:`readonly<class_TextEdit_property_readonly>` | ``false`` |
  65. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  66. | :ref:`int<class_int>` | :ref:`scroll_horizontal<class_TextEdit_property_scroll_horizontal>` | ``0`` |
  67. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  68. | :ref:`float<class_float>` | :ref:`scroll_vertical<class_TextEdit_property_scroll_vertical>` | ``0.0`` |
  69. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  70. | :ref:`bool<class_bool>` | :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` | ``true`` |
  71. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  72. | :ref:`bool<class_bool>` | :ref:`shortcut_keys_enabled<class_TextEdit_property_shortcut_keys_enabled>` | ``true`` |
  73. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  74. | :ref:`bool<class_bool>` | :ref:`show_line_numbers<class_TextEdit_property_show_line_numbers>` | ``false`` |
  75. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  76. | :ref:`bool<class_bool>` | :ref:`smooth_scrolling<class_TextEdit_property_smooth_scrolling>` | ``false`` |
  77. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  78. | :ref:`bool<class_bool>` | :ref:`syntax_highlighting<class_TextEdit_property_syntax_highlighting>` | ``false`` |
  79. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  80. | :ref:`String<class_String>` | :ref:`text<class_TextEdit_property_text>` | ``""`` |
  81. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  82. | :ref:`float<class_float>` | :ref:`v_scroll_speed<class_TextEdit_property_v_scroll_speed>` | ``80.0`` |
  83. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  84. | :ref:`bool<class_bool>` | :ref:`virtual_keyboard_enabled<class_TextEdit_property_virtual_keyboard_enabled>` | ``true`` |
  85. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  86. | :ref:`bool<class_bool>` | :ref:`wrap_enabled<class_TextEdit_property_wrap_enabled>` | ``false`` |
  87. +----------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
  88. .. rst-class:: classref-reftable-group
  89. Methods
  90. -------
  91. .. table::
  92. :widths: auto
  93. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | void | :ref:`add_color_region<class_TextEdit_method_add_color_region>` **(** :ref:`String<class_String>` begin_key, :ref:`String<class_String>` end_key, :ref:`Color<class_Color>` color, :ref:`bool<class_bool>` line_only=false **)** |
  95. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | void | :ref:`add_keyword_color<class_TextEdit_method_add_keyword_color>` **(** :ref:`String<class_String>` keyword, :ref:`Color<class_Color>` color **)** |
  97. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`bool<class_bool>` | :ref:`can_fold<class_TextEdit_method_can_fold>` **(** :ref:`int<class_int>` line **)** |const| |
  99. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | void | :ref:`center_viewport_to_cursor<class_TextEdit_method_center_viewport_to_cursor>` **(** **)** |
  101. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | void | :ref:`clear_colors<class_TextEdit_method_clear_colors>` **(** **)** |
  103. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | void | :ref:`clear_undo_history<class_TextEdit_method_clear_undo_history>` **(** **)** |
  105. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | void | :ref:`copy<class_TextEdit_method_copy>` **(** **)** |
  107. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`int<class_int>` | :ref:`cursor_get_column<class_TextEdit_method_cursor_get_column>` **(** **)** |const| |
  109. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`int<class_int>` | :ref:`cursor_get_line<class_TextEdit_method_cursor_get_line>` **(** **)** |const| |
  111. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | void | :ref:`cursor_set_column<class_TextEdit_method_cursor_set_column>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` adjust_viewport=true **)** |
  113. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | void | :ref:`cursor_set_line<class_TextEdit_method_cursor_set_line>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` adjust_viewport=true, :ref:`bool<class_bool>` can_be_hidden=true, :ref:`int<class_int>` wrap_index=0 **)** |
  115. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | void | :ref:`cut<class_TextEdit_method_cut>` **(** **)** |
  117. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | void | :ref:`deselect<class_TextEdit_method_deselect>` **(** **)** |
  119. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | void | :ref:`fold_all_lines<class_TextEdit_method_fold_all_lines>` **(** **)** |
  121. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | void | :ref:`fold_line<class_TextEdit_method_fold_line>` **(** :ref:`int<class_int>` line **)** |
  123. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`Array<class_Array>` | :ref:`get_breakpoints<class_TextEdit_method_get_breakpoints>` **(** **)** |const| |
  125. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`Color<class_Color>` | :ref:`get_keyword_color<class_TextEdit_method_get_keyword_color>` **(** :ref:`String<class_String>` keyword **)** |const| |
  127. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`String<class_String>` | :ref:`get_line<class_TextEdit_method_get_line>` **(** :ref:`int<class_int>` line **)** |const| |
  129. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`Vector2<class_Vector2>` | :ref:`get_line_column_at_pos<class_TextEdit_method_get_line_column_at_pos>` **(** :ref:`Vector2<class_Vector2>` position **)** |const| |
  131. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`int<class_int>` | :ref:`get_line_count<class_TextEdit_method_get_line_count>` **(** **)** |const| |
  133. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`int<class_int>` | :ref:`get_line_height<class_TextEdit_method_get_line_height>` **(** **)** |const| |
  135. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`int<class_int>` | :ref:`get_line_width<class_TextEdit_method_get_line_width>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=-1 **)** |const| |
  137. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`int<class_int>` | :ref:`get_line_wrap_count<class_TextEdit_method_get_line_wrap_count>` **(** :ref:`int<class_int>` line **)** |const| |
  139. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_line_wrapped_text<class_TextEdit_method_get_line_wrapped_text>` **(** :ref:`int<class_int>` line **)** |const| |
  141. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_TextEdit_method_get_menu>` **(** **)** |const| |
  143. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :ref:`Vector2<class_Vector2>` | :ref:`get_pos_at_line_column<class_TextEdit_method_get_pos_at_line_column>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| |
  145. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :ref:`Rect2<class_Rect2>` | :ref:`get_rect_at_line_column<class_TextEdit_method_get_rect_at_line_column>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| |
  147. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`int<class_int>` | :ref:`get_selection_from_column<class_TextEdit_method_get_selection_from_column>` **(** **)** |const| |
  149. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`int<class_int>` | :ref:`get_selection_from_line<class_TextEdit_method_get_selection_from_line>` **(** **)** |const| |
  151. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`String<class_String>` | :ref:`get_selection_text<class_TextEdit_method_get_selection_text>` **(** **)** |const| |
  153. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | :ref:`int<class_int>` | :ref:`get_selection_to_column<class_TextEdit_method_get_selection_to_column>` **(** **)** |const| |
  155. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | :ref:`int<class_int>` | :ref:`get_selection_to_line<class_TextEdit_method_get_selection_to_line>` **(** **)** |const| |
  157. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | :ref:`int<class_int>` | :ref:`get_total_gutter_width<class_TextEdit_method_get_total_gutter_width>` **(** **)** |const| |
  159. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | :ref:`int<class_int>` | :ref:`get_total_visible_rows<class_TextEdit_method_get_total_visible_rows>` **(** **)** |const| |
  161. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | :ref:`int<class_int>` | :ref:`get_visible_rows<class_TextEdit_method_get_visible_rows>` **(** **)** |const| |
  163. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | :ref:`String<class_String>` | :ref:`get_word_under_cursor<class_TextEdit_method_get_word_under_cursor>` **(** **)** |const| |
  165. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | :ref:`bool<class_bool>` | :ref:`has_keyword_color<class_TextEdit_method_has_keyword_color>` **(** :ref:`String<class_String>` keyword **)** |const| |
  167. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | :ref:`bool<class_bool>` | :ref:`has_redo<class_TextEdit_method_has_redo>` **(** **)** |const| |
  169. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | :ref:`bool<class_bool>` | :ref:`has_undo<class_TextEdit_method_has_undo>` **(** **)** |const| |
  171. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | void | :ref:`insert_text_at_cursor<class_TextEdit_method_insert_text_at_cursor>` **(** :ref:`String<class_String>` text **)** |
  173. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | :ref:`bool<class_bool>` | :ref:`is_folded<class_TextEdit_method_is_folded>` **(** :ref:`int<class_int>` line **)** |const| |
  175. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | :ref:`bool<class_bool>` | :ref:`is_line_hidden<class_TextEdit_method_is_line_hidden>` **(** :ref:`int<class_int>` line **)** |const| |
  177. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | :ref:`bool<class_bool>` | :ref:`is_line_set_as_bookmark<class_TextEdit_method_is_line_set_as_bookmark>` **(** :ref:`int<class_int>` line **)** |const| |
  179. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | :ref:`bool<class_bool>` | :ref:`is_line_set_as_breakpoint<class_TextEdit_method_is_line_set_as_breakpoint>` **(** :ref:`int<class_int>` line **)** |const| |
  181. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | :ref:`bool<class_bool>` | :ref:`is_line_set_as_safe<class_TextEdit_method_is_line_set_as_safe>` **(** :ref:`int<class_int>` line **)** |const| |
  183. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | :ref:`bool<class_bool>` | :ref:`is_line_wrapped<class_TextEdit_method_is_line_wrapped>` **(** :ref:`int<class_int>` line **)** |const| |
  185. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | :ref:`bool<class_bool>` | :ref:`is_mouse_over_selection<class_TextEdit_method_is_mouse_over_selection>` **(** :ref:`bool<class_bool>` edges **)** |const| |
  187. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | :ref:`bool<class_bool>` | :ref:`is_selection_active<class_TextEdit_method_is_selection_active>` **(** **)** |const| |
  189. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | void | :ref:`menu_option<class_TextEdit_method_menu_option>` **(** :ref:`int<class_int>` option **)** |
  191. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | void | :ref:`paste<class_TextEdit_method_paste>` **(** **)** |
  193. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | void | :ref:`redo<class_TextEdit_method_redo>` **(** **)** |
  195. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | void | :ref:`remove_breakpoints<class_TextEdit_method_remove_breakpoints>` **(** **)** |
  197. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | :ref:`PoolIntArray<class_PoolIntArray>` | :ref:`search<class_TextEdit_method_search>` **(** :ref:`String<class_String>` key, :ref:`int<class_int>` flags, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column **)** |const| |
  199. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | void | :ref:`select<class_TextEdit_method_select>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_column **)** |
  201. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | void | :ref:`select_all<class_TextEdit_method_select_all>` **(** **)** |
  203. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | void | :ref:`set_line<class_TextEdit_method_set_line>` **(** :ref:`int<class_int>` line, :ref:`String<class_String>` new_text **)** |
  205. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | void | :ref:`set_line_as_bookmark<class_TextEdit_method_set_line_as_bookmark>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` bookmark **)** |
  207. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | void | :ref:`set_line_as_breakpoint<class_TextEdit_method_set_line_as_breakpoint>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` breakpoint **)** |
  209. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | void | :ref:`set_line_as_hidden<class_TextEdit_method_set_line_as_hidden>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` enable **)** |
  211. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | void | :ref:`set_line_as_safe<class_TextEdit_method_set_line_as_safe>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` safe **)** |
  213. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | void | :ref:`toggle_fold_line<class_TextEdit_method_toggle_fold_line>` **(** :ref:`int<class_int>` line **)** |
  215. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | void | :ref:`undo<class_TextEdit_method_undo>` **(** **)** |
  217. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | void | :ref:`unfold_line<class_TextEdit_method_unfold_line>` **(** :ref:`int<class_int>` line **)** |
  219. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | void | :ref:`unhide_all_lines<class_TextEdit_method_unhide_all_lines>` **(** **)** |
  221. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. .. rst-class:: classref-reftable-group
  223. Theme Properties
  224. ----------------
  225. .. table::
  226. :widths: auto
  227. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  228. | :ref:`Color<class_Color>` | :ref:`background_color<class_TextEdit_theme_color_background_color>` | ``Color( 0, 0, 0, 0 )`` |
  229. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  230. | :ref:`Color<class_Color>` | :ref:`bookmark_color<class_TextEdit_theme_color_bookmark_color>` | ``Color( 0.08, 0.49, 0.98, 1 )`` |
  231. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  232. | :ref:`Color<class_Color>` | :ref:`brace_mismatch_color<class_TextEdit_theme_color_brace_mismatch_color>` | ``Color( 1, 0.2, 0.2, 1 )`` |
  233. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  234. | :ref:`Color<class_Color>` | :ref:`breakpoint_color<class_TextEdit_theme_color_breakpoint_color>` | ``Color( 0.8, 0.8, 0.4, 0.2 )`` |
  235. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  236. | :ref:`Color<class_Color>` | :ref:`caret_background_color<class_TextEdit_theme_color_caret_background_color>` | ``Color( 0, 0, 0, 1 )`` |
  237. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  238. | :ref:`Color<class_Color>` | :ref:`caret_color<class_TextEdit_theme_color_caret_color>` | ``Color( 0.88, 0.88, 0.88, 1 )`` |
  239. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  240. | :ref:`Color<class_Color>` | :ref:`code_folding_color<class_TextEdit_theme_color_code_folding_color>` | ``Color( 0.8, 0.8, 0.8, 0.8 )`` |
  241. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  242. | :ref:`Color<class_Color>` | :ref:`completion_background_color<class_TextEdit_theme_color_completion_background_color>` | ``Color( 0.17, 0.16, 0.2, 1 )`` |
  243. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  244. | :ref:`Color<class_Color>` | :ref:`completion_existing_color<class_TextEdit_theme_color_completion_existing_color>` | ``Color( 0.87, 0.87, 0.87, 0.13 )`` |
  245. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  246. | :ref:`Color<class_Color>` | :ref:`completion_font_color<class_TextEdit_theme_color_completion_font_color>` | ``Color( 0.67, 0.67, 0.67, 1 )`` |
  247. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  248. | :ref:`Color<class_Color>` | :ref:`completion_scroll_color<class_TextEdit_theme_color_completion_scroll_color>` | ``Color( 1, 1, 1, 0.29 )`` |
  249. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  250. | :ref:`Color<class_Color>` | :ref:`completion_selected_color<class_TextEdit_theme_color_completion_selected_color>` | ``Color( 0.26, 0.26, 0.27, 1 )`` |
  251. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  252. | :ref:`Color<class_Color>` | :ref:`current_line_color<class_TextEdit_theme_color_current_line_color>` | ``Color( 0.25, 0.25, 0.26, 0.8 )`` |
  253. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  254. | :ref:`Color<class_Color>` | :ref:`executing_line_color<class_TextEdit_theme_color_executing_line_color>` | ``Color( 0.2, 0.8, 0.2, 0.4 )`` |
  255. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  256. | :ref:`Color<class_Color>` | :ref:`font_color<class_TextEdit_theme_color_font_color>` | ``Color( 0.88, 0.88, 0.88, 1 )`` |
  257. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  258. | :ref:`Color<class_Color>` | :ref:`font_color_readonly<class_TextEdit_theme_color_font_color_readonly>` | ``Color( 0.88, 0.88, 0.88, 0.5 )`` |
  259. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  260. | :ref:`Color<class_Color>` | :ref:`font_color_selected<class_TextEdit_theme_color_font_color_selected>` | ``Color( 0, 0, 0, 1 )`` |
  261. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  262. | :ref:`Color<class_Color>` | :ref:`function_color<class_TextEdit_theme_color_function_color>` | ``Color( 0.4, 0.64, 0.81, 1 )`` |
  263. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  264. | :ref:`Color<class_Color>` | :ref:`line_number_color<class_TextEdit_theme_color_line_number_color>` | ``Color( 0.67, 0.67, 0.67, 0.4 )`` |
  265. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  266. | :ref:`Color<class_Color>` | :ref:`mark_color<class_TextEdit_theme_color_mark_color>` | ``Color( 1, 0.4, 0.4, 0.4 )`` |
  267. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  268. | :ref:`Color<class_Color>` | :ref:`member_variable_color<class_TextEdit_theme_color_member_variable_color>` | ``Color( 0.9, 0.31, 0.35, 1 )`` |
  269. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  270. | :ref:`Color<class_Color>` | :ref:`number_color<class_TextEdit_theme_color_number_color>` | ``Color( 0.92, 0.58, 0.2, 1 )`` |
  271. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  272. | :ref:`Color<class_Color>` | :ref:`safe_line_number_color<class_TextEdit_theme_color_safe_line_number_color>` | ``Color( 0.67, 0.78, 0.67, 0.6 )`` |
  273. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  274. | :ref:`Color<class_Color>` | :ref:`selection_color<class_TextEdit_theme_color_selection_color>` | ``Color( 0.49, 0.49, 0.49, 1 )`` |
  275. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  276. | :ref:`Color<class_Color>` | :ref:`symbol_color<class_TextEdit_theme_color_symbol_color>` | ``Color( 0.94, 0.94, 0.94, 1 )`` |
  277. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  278. | :ref:`Color<class_Color>` | :ref:`word_highlighted_color<class_TextEdit_theme_color_word_highlighted_color>` | ``Color( 0.8, 0.9, 0.9, 0.15 )`` |
  279. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  280. | :ref:`int<class_int>` | :ref:`completion_lines<class_TextEdit_theme_constant_completion_lines>` | ``7`` |
  281. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  282. | :ref:`int<class_int>` | :ref:`completion_max_width<class_TextEdit_theme_constant_completion_max_width>` | ``50`` |
  283. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  284. | :ref:`int<class_int>` | :ref:`completion_scroll_width<class_TextEdit_theme_constant_completion_scroll_width>` | ``6`` |
  285. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  286. | :ref:`int<class_int>` | :ref:`line_spacing<class_TextEdit_theme_constant_line_spacing>` | ``4`` |
  287. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  288. | :ref:`Font<class_Font>` | :ref:`font<class_TextEdit_theme_font_font>` | |
  289. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  290. | :ref:`Texture<class_Texture>` | :ref:`fold<class_TextEdit_theme_icon_fold>` | |
  291. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  292. | :ref:`Texture<class_Texture>` | :ref:`folded<class_TextEdit_theme_icon_folded>` | |
  293. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  294. | :ref:`Texture<class_Texture>` | :ref:`space<class_TextEdit_theme_icon_space>` | |
  295. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  296. | :ref:`Texture<class_Texture>` | :ref:`tab<class_TextEdit_theme_icon_tab>` | |
  297. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  298. | :ref:`StyleBox<class_StyleBox>` | :ref:`completion<class_TextEdit_theme_style_completion>` | |
  299. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  300. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_TextEdit_theme_style_focus>` | |
  301. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  302. | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_TextEdit_theme_style_normal>` | |
  303. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  304. | :ref:`StyleBox<class_StyleBox>` | :ref:`read_only<class_TextEdit_theme_style_read_only>` | |
  305. +---------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------+
  306. .. rst-class:: classref-section-separator
  307. ----
  308. .. rst-class:: classref-descriptions-group
  309. Signals
  310. -------
  311. .. _class_TextEdit_signal_breakpoint_toggled:
  312. .. rst-class:: classref-signal
  313. **breakpoint_toggled** **(** :ref:`int<class_int>` row **)**
  314. Emitted when a breakpoint is placed via the breakpoint gutter.
  315. .. rst-class:: classref-item-separator
  316. ----
  317. .. _class_TextEdit_signal_cursor_changed:
  318. .. rst-class:: classref-signal
  319. **cursor_changed** **(** **)**
  320. Emitted when the cursor changes.
  321. .. rst-class:: classref-item-separator
  322. ----
  323. .. _class_TextEdit_signal_info_clicked:
  324. .. rst-class:: classref-signal
  325. **info_clicked** **(** :ref:`int<class_int>` row, :ref:`String<class_String>` info **)**
  326. Emitted when the info icon is clicked.
  327. .. rst-class:: classref-item-separator
  328. ----
  329. .. _class_TextEdit_signal_request_completion:
  330. .. rst-class:: classref-signal
  331. **request_completion** **(** **)**
  332. .. container:: contribute
  333. There is currently no description for this signal. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  334. .. rst-class:: classref-item-separator
  335. ----
  336. .. _class_TextEdit_signal_symbol_lookup:
  337. .. rst-class:: classref-signal
  338. **symbol_lookup** **(** :ref:`String<class_String>` symbol, :ref:`int<class_int>` row, :ref:`int<class_int>` column **)**
  339. .. container:: contribute
  340. There is currently no description for this signal. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  341. .. rst-class:: classref-item-separator
  342. ----
  343. .. _class_TextEdit_signal_text_changed:
  344. .. rst-class:: classref-signal
  345. **text_changed** **(** **)**
  346. Emitted when the text changes.
  347. .. rst-class:: classref-section-separator
  348. ----
  349. .. rst-class:: classref-descriptions-group
  350. Enumerations
  351. ------------
  352. .. _enum_TextEdit_SearchFlags:
  353. .. rst-class:: classref-enumeration
  354. enum **SearchFlags**:
  355. .. _class_TextEdit_constant_SEARCH_MATCH_CASE:
  356. .. rst-class:: classref-enumeration-constant
  357. :ref:`SearchFlags<enum_TextEdit_SearchFlags>` **SEARCH_MATCH_CASE** = ``1``
  358. Match case when searching.
  359. .. _class_TextEdit_constant_SEARCH_WHOLE_WORDS:
  360. .. rst-class:: classref-enumeration-constant
  361. :ref:`SearchFlags<enum_TextEdit_SearchFlags>` **SEARCH_WHOLE_WORDS** = ``2``
  362. Match whole words when searching.
  363. .. _class_TextEdit_constant_SEARCH_BACKWARDS:
  364. .. rst-class:: classref-enumeration-constant
  365. :ref:`SearchFlags<enum_TextEdit_SearchFlags>` **SEARCH_BACKWARDS** = ``4``
  366. Search from end to beginning.
  367. .. rst-class:: classref-item-separator
  368. ----
  369. .. _enum_TextEdit_SearchResult:
  370. .. rst-class:: classref-enumeration
  371. enum **SearchResult**:
  372. .. _class_TextEdit_constant_SEARCH_RESULT_COLUMN:
  373. .. rst-class:: classref-enumeration-constant
  374. :ref:`SearchResult<enum_TextEdit_SearchResult>` **SEARCH_RESULT_COLUMN** = ``0``
  375. Used to access the result column from :ref:`search<class_TextEdit_method_search>`.
  376. .. _class_TextEdit_constant_SEARCH_RESULT_LINE:
  377. .. rst-class:: classref-enumeration-constant
  378. :ref:`SearchResult<enum_TextEdit_SearchResult>` **SEARCH_RESULT_LINE** = ``1``
  379. Used to access the result line from :ref:`search<class_TextEdit_method_search>`.
  380. .. rst-class:: classref-item-separator
  381. ----
  382. .. _enum_TextEdit_MenuItems:
  383. .. rst-class:: classref-enumeration
  384. enum **MenuItems**:
  385. .. _class_TextEdit_constant_MENU_CUT:
  386. .. rst-class:: classref-enumeration-constant
  387. :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_CUT** = ``0``
  388. Cuts (copies and clears) the selected text.
  389. .. _class_TextEdit_constant_MENU_COPY:
  390. .. rst-class:: classref-enumeration-constant
  391. :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_COPY** = ``1``
  392. Copies the selected text.
  393. .. _class_TextEdit_constant_MENU_PASTE:
  394. .. rst-class:: classref-enumeration-constant
  395. :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_PASTE** = ``2``
  396. Pastes the clipboard text over the selected text (or at the cursor's position).
  397. .. _class_TextEdit_constant_MENU_CLEAR:
  398. .. rst-class:: classref-enumeration-constant
  399. :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_CLEAR** = ``3``
  400. Erases the whole **TextEdit** text.
  401. .. _class_TextEdit_constant_MENU_SELECT_ALL:
  402. .. rst-class:: classref-enumeration-constant
  403. :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_SELECT_ALL** = ``4``
  404. Selects the whole **TextEdit** text.
  405. .. _class_TextEdit_constant_MENU_UNDO:
  406. .. rst-class:: classref-enumeration-constant
  407. :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_UNDO** = ``5``
  408. Undoes the previous action.
  409. .. _class_TextEdit_constant_MENU_REDO:
  410. .. rst-class:: classref-enumeration-constant
  411. :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_REDO** = ``6``
  412. Redoes the previous action.
  413. .. _class_TextEdit_constant_MENU_MAX:
  414. .. rst-class:: classref-enumeration-constant
  415. :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_MAX** = ``7``
  416. Represents the size of the :ref:`MenuItems<enum_TextEdit_MenuItems>` enum.
  417. .. rst-class:: classref-section-separator
  418. ----
  419. .. rst-class:: classref-descriptions-group
  420. Property Descriptions
  421. ---------------------
  422. .. _class_TextEdit_property_bookmark_gutter:
  423. .. rst-class:: classref-property
  424. :ref:`bool<class_bool>` **bookmark_gutter** = ``false``
  425. .. rst-class:: classref-property-setget
  426. - void **set_bookmark_gutter_enabled** **(** :ref:`bool<class_bool>` value **)**
  427. - :ref:`bool<class_bool>` **is_bookmark_gutter_enabled** **(** **)**
  428. If ``true``, the bookmark gutter is visible.
  429. .. rst-class:: classref-item-separator
  430. ----
  431. .. _class_TextEdit_property_breakpoint_gutter:
  432. .. rst-class:: classref-property
  433. :ref:`bool<class_bool>` **breakpoint_gutter** = ``false``
  434. .. rst-class:: classref-property-setget
  435. - void **set_breakpoint_gutter_enabled** **(** :ref:`bool<class_bool>` value **)**
  436. - :ref:`bool<class_bool>` **is_breakpoint_gutter_enabled** **(** **)**
  437. If ``true``, the breakpoint gutter is visible.
  438. .. rst-class:: classref-item-separator
  439. ----
  440. .. _class_TextEdit_property_caret_blink:
  441. .. rst-class:: classref-property
  442. :ref:`bool<class_bool>` **caret_blink** = ``false``
  443. .. rst-class:: classref-property-setget
  444. - void **cursor_set_blink_enabled** **(** :ref:`bool<class_bool>` value **)**
  445. - :ref:`bool<class_bool>` **cursor_get_blink_enabled** **(** **)**
  446. If ``true``, the caret (visual cursor) blinks.
  447. .. rst-class:: classref-item-separator
  448. ----
  449. .. _class_TextEdit_property_caret_blink_speed:
  450. .. rst-class:: classref-property
  451. :ref:`float<class_float>` **caret_blink_speed** = ``0.65``
  452. .. rst-class:: classref-property-setget
  453. - void **cursor_set_blink_speed** **(** :ref:`float<class_float>` value **)**
  454. - :ref:`float<class_float>` **cursor_get_blink_speed** **(** **)**
  455. Duration (in seconds) of a caret's blinking cycle.
  456. .. rst-class:: classref-item-separator
  457. ----
  458. .. _class_TextEdit_property_caret_block_mode:
  459. .. rst-class:: classref-property
  460. :ref:`bool<class_bool>` **caret_block_mode** = ``false``
  461. .. rst-class:: classref-property-setget
  462. - void **cursor_set_block_mode** **(** :ref:`bool<class_bool>` value **)**
  463. - :ref:`bool<class_bool>` **cursor_is_block_mode** **(** **)**
  464. If ``true``, the caret displays as a rectangle.
  465. If ``false``, the caret displays as a bar.
  466. .. rst-class:: classref-item-separator
  467. ----
  468. .. _class_TextEdit_property_caret_moving_by_right_click:
  469. .. rst-class:: classref-property
  470. :ref:`bool<class_bool>` **caret_moving_by_right_click** = ``true``
  471. .. rst-class:: classref-property-setget
  472. - void **set_right_click_moves_caret** **(** :ref:`bool<class_bool>` value **)**
  473. - :ref:`bool<class_bool>` **is_right_click_moving_caret** **(** **)**
  474. If ``true``, a right-click moves the cursor at the mouse position before displaying the context menu.
  475. If ``false``, the context menu disregards mouse location.
  476. .. rst-class:: classref-item-separator
  477. ----
  478. .. _class_TextEdit_property_context_menu_enabled:
  479. .. rst-class:: classref-property
  480. :ref:`bool<class_bool>` **context_menu_enabled** = ``true``
  481. .. rst-class:: classref-property-setget
  482. - void **set_context_menu_enabled** **(** :ref:`bool<class_bool>` value **)**
  483. - :ref:`bool<class_bool>` **is_context_menu_enabled** **(** **)**
  484. If ``true``, a right-click displays the context menu.
  485. .. rst-class:: classref-item-separator
  486. ----
  487. .. _class_TextEdit_property_deselect_on_focus_loss_enabled:
  488. .. rst-class:: classref-property
  489. :ref:`bool<class_bool>` **deselect_on_focus_loss_enabled** = ``true``
  490. .. rst-class:: classref-property-setget
  491. - void **set_deselect_on_focus_loss_enabled** **(** :ref:`bool<class_bool>` value **)**
  492. - :ref:`bool<class_bool>` **is_deselect_on_focus_loss_enabled** **(** **)**
  493. If ``true``, the selected text will be deselected when focus is lost.
  494. .. rst-class:: classref-item-separator
  495. ----
  496. .. _class_TextEdit_property_drag_and_drop_selection_enabled:
  497. .. rst-class:: classref-property
  498. :ref:`bool<class_bool>` **drag_and_drop_selection_enabled** = ``true``
  499. .. rst-class:: classref-property-setget
  500. - void **set_drag_and_drop_selection_enabled** **(** :ref:`bool<class_bool>` value **)**
  501. - :ref:`bool<class_bool>` **is_drag_and_drop_selection_enabled** **(** **)**
  502. If ``true``, allow drag and drop of selected text.
  503. .. rst-class:: classref-item-separator
  504. ----
  505. .. _class_TextEdit_property_draw_spaces:
  506. .. rst-class:: classref-property
  507. :ref:`bool<class_bool>` **draw_spaces** = ``false``
  508. .. rst-class:: classref-property-setget
  509. - void **set_draw_spaces** **(** :ref:`bool<class_bool>` value **)**
  510. - :ref:`bool<class_bool>` **is_drawing_spaces** **(** **)**
  511. If ``true``, the "space" character will have a visible representation.
  512. .. rst-class:: classref-item-separator
  513. ----
  514. .. _class_TextEdit_property_draw_tabs:
  515. .. rst-class:: classref-property
  516. :ref:`bool<class_bool>` **draw_tabs** = ``false``
  517. .. rst-class:: classref-property-setget
  518. - void **set_draw_tabs** **(** :ref:`bool<class_bool>` value **)**
  519. - :ref:`bool<class_bool>` **is_drawing_tabs** **(** **)**
  520. If ``true``, the "tab" character will have a visible representation.
  521. .. rst-class:: classref-item-separator
  522. ----
  523. .. _class_TextEdit_property_fold_gutter:
  524. .. rst-class:: classref-property
  525. :ref:`bool<class_bool>` **fold_gutter** = ``false``
  526. .. rst-class:: classref-property-setget
  527. - void **set_draw_fold_gutter** **(** :ref:`bool<class_bool>` value **)**
  528. - :ref:`bool<class_bool>` **is_drawing_fold_gutter** **(** **)**
  529. If ``true``, the fold gutter is visible. This enables folding groups of indented lines.
  530. .. rst-class:: classref-item-separator
  531. ----
  532. .. _class_TextEdit_property_hiding_enabled:
  533. .. rst-class:: classref-property
  534. :ref:`bool<class_bool>` **hiding_enabled** = ``false``
  535. .. rst-class:: classref-property-setget
  536. - void **set_hiding_enabled** **(** :ref:`bool<class_bool>` value **)**
  537. - :ref:`bool<class_bool>` **is_hiding_enabled** **(** **)**
  538. If ``true``, all lines that have been set to hidden by :ref:`set_line_as_hidden<class_TextEdit_method_set_line_as_hidden>`, will not be visible.
  539. .. rst-class:: classref-item-separator
  540. ----
  541. .. _class_TextEdit_property_highlight_all_occurrences:
  542. .. rst-class:: classref-property
  543. :ref:`bool<class_bool>` **highlight_all_occurrences** = ``false``
  544. .. rst-class:: classref-property-setget
  545. - void **set_highlight_all_occurrences** **(** :ref:`bool<class_bool>` value **)**
  546. - :ref:`bool<class_bool>` **is_highlight_all_occurrences_enabled** **(** **)**
  547. If ``true``, all occurrences of the selected text will be highlighted.
  548. .. rst-class:: classref-item-separator
  549. ----
  550. .. _class_TextEdit_property_highlight_current_line:
  551. .. rst-class:: classref-property
  552. :ref:`bool<class_bool>` **highlight_current_line** = ``false``
  553. .. rst-class:: classref-property-setget
  554. - void **set_highlight_current_line** **(** :ref:`bool<class_bool>` value **)**
  555. - :ref:`bool<class_bool>` **is_highlight_current_line_enabled** **(** **)**
  556. If ``true``, the line containing the cursor is highlighted.
  557. .. rst-class:: classref-item-separator
  558. ----
  559. .. _class_TextEdit_property_middle_mouse_paste_enabled:
  560. .. rst-class:: classref-property
  561. :ref:`bool<class_bool>` **middle_mouse_paste_enabled** = ``true``
  562. .. rst-class:: classref-property-setget
  563. - void **set_middle_mouse_paste_enabled** **(** :ref:`bool<class_bool>` value **)**
  564. - :ref:`bool<class_bool>` **is_middle_mouse_paste_enabled** **(** **)**
  565. If ``false``, using middle mouse button to paste clipboard will be disabled.
  566. \ **Note:** This method is only implemented on Linux.
  567. .. rst-class:: classref-item-separator
  568. ----
  569. .. _class_TextEdit_property_minimap_draw:
  570. .. rst-class:: classref-property
  571. :ref:`bool<class_bool>` **minimap_draw** = ``false``
  572. .. rst-class:: classref-property-setget
  573. - void **draw_minimap** **(** :ref:`bool<class_bool>` value **)**
  574. - :ref:`bool<class_bool>` **is_drawing_minimap** **(** **)**
  575. If ``true``, a minimap is shown, providing an outline of your source code.
  576. .. rst-class:: classref-item-separator
  577. ----
  578. .. _class_TextEdit_property_minimap_width:
  579. .. rst-class:: classref-property
  580. :ref:`int<class_int>` **minimap_width** = ``80``
  581. .. rst-class:: classref-property-setget
  582. - void **set_minimap_width** **(** :ref:`int<class_int>` value **)**
  583. - :ref:`int<class_int>` **get_minimap_width** **(** **)**
  584. The width, in pixels, of the minimap.
  585. .. rst-class:: classref-item-separator
  586. ----
  587. .. _class_TextEdit_property_override_selected_font_color:
  588. .. rst-class:: classref-property
  589. :ref:`bool<class_bool>` **override_selected_font_color** = ``false``
  590. .. rst-class:: classref-property-setget
  591. - void **set_override_selected_font_color** **(** :ref:`bool<class_bool>` value **)**
  592. - :ref:`bool<class_bool>` **is_overriding_selected_font_color** **(** **)**
  593. If ``true``, custom ``font_color_selected`` will be used for selected text.
  594. .. rst-class:: classref-item-separator
  595. ----
  596. .. _class_TextEdit_property_readonly:
  597. .. rst-class:: classref-property
  598. :ref:`bool<class_bool>` **readonly** = ``false``
  599. .. rst-class:: classref-property-setget
  600. - void **set_readonly** **(** :ref:`bool<class_bool>` value **)**
  601. - :ref:`bool<class_bool>` **is_readonly** **(** **)**
  602. If ``true``, read-only mode is enabled. Existing text cannot be modified and new text cannot be added.
  603. .. rst-class:: classref-item-separator
  604. ----
  605. .. _class_TextEdit_property_scroll_horizontal:
  606. .. rst-class:: classref-property
  607. :ref:`int<class_int>` **scroll_horizontal** = ``0``
  608. .. rst-class:: classref-property-setget
  609. - void **set_h_scroll** **(** :ref:`int<class_int>` value **)**
  610. - :ref:`int<class_int>` **get_h_scroll** **(** **)**
  611. If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.
  612. .. rst-class:: classref-item-separator
  613. ----
  614. .. _class_TextEdit_property_scroll_vertical:
  615. .. rst-class:: classref-property
  616. :ref:`float<class_float>` **scroll_vertical** = ``0.0``
  617. .. rst-class:: classref-property-setget
  618. - void **set_v_scroll** **(** :ref:`float<class_float>` value **)**
  619. - :ref:`float<class_float>` **get_v_scroll** **(** **)**
  620. If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line.
  621. .. rst-class:: classref-item-separator
  622. ----
  623. .. _class_TextEdit_property_selecting_enabled:
  624. .. rst-class:: classref-property
  625. :ref:`bool<class_bool>` **selecting_enabled** = ``true``
  626. .. rst-class:: classref-property-setget
  627. - void **set_selecting_enabled** **(** :ref:`bool<class_bool>` value **)**
  628. - :ref:`bool<class_bool>` **is_selecting_enabled** **(** **)**
  629. If ``true``, text can be selected.
  630. If ``false``, text can not be selected by the user or by the :ref:`select<class_TextEdit_method_select>` or :ref:`select_all<class_TextEdit_method_select_all>` methods.
  631. .. rst-class:: classref-item-separator
  632. ----
  633. .. _class_TextEdit_property_shortcut_keys_enabled:
  634. .. rst-class:: classref-property
  635. :ref:`bool<class_bool>` **shortcut_keys_enabled** = ``true``
  636. .. rst-class:: classref-property-setget
  637. - void **set_shortcut_keys_enabled** **(** :ref:`bool<class_bool>` value **)**
  638. - :ref:`bool<class_bool>` **is_shortcut_keys_enabled** **(** **)**
  639. If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled.
  640. .. rst-class:: classref-item-separator
  641. ----
  642. .. _class_TextEdit_property_show_line_numbers:
  643. .. rst-class:: classref-property
  644. :ref:`bool<class_bool>` **show_line_numbers** = ``false``
  645. .. rst-class:: classref-property-setget
  646. - void **set_show_line_numbers** **(** :ref:`bool<class_bool>` value **)**
  647. - :ref:`bool<class_bool>` **is_show_line_numbers_enabled** **(** **)**
  648. If ``true``, line numbers are displayed to the left of the text.
  649. .. rst-class:: classref-item-separator
  650. ----
  651. .. _class_TextEdit_property_smooth_scrolling:
  652. .. rst-class:: classref-property
  653. :ref:`bool<class_bool>` **smooth_scrolling** = ``false``
  654. .. rst-class:: classref-property-setget
  655. - void **set_smooth_scroll_enable** **(** :ref:`bool<class_bool>` value **)**
  656. - :ref:`bool<class_bool>` **is_smooth_scroll_enabled** **(** **)**
  657. If ``true``, sets the ``step`` of the scrollbars to ``0.25`` which results in smoother scrolling.
  658. .. rst-class:: classref-item-separator
  659. ----
  660. .. _class_TextEdit_property_syntax_highlighting:
  661. .. rst-class:: classref-property
  662. :ref:`bool<class_bool>` **syntax_highlighting** = ``false``
  663. .. rst-class:: classref-property-setget
  664. - void **set_syntax_coloring** **(** :ref:`bool<class_bool>` value **)**
  665. - :ref:`bool<class_bool>` **is_syntax_coloring_enabled** **(** **)**
  666. If ``true``, any custom color properties that have been set for this **TextEdit** will be visible.
  667. .. rst-class:: classref-item-separator
  668. ----
  669. .. _class_TextEdit_property_text:
  670. .. rst-class:: classref-property
  671. :ref:`String<class_String>` **text** = ``""``
  672. .. rst-class:: classref-property-setget
  673. - void **set_text** **(** :ref:`String<class_String>` value **)**
  674. - :ref:`String<class_String>` **get_text** **(** **)**
  675. String value of the **TextEdit**.
  676. .. rst-class:: classref-item-separator
  677. ----
  678. .. _class_TextEdit_property_v_scroll_speed:
  679. .. rst-class:: classref-property
  680. :ref:`float<class_float>` **v_scroll_speed** = ``80.0``
  681. .. rst-class:: classref-property-setget
  682. - void **set_v_scroll_speed** **(** :ref:`float<class_float>` value **)**
  683. - :ref:`float<class_float>` **get_v_scroll_speed** **(** **)**
  684. Vertical scroll sensitivity.
  685. .. rst-class:: classref-item-separator
  686. ----
  687. .. _class_TextEdit_property_virtual_keyboard_enabled:
  688. .. rst-class:: classref-property
  689. :ref:`bool<class_bool>` **virtual_keyboard_enabled** = ``true``
  690. .. rst-class:: classref-property-setget
  691. - void **set_virtual_keyboard_enabled** **(** :ref:`bool<class_bool>` value **)**
  692. - :ref:`bool<class_bool>` **is_virtual_keyboard_enabled** **(** **)**
  693. If ``true``, the native virtual keyboard is shown when focused on platforms that support it.
  694. .. rst-class:: classref-item-separator
  695. ----
  696. .. _class_TextEdit_property_wrap_enabled:
  697. .. rst-class:: classref-property
  698. :ref:`bool<class_bool>` **wrap_enabled** = ``false``
  699. .. rst-class:: classref-property-setget
  700. - void **set_wrap_enabled** **(** :ref:`bool<class_bool>` value **)**
  701. - :ref:`bool<class_bool>` **is_wrap_enabled** **(** **)**
  702. If ``true``, enables text wrapping when it goes beyond the edge of what is visible.
  703. .. rst-class:: classref-section-separator
  704. ----
  705. .. rst-class:: classref-descriptions-group
  706. Method Descriptions
  707. -------------------
  708. .. _class_TextEdit_method_add_color_region:
  709. .. rst-class:: classref-method
  710. void **add_color_region** **(** :ref:`String<class_String>` begin_key, :ref:`String<class_String>` end_key, :ref:`Color<class_Color>` color, :ref:`bool<class_bool>` line_only=false **)**
  711. Adds color region (given the delimiters) and its colors.
  712. .. rst-class:: classref-item-separator
  713. ----
  714. .. _class_TextEdit_method_add_keyword_color:
  715. .. rst-class:: classref-method
  716. void **add_keyword_color** **(** :ref:`String<class_String>` keyword, :ref:`Color<class_Color>` color **)**
  717. Adds a ``keyword`` and its :ref:`Color<class_Color>`.
  718. .. rst-class:: classref-item-separator
  719. ----
  720. .. _class_TextEdit_method_can_fold:
  721. .. rst-class:: classref-method
  722. :ref:`bool<class_bool>` **can_fold** **(** :ref:`int<class_int>` line **)** |const|
  723. Returns if the given line is foldable, that is, it has indented lines right below it.
  724. .. rst-class:: classref-item-separator
  725. ----
  726. .. _class_TextEdit_method_center_viewport_to_cursor:
  727. .. rst-class:: classref-method
  728. void **center_viewport_to_cursor** **(** **)**
  729. Centers the viewport on the line the editing cursor is at. This also resets the :ref:`scroll_horizontal<class_TextEdit_property_scroll_horizontal>` value to ``0``.
  730. .. rst-class:: classref-item-separator
  731. ----
  732. .. _class_TextEdit_method_clear_colors:
  733. .. rst-class:: classref-method
  734. void **clear_colors** **(** **)**
  735. Clears all custom syntax coloring information previously added with :ref:`add_color_region<class_TextEdit_method_add_color_region>` or :ref:`add_keyword_color<class_TextEdit_method_add_keyword_color>`.
  736. .. rst-class:: classref-item-separator
  737. ----
  738. .. _class_TextEdit_method_clear_undo_history:
  739. .. rst-class:: classref-method
  740. void **clear_undo_history** **(** **)**
  741. Clears the undo history.
  742. .. rst-class:: classref-item-separator
  743. ----
  744. .. _class_TextEdit_method_copy:
  745. .. rst-class:: classref-method
  746. void **copy** **(** **)**
  747. Copy's the current text selection.
  748. .. rst-class:: classref-item-separator
  749. ----
  750. .. _class_TextEdit_method_cursor_get_column:
  751. .. rst-class:: classref-method
  752. :ref:`int<class_int>` **cursor_get_column** **(** **)** |const|
  753. Returns the column the editing cursor is at.
  754. .. rst-class:: classref-item-separator
  755. ----
  756. .. _class_TextEdit_method_cursor_get_line:
  757. .. rst-class:: classref-method
  758. :ref:`int<class_int>` **cursor_get_line** **(** **)** |const|
  759. Returns the line the editing cursor is at.
  760. .. rst-class:: classref-item-separator
  761. ----
  762. .. _class_TextEdit_method_cursor_set_column:
  763. .. rst-class:: classref-method
  764. void **cursor_set_column** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` adjust_viewport=true **)**
  765. Moves the cursor at the specified ``column`` index.
  766. If ``adjust_viewport`` is set to ``true``, the viewport will center at the cursor position after the move occurs.
  767. .. rst-class:: classref-item-separator
  768. ----
  769. .. _class_TextEdit_method_cursor_set_line:
  770. .. rst-class:: classref-method
  771. void **cursor_set_line** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` adjust_viewport=true, :ref:`bool<class_bool>` can_be_hidden=true, :ref:`int<class_int>` wrap_index=0 **)**
  772. Moves the cursor at the specified ``line`` index.
  773. If ``adjust_viewport`` is set to ``true``, the viewport will center at the cursor position after the move occurs.
  774. If ``can_be_hidden`` is set to ``true``, the specified ``line`` can be hidden using :ref:`set_line_as_hidden<class_TextEdit_method_set_line_as_hidden>`.
  775. .. rst-class:: classref-item-separator
  776. ----
  777. .. _class_TextEdit_method_cut:
  778. .. rst-class:: classref-method
  779. void **cut** **(** **)**
  780. Cut's the current selection.
  781. .. rst-class:: classref-item-separator
  782. ----
  783. .. _class_TextEdit_method_deselect:
  784. .. rst-class:: classref-method
  785. void **deselect** **(** **)**
  786. Deselects the current selection.
  787. .. rst-class:: classref-item-separator
  788. ----
  789. .. _class_TextEdit_method_fold_all_lines:
  790. .. rst-class:: classref-method
  791. void **fold_all_lines** **(** **)**
  792. Folds all lines that are possible to be folded (see :ref:`can_fold<class_TextEdit_method_can_fold>`).
  793. .. rst-class:: classref-item-separator
  794. ----
  795. .. _class_TextEdit_method_fold_line:
  796. .. rst-class:: classref-method
  797. void **fold_line** **(** :ref:`int<class_int>` line **)**
  798. Folds the given line, if possible (see :ref:`can_fold<class_TextEdit_method_can_fold>`).
  799. .. rst-class:: classref-item-separator
  800. ----
  801. .. _class_TextEdit_method_get_breakpoints:
  802. .. rst-class:: classref-method
  803. :ref:`Array<class_Array>` **get_breakpoints** **(** **)** |const|
  804. Returns an array containing the line number of each breakpoint.
  805. .. rst-class:: classref-item-separator
  806. ----
  807. .. _class_TextEdit_method_get_keyword_color:
  808. .. rst-class:: classref-method
  809. :ref:`Color<class_Color>` **get_keyword_color** **(** :ref:`String<class_String>` keyword **)** |const|
  810. Returns the :ref:`Color<class_Color>` of the specified ``keyword``.
  811. .. rst-class:: classref-item-separator
  812. ----
  813. .. _class_TextEdit_method_get_line:
  814. .. rst-class:: classref-method
  815. :ref:`String<class_String>` **get_line** **(** :ref:`int<class_int>` line **)** |const|
  816. Returns the text of a specific line.
  817. .. rst-class:: classref-item-separator
  818. ----
  819. .. _class_TextEdit_method_get_line_column_at_pos:
  820. .. rst-class:: classref-method
  821. :ref:`Vector2<class_Vector2>` **get_line_column_at_pos** **(** :ref:`Vector2<class_Vector2>` position **)** |const|
  822. Returns the line and column at the given position. In the returned vector, ``x`` is the column, ``y`` is the line.
  823. .. rst-class:: classref-item-separator
  824. ----
  825. .. _class_TextEdit_method_get_line_count:
  826. .. rst-class:: classref-method
  827. :ref:`int<class_int>` **get_line_count** **(** **)** |const|
  828. Returns the amount of total lines in the text.
  829. .. rst-class:: classref-item-separator
  830. ----
  831. .. _class_TextEdit_method_get_line_height:
  832. .. rst-class:: classref-method
  833. :ref:`int<class_int>` **get_line_height** **(** **)** |const|
  834. Returns the height of a largest line.
  835. .. rst-class:: classref-item-separator
  836. ----
  837. .. _class_TextEdit_method_get_line_width:
  838. .. rst-class:: classref-method
  839. :ref:`int<class_int>` **get_line_width** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=-1 **)** |const|
  840. Returns the width in pixels of the ``wrap_index`` on ``line``.
  841. .. rst-class:: classref-item-separator
  842. ----
  843. .. _class_TextEdit_method_get_line_wrap_count:
  844. .. rst-class:: classref-method
  845. :ref:`int<class_int>` **get_line_wrap_count** **(** :ref:`int<class_int>` line **)** |const|
  846. Returns the number of times the given line is wrapped.
  847. .. rst-class:: classref-item-separator
  848. ----
  849. .. _class_TextEdit_method_get_line_wrapped_text:
  850. .. rst-class:: classref-method
  851. :ref:`PoolStringArray<class_PoolStringArray>` **get_line_wrapped_text** **(** :ref:`int<class_int>` line **)** |const|
  852. Returns an array of :ref:`String<class_String>`\ s representing each wrapped index.
  853. .. rst-class:: classref-item-separator
  854. ----
  855. .. _class_TextEdit_method_get_menu:
  856. .. rst-class:: classref-method
  857. :ref:`PopupMenu<class_PopupMenu>` **get_menu** **(** **)** |const|
  858. Returns the :ref:`PopupMenu<class_PopupMenu>` of this **TextEdit**. By default, this menu is displayed when right-clicking on the **TextEdit**.
  859. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property.
  860. .. rst-class:: classref-item-separator
  861. ----
  862. .. _class_TextEdit_method_get_pos_at_line_column:
  863. .. rst-class:: classref-method
  864. :ref:`Vector2<class_Vector2>` **get_pos_at_line_column** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const|
  865. Returns the local position for the given ``line`` and ``column``. If ``x`` or ``y`` of the returned vector equal ``-1``, the position is outside of the viewable area of the control.
  866. \ **Note:** The Y position corresponds to the bottom side of the line. Use :ref:`get_rect_at_line_column<class_TextEdit_method_get_rect_at_line_column>` to get the top side position.
  867. .. rst-class:: classref-item-separator
  868. ----
  869. .. _class_TextEdit_method_get_rect_at_line_column:
  870. .. rst-class:: classref-method
  871. :ref:`Rect2<class_Rect2>` **get_rect_at_line_column** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const|
  872. Returns the local position and size for the grapheme at the given ``line`` and ``column``. If ``x`` or ``y`` position of the returned rect equal ``-1``, the position is outside of the viewable area of the control.
  873. \ **Note:** The Y position of the returned rect corresponds to the top side of the line, unlike :ref:`get_pos_at_line_column<class_TextEdit_method_get_pos_at_line_column>` which returns the bottom side.
  874. .. rst-class:: classref-item-separator
  875. ----
  876. .. _class_TextEdit_method_get_selection_from_column:
  877. .. rst-class:: classref-method
  878. :ref:`int<class_int>` **get_selection_from_column** **(** **)** |const|
  879. Returns the selection begin column.
  880. .. rst-class:: classref-item-separator
  881. ----
  882. .. _class_TextEdit_method_get_selection_from_line:
  883. .. rst-class:: classref-method
  884. :ref:`int<class_int>` **get_selection_from_line** **(** **)** |const|
  885. Returns the selection begin line.
  886. .. rst-class:: classref-item-separator
  887. ----
  888. .. _class_TextEdit_method_get_selection_text:
  889. .. rst-class:: classref-method
  890. :ref:`String<class_String>` **get_selection_text** **(** **)** |const|
  891. Returns the text inside the selection.
  892. .. rst-class:: classref-item-separator
  893. ----
  894. .. _class_TextEdit_method_get_selection_to_column:
  895. .. rst-class:: classref-method
  896. :ref:`int<class_int>` **get_selection_to_column** **(** **)** |const|
  897. Returns the selection end column.
  898. .. rst-class:: classref-item-separator
  899. ----
  900. .. _class_TextEdit_method_get_selection_to_line:
  901. .. rst-class:: classref-method
  902. :ref:`int<class_int>` **get_selection_to_line** **(** **)** |const|
  903. Returns the selection end line.
  904. .. rst-class:: classref-item-separator
  905. ----
  906. .. _class_TextEdit_method_get_total_gutter_width:
  907. .. rst-class:: classref-method
  908. :ref:`int<class_int>` **get_total_gutter_width** **(** **)** |const|
  909. Returns the total width of all gutters and internal padding.
  910. .. rst-class:: classref-item-separator
  911. ----
  912. .. _class_TextEdit_method_get_total_visible_rows:
  913. .. rst-class:: classref-method
  914. :ref:`int<class_int>` **get_total_visible_rows** **(** **)** |const|
  915. Returns the total amount of lines that could be drawn.
  916. .. rst-class:: classref-item-separator
  917. ----
  918. .. _class_TextEdit_method_get_visible_rows:
  919. .. rst-class:: classref-method
  920. :ref:`int<class_int>` **get_visible_rows** **(** **)** |const|
  921. Returns the number of visible lines, including wrapped text.
  922. .. rst-class:: classref-item-separator
  923. ----
  924. .. _class_TextEdit_method_get_word_under_cursor:
  925. .. rst-class:: classref-method
  926. :ref:`String<class_String>` **get_word_under_cursor** **(** **)** |const|
  927. Returns a :ref:`String<class_String>` text with the word under the caret (text cursor) location.
  928. .. rst-class:: classref-item-separator
  929. ----
  930. .. _class_TextEdit_method_has_keyword_color:
  931. .. rst-class:: classref-method
  932. :ref:`bool<class_bool>` **has_keyword_color** **(** :ref:`String<class_String>` keyword **)** |const|
  933. Returns whether the specified ``keyword`` has a color set to it or not.
  934. .. rst-class:: classref-item-separator
  935. ----
  936. .. _class_TextEdit_method_has_redo:
  937. .. rst-class:: classref-method
  938. :ref:`bool<class_bool>` **has_redo** **(** **)** |const|
  939. Returns ``true`` if a "redo" action is available.
  940. .. rst-class:: classref-item-separator
  941. ----
  942. .. _class_TextEdit_method_has_undo:
  943. .. rst-class:: classref-method
  944. :ref:`bool<class_bool>` **has_undo** **(** **)** |const|
  945. Returns ``true`` if an "undo" action is available.
  946. .. rst-class:: classref-item-separator
  947. ----
  948. .. _class_TextEdit_method_insert_text_at_cursor:
  949. .. rst-class:: classref-method
  950. void **insert_text_at_cursor** **(** :ref:`String<class_String>` text **)**
  951. Insert the specified text at the cursor position.
  952. .. rst-class:: classref-item-separator
  953. ----
  954. .. _class_TextEdit_method_is_folded:
  955. .. rst-class:: classref-method
  956. :ref:`bool<class_bool>` **is_folded** **(** :ref:`int<class_int>` line **)** |const|
  957. Returns whether the line at the specified index is folded or not.
  958. .. rst-class:: classref-item-separator
  959. ----
  960. .. _class_TextEdit_method_is_line_hidden:
  961. .. rst-class:: classref-method
  962. :ref:`bool<class_bool>` **is_line_hidden** **(** :ref:`int<class_int>` line **)** |const|
  963. Returns whether the line at the specified index is hidden or not.
  964. .. rst-class:: classref-item-separator
  965. ----
  966. .. _class_TextEdit_method_is_line_set_as_bookmark:
  967. .. rst-class:: classref-method
  968. :ref:`bool<class_bool>` **is_line_set_as_bookmark** **(** :ref:`int<class_int>` line **)** |const|
  969. Returns ``true`` when the specified ``line`` is bookmarked.
  970. .. rst-class:: classref-item-separator
  971. ----
  972. .. _class_TextEdit_method_is_line_set_as_breakpoint:
  973. .. rst-class:: classref-method
  974. :ref:`bool<class_bool>` **is_line_set_as_breakpoint** **(** :ref:`int<class_int>` line **)** |const|
  975. Returns ``true`` when the specified ``line`` has a breakpoint.
  976. .. rst-class:: classref-item-separator
  977. ----
  978. .. _class_TextEdit_method_is_line_set_as_safe:
  979. .. rst-class:: classref-method
  980. :ref:`bool<class_bool>` **is_line_set_as_safe** **(** :ref:`int<class_int>` line **)** |const|
  981. Returns ``true`` when the specified ``line`` is marked as safe.
  982. .. rst-class:: classref-item-separator
  983. ----
  984. .. _class_TextEdit_method_is_line_wrapped:
  985. .. rst-class:: classref-method
  986. :ref:`bool<class_bool>` **is_line_wrapped** **(** :ref:`int<class_int>` line **)** |const|
  987. Returns if the given line is wrapped.
  988. .. rst-class:: classref-item-separator
  989. ----
  990. .. _class_TextEdit_method_is_mouse_over_selection:
  991. .. rst-class:: classref-method
  992. :ref:`bool<class_bool>` **is_mouse_over_selection** **(** :ref:`bool<class_bool>` edges **)** |const|
  993. Returns whether the mouse is over selection. If ``edges`` is ``true``, the edges are considered part of the selection.
  994. .. rst-class:: classref-item-separator
  995. ----
  996. .. _class_TextEdit_method_is_selection_active:
  997. .. rst-class:: classref-method
  998. :ref:`bool<class_bool>` **is_selection_active** **(** **)** |const|
  999. Returns ``true`` if the selection is active.
  1000. .. rst-class:: classref-item-separator
  1001. ----
  1002. .. _class_TextEdit_method_menu_option:
  1003. .. rst-class:: classref-method
  1004. void **menu_option** **(** :ref:`int<class_int>` option **)**
  1005. Triggers a right-click menu action by the specified index. See :ref:`MenuItems<enum_TextEdit_MenuItems>` for a list of available indexes.
  1006. .. rst-class:: classref-item-separator
  1007. ----
  1008. .. _class_TextEdit_method_paste:
  1009. .. rst-class:: classref-method
  1010. void **paste** **(** **)**
  1011. Paste the current selection.
  1012. .. rst-class:: classref-item-separator
  1013. ----
  1014. .. _class_TextEdit_method_redo:
  1015. .. rst-class:: classref-method
  1016. void **redo** **(** **)**
  1017. Perform redo operation.
  1018. .. rst-class:: classref-item-separator
  1019. ----
  1020. .. _class_TextEdit_method_remove_breakpoints:
  1021. .. rst-class:: classref-method
  1022. void **remove_breakpoints** **(** **)**
  1023. Removes all the breakpoints. This will not fire the :ref:`breakpoint_toggled<class_TextEdit_signal_breakpoint_toggled>` signal.
  1024. .. rst-class:: classref-item-separator
  1025. ----
  1026. .. _class_TextEdit_method_search:
  1027. .. rst-class:: classref-method
  1028. :ref:`PoolIntArray<class_PoolIntArray>` **search** **(** :ref:`String<class_String>` key, :ref:`int<class_int>` flags, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column **)** |const|
  1029. Perform a search inside the text. Search flags can be specified in the :ref:`SearchFlags<enum_TextEdit_SearchFlags>` enum.
  1030. Returns an empty ``PoolIntArray`` if no result was found. Otherwise, the result line and column can be accessed at indices specified in the :ref:`SearchResult<enum_TextEdit_SearchResult>` enum, e.g:
  1031. ::
  1032. var result = search(key, flags, line, column)
  1033. if result.size() > 0:
  1034. # Result found.
  1035. var res_line = result[TextEdit.SEARCH_RESULT_LINE]
  1036. var res_column = result[TextEdit.SEARCH_RESULT_COLUMN]
  1037. .. rst-class:: classref-item-separator
  1038. ----
  1039. .. _class_TextEdit_method_select:
  1040. .. rst-class:: classref-method
  1041. void **select** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_column **)**
  1042. Perform selection, from line/column to line/column.
  1043. If :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` is ``false``, no selection will occur.
  1044. .. rst-class:: classref-item-separator
  1045. ----
  1046. .. _class_TextEdit_method_select_all:
  1047. .. rst-class:: classref-method
  1048. void **select_all** **(** **)**
  1049. Select all the text.
  1050. If :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` is ``false``, no selection will occur.
  1051. .. rst-class:: classref-item-separator
  1052. ----
  1053. .. _class_TextEdit_method_set_line:
  1054. .. rst-class:: classref-method
  1055. void **set_line** **(** :ref:`int<class_int>` line, :ref:`String<class_String>` new_text **)**
  1056. Sets the text for a specific line.
  1057. .. rst-class:: classref-item-separator
  1058. ----
  1059. .. _class_TextEdit_method_set_line_as_bookmark:
  1060. .. rst-class:: classref-method
  1061. void **set_line_as_bookmark** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` bookmark **)**
  1062. Bookmarks the ``line`` if ``bookmark`` is ``true``. Deletes the bookmark if ``bookmark`` is ``false``.
  1063. Bookmarks are shown in the :ref:`breakpoint_gutter<class_TextEdit_property_breakpoint_gutter>`.
  1064. .. rst-class:: classref-item-separator
  1065. ----
  1066. .. _class_TextEdit_method_set_line_as_breakpoint:
  1067. .. rst-class:: classref-method
  1068. void **set_line_as_breakpoint** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` breakpoint **)**
  1069. Adds or removes the breakpoint in ``line``. Breakpoints are shown in the :ref:`breakpoint_gutter<class_TextEdit_property_breakpoint_gutter>`.
  1070. .. rst-class:: classref-item-separator
  1071. ----
  1072. .. _class_TextEdit_method_set_line_as_hidden:
  1073. .. rst-class:: classref-method
  1074. void **set_line_as_hidden** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` enable **)**
  1075. If ``true``, hides the line of the specified index.
  1076. .. rst-class:: classref-item-separator
  1077. ----
  1078. .. _class_TextEdit_method_set_line_as_safe:
  1079. .. rst-class:: classref-method
  1080. void **set_line_as_safe** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` safe **)**
  1081. If ``true``, marks the ``line`` as safe.
  1082. This will show the line number with the color provided in the ``safe_line_number_color`` theme property.
  1083. .. rst-class:: classref-item-separator
  1084. ----
  1085. .. _class_TextEdit_method_toggle_fold_line:
  1086. .. rst-class:: classref-method
  1087. void **toggle_fold_line** **(** :ref:`int<class_int>` line **)**
  1088. Toggle the folding of the code block at the given line.
  1089. .. rst-class:: classref-item-separator
  1090. ----
  1091. .. _class_TextEdit_method_undo:
  1092. .. rst-class:: classref-method
  1093. void **undo** **(** **)**
  1094. Perform undo operation.
  1095. .. rst-class:: classref-item-separator
  1096. ----
  1097. .. _class_TextEdit_method_unfold_line:
  1098. .. rst-class:: classref-method
  1099. void **unfold_line** **(** :ref:`int<class_int>` line **)**
  1100. Unfolds the given line, if folded.
  1101. .. rst-class:: classref-item-separator
  1102. ----
  1103. .. _class_TextEdit_method_unhide_all_lines:
  1104. .. rst-class:: classref-method
  1105. void **unhide_all_lines** **(** **)**
  1106. Unhide all lines that were previously set to hidden by :ref:`set_line_as_hidden<class_TextEdit_method_set_line_as_hidden>`.
  1107. .. rst-class:: classref-section-separator
  1108. ----
  1109. .. rst-class:: classref-descriptions-group
  1110. Theme Property Descriptions
  1111. ---------------------------
  1112. .. _class_TextEdit_theme_color_background_color:
  1113. .. rst-class:: classref-themeproperty
  1114. :ref:`Color<class_Color>` **background_color** = ``Color( 0, 0, 0, 0 )``
  1115. Sets the background :ref:`Color<class_Color>` of this **TextEdit**. :ref:`syntax_highlighting<class_TextEdit_property_syntax_highlighting>` has to be enabled.
  1116. .. rst-class:: classref-item-separator
  1117. ----
  1118. .. _class_TextEdit_theme_color_bookmark_color:
  1119. .. rst-class:: classref-themeproperty
  1120. :ref:`Color<class_Color>` **bookmark_color** = ``Color( 0.08, 0.49, 0.98, 1 )``
  1121. Sets the :ref:`Color<class_Color>` of the bookmark marker. :ref:`syntax_highlighting<class_TextEdit_property_syntax_highlighting>` has to be enabled.
  1122. .. rst-class:: classref-item-separator
  1123. ----
  1124. .. _class_TextEdit_theme_color_brace_mismatch_color:
  1125. .. rst-class:: classref-themeproperty
  1126. :ref:`Color<class_Color>` **brace_mismatch_color** = ``Color( 1, 0.2, 0.2, 1 )``
  1127. .. container:: contribute
  1128. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1129. .. rst-class:: classref-item-separator
  1130. ----
  1131. .. _class_TextEdit_theme_color_breakpoint_color:
  1132. .. rst-class:: classref-themeproperty
  1133. :ref:`Color<class_Color>` **breakpoint_color** = ``Color( 0.8, 0.8, 0.4, 0.2 )``
  1134. Sets the :ref:`Color<class_Color>` of the breakpoints. :ref:`breakpoint_gutter<class_TextEdit_property_breakpoint_gutter>` has to be enabled.
  1135. .. rst-class:: classref-item-separator
  1136. ----
  1137. .. _class_TextEdit_theme_color_caret_background_color:
  1138. .. rst-class:: classref-themeproperty
  1139. :ref:`Color<class_Color>` **caret_background_color** = ``Color( 0, 0, 0, 1 )``
  1140. .. container:: contribute
  1141. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1142. .. rst-class:: classref-item-separator
  1143. ----
  1144. .. _class_TextEdit_theme_color_caret_color:
  1145. .. rst-class:: classref-themeproperty
  1146. :ref:`Color<class_Color>` **caret_color** = ``Color( 0.88, 0.88, 0.88, 1 )``
  1147. .. container:: contribute
  1148. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1149. .. rst-class:: classref-item-separator
  1150. ----
  1151. .. _class_TextEdit_theme_color_code_folding_color:
  1152. .. rst-class:: classref-themeproperty
  1153. :ref:`Color<class_Color>` **code_folding_color** = ``Color( 0.8, 0.8, 0.8, 0.8 )``
  1154. .. container:: contribute
  1155. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1156. .. rst-class:: classref-item-separator
  1157. ----
  1158. .. _class_TextEdit_theme_color_completion_background_color:
  1159. .. rst-class:: classref-themeproperty
  1160. :ref:`Color<class_Color>` **completion_background_color** = ``Color( 0.17, 0.16, 0.2, 1 )``
  1161. .. container:: contribute
  1162. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1163. .. rst-class:: classref-item-separator
  1164. ----
  1165. .. _class_TextEdit_theme_color_completion_existing_color:
  1166. .. rst-class:: classref-themeproperty
  1167. :ref:`Color<class_Color>` **completion_existing_color** = ``Color( 0.87, 0.87, 0.87, 0.13 )``
  1168. .. container:: contribute
  1169. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1170. .. rst-class:: classref-item-separator
  1171. ----
  1172. .. _class_TextEdit_theme_color_completion_font_color:
  1173. .. rst-class:: classref-themeproperty
  1174. :ref:`Color<class_Color>` **completion_font_color** = ``Color( 0.67, 0.67, 0.67, 1 )``
  1175. .. container:: contribute
  1176. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1177. .. rst-class:: classref-item-separator
  1178. ----
  1179. .. _class_TextEdit_theme_color_completion_scroll_color:
  1180. .. rst-class:: classref-themeproperty
  1181. :ref:`Color<class_Color>` **completion_scroll_color** = ``Color( 1, 1, 1, 0.29 )``
  1182. .. container:: contribute
  1183. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1184. .. rst-class:: classref-item-separator
  1185. ----
  1186. .. _class_TextEdit_theme_color_completion_selected_color:
  1187. .. rst-class:: classref-themeproperty
  1188. :ref:`Color<class_Color>` **completion_selected_color** = ``Color( 0.26, 0.26, 0.27, 1 )``
  1189. .. container:: contribute
  1190. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1191. .. rst-class:: classref-item-separator
  1192. ----
  1193. .. _class_TextEdit_theme_color_current_line_color:
  1194. .. rst-class:: classref-themeproperty
  1195. :ref:`Color<class_Color>` **current_line_color** = ``Color( 0.25, 0.25, 0.26, 0.8 )``
  1196. Sets the :ref:`Color<class_Color>` of the breakpoints. :ref:`breakpoint_gutter<class_TextEdit_property_breakpoint_gutter>` has to be enabled.
  1197. .. rst-class:: classref-item-separator
  1198. ----
  1199. .. _class_TextEdit_theme_color_executing_line_color:
  1200. .. rst-class:: classref-themeproperty
  1201. :ref:`Color<class_Color>` **executing_line_color** = ``Color( 0.2, 0.8, 0.2, 0.4 )``
  1202. .. container:: contribute
  1203. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1204. .. rst-class:: classref-item-separator
  1205. ----
  1206. .. _class_TextEdit_theme_color_font_color:
  1207. .. rst-class:: classref-themeproperty
  1208. :ref:`Color<class_Color>` **font_color** = ``Color( 0.88, 0.88, 0.88, 1 )``
  1209. Sets the font :ref:`Color<class_Color>`.
  1210. .. rst-class:: classref-item-separator
  1211. ----
  1212. .. _class_TextEdit_theme_color_font_color_readonly:
  1213. .. rst-class:: classref-themeproperty
  1214. :ref:`Color<class_Color>` **font_color_readonly** = ``Color( 0.88, 0.88, 0.88, 0.5 )``
  1215. .. container:: contribute
  1216. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1217. .. rst-class:: classref-item-separator
  1218. ----
  1219. .. _class_TextEdit_theme_color_font_color_selected:
  1220. .. rst-class:: classref-themeproperty
  1221. :ref:`Color<class_Color>` **font_color_selected** = ``Color( 0, 0, 0, 1 )``
  1222. Sets the :ref:`Color<class_Color>` of the selected text. :ref:`override_selected_font_color<class_TextEdit_property_override_selected_font_color>` has to be enabled.
  1223. .. rst-class:: classref-item-separator
  1224. ----
  1225. .. _class_TextEdit_theme_color_function_color:
  1226. .. rst-class:: classref-themeproperty
  1227. :ref:`Color<class_Color>` **function_color** = ``Color( 0.4, 0.64, 0.81, 1 )``
  1228. .. container:: contribute
  1229. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1230. .. rst-class:: classref-item-separator
  1231. ----
  1232. .. _class_TextEdit_theme_color_line_number_color:
  1233. .. rst-class:: classref-themeproperty
  1234. :ref:`Color<class_Color>` **line_number_color** = ``Color( 0.67, 0.67, 0.67, 0.4 )``
  1235. Sets the :ref:`Color<class_Color>` of the line numbers. :ref:`show_line_numbers<class_TextEdit_property_show_line_numbers>` has to be enabled.
  1236. .. rst-class:: classref-item-separator
  1237. ----
  1238. .. _class_TextEdit_theme_color_mark_color:
  1239. .. rst-class:: classref-themeproperty
  1240. :ref:`Color<class_Color>` **mark_color** = ``Color( 1, 0.4, 0.4, 0.4 )``
  1241. Sets the :ref:`Color<class_Color>` of marked text.
  1242. .. rst-class:: classref-item-separator
  1243. ----
  1244. .. _class_TextEdit_theme_color_member_variable_color:
  1245. .. rst-class:: classref-themeproperty
  1246. :ref:`Color<class_Color>` **member_variable_color** = ``Color( 0.9, 0.31, 0.35, 1 )``
  1247. .. container:: contribute
  1248. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1249. .. rst-class:: classref-item-separator
  1250. ----
  1251. .. _class_TextEdit_theme_color_number_color:
  1252. .. rst-class:: classref-themeproperty
  1253. :ref:`Color<class_Color>` **number_color** = ``Color( 0.92, 0.58, 0.2, 1 )``
  1254. .. container:: contribute
  1255. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1256. .. rst-class:: classref-item-separator
  1257. ----
  1258. .. _class_TextEdit_theme_color_safe_line_number_color:
  1259. .. rst-class:: classref-themeproperty
  1260. :ref:`Color<class_Color>` **safe_line_number_color** = ``Color( 0.67, 0.78, 0.67, 0.6 )``
  1261. .. container:: contribute
  1262. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1263. .. rst-class:: classref-item-separator
  1264. ----
  1265. .. _class_TextEdit_theme_color_selection_color:
  1266. .. rst-class:: classref-themeproperty
  1267. :ref:`Color<class_Color>` **selection_color** = ``Color( 0.49, 0.49, 0.49, 1 )``
  1268. Sets the highlight :ref:`Color<class_Color>` of text selections.
  1269. .. rst-class:: classref-item-separator
  1270. ----
  1271. .. _class_TextEdit_theme_color_symbol_color:
  1272. .. rst-class:: classref-themeproperty
  1273. :ref:`Color<class_Color>` **symbol_color** = ``Color( 0.94, 0.94, 0.94, 1 )``
  1274. .. container:: contribute
  1275. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1276. .. rst-class:: classref-item-separator
  1277. ----
  1278. .. _class_TextEdit_theme_color_word_highlighted_color:
  1279. .. rst-class:: classref-themeproperty
  1280. :ref:`Color<class_Color>` **word_highlighted_color** = ``Color( 0.8, 0.9, 0.9, 0.15 )``
  1281. Sets the highlight :ref:`Color<class_Color>` of multiple occurrences. :ref:`highlight_all_occurrences<class_TextEdit_property_highlight_all_occurrences>` has to be enabled.
  1282. .. rst-class:: classref-item-separator
  1283. ----
  1284. .. _class_TextEdit_theme_constant_completion_lines:
  1285. .. rst-class:: classref-themeproperty
  1286. :ref:`int<class_int>` **completion_lines** = ``7``
  1287. .. container:: contribute
  1288. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1289. .. rst-class:: classref-item-separator
  1290. ----
  1291. .. _class_TextEdit_theme_constant_completion_max_width:
  1292. .. rst-class:: classref-themeproperty
  1293. :ref:`int<class_int>` **completion_max_width** = ``50``
  1294. .. container:: contribute
  1295. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1296. .. rst-class:: classref-item-separator
  1297. ----
  1298. .. _class_TextEdit_theme_constant_completion_scroll_width:
  1299. .. rst-class:: classref-themeproperty
  1300. :ref:`int<class_int>` **completion_scroll_width** = ``6``
  1301. .. container:: contribute
  1302. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1303. .. rst-class:: classref-item-separator
  1304. ----
  1305. .. _class_TextEdit_theme_constant_line_spacing:
  1306. .. rst-class:: classref-themeproperty
  1307. :ref:`int<class_int>` **line_spacing** = ``4``
  1308. Sets the spacing between the lines.
  1309. .. rst-class:: classref-item-separator
  1310. ----
  1311. .. _class_TextEdit_theme_font_font:
  1312. .. rst-class:: classref-themeproperty
  1313. :ref:`Font<class_Font>` **font**
  1314. Sets the default :ref:`Font<class_Font>`.
  1315. .. rst-class:: classref-item-separator
  1316. ----
  1317. .. _class_TextEdit_theme_icon_fold:
  1318. .. rst-class:: classref-themeproperty
  1319. :ref:`Texture<class_Texture>` **fold**
  1320. .. container:: contribute
  1321. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1322. .. rst-class:: classref-item-separator
  1323. ----
  1324. .. _class_TextEdit_theme_icon_folded:
  1325. .. rst-class:: classref-themeproperty
  1326. :ref:`Texture<class_Texture>` **folded**
  1327. .. container:: contribute
  1328. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1329. .. rst-class:: classref-item-separator
  1330. ----
  1331. .. _class_TextEdit_theme_icon_space:
  1332. .. rst-class:: classref-themeproperty
  1333. :ref:`Texture<class_Texture>` **space**
  1334. .. container:: contribute
  1335. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1336. .. rst-class:: classref-item-separator
  1337. ----
  1338. .. _class_TextEdit_theme_icon_tab:
  1339. .. rst-class:: classref-themeproperty
  1340. :ref:`Texture<class_Texture>` **tab**
  1341. Sets a custom :ref:`Texture<class_Texture>` for tab text characters.
  1342. .. rst-class:: classref-item-separator
  1343. ----
  1344. .. _class_TextEdit_theme_style_completion:
  1345. .. rst-class:: classref-themeproperty
  1346. :ref:`StyleBox<class_StyleBox>` **completion**
  1347. .. container:: contribute
  1348. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1349. .. rst-class:: classref-item-separator
  1350. ----
  1351. .. _class_TextEdit_theme_style_focus:
  1352. .. rst-class:: classref-themeproperty
  1353. :ref:`StyleBox<class_StyleBox>` **focus**
  1354. .. container:: contribute
  1355. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1356. .. rst-class:: classref-item-separator
  1357. ----
  1358. .. _class_TextEdit_theme_style_normal:
  1359. .. rst-class:: classref-themeproperty
  1360. :ref:`StyleBox<class_StyleBox>` **normal**
  1361. Sets the :ref:`StyleBox<class_StyleBox>` of this **TextEdit**.
  1362. .. rst-class:: classref-item-separator
  1363. ----
  1364. .. _class_TextEdit_theme_style_read_only:
  1365. .. rst-class:: classref-themeproperty
  1366. :ref:`StyleBox<class_StyleBox>` **read_only**
  1367. Sets the :ref:`StyleBox<class_StyleBox>` of this **TextEdit** when :ref:`readonly<class_TextEdit_property_readonly>` is enabled.
  1368. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1369. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1370. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1371. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`