class_textedit.rst 148 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the TextEdit.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_TextEdit:
  6. TextEdit
  7. ========
  8. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`CodeEdit<class_CodeEdit>`
  10. Multiline text editing control.
  11. Description
  12. -----------
  13. 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.
  14. **Note:** When holding down :kbd:`Alt`, the vertical scroll wheel will scroll 5 times as fast as it would normally do. This also works in the Godot script editor.
  15. Properties
  16. ----------
  17. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  18. | :ref:`bool<class_bool>` | :ref:`caret_blink<class_TextEdit_property_caret_blink>` | ``false`` |
  19. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  20. | :ref:`float<class_float>` | :ref:`caret_blink_speed<class_TextEdit_property_caret_blink_speed>` | ``0.65`` |
  21. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`caret_mid_grapheme<class_TextEdit_property_caret_mid_grapheme>` | ``false`` |
  23. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  24. | :ref:`bool<class_bool>` | :ref:`caret_move_on_right_click<class_TextEdit_property_caret_move_on_right_click>` | ``true`` |
  25. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  26. | :ref:`CaretType<enum_TextEdit_CaretType>` | :ref:`caret_type<class_TextEdit_property_caret_type>` | ``0`` |
  27. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`context_menu_enabled<class_TextEdit_property_context_menu_enabled>` | ``true`` |
  29. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  30. | :ref:`bool<class_bool>` | :ref:`deselect_on_focus_loss_enabled<class_TextEdit_property_deselect_on_focus_loss_enabled>` | ``true`` |
  31. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  32. | :ref:`bool<class_bool>` | :ref:`draw_control_chars<class_TextEdit_property_draw_control_chars>` | ``false`` |
  33. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  34. | :ref:`bool<class_bool>` | :ref:`draw_spaces<class_TextEdit_property_draw_spaces>` | ``false`` |
  35. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  36. | :ref:`bool<class_bool>` | :ref:`draw_tabs<class_TextEdit_property_draw_tabs>` | ``false`` |
  37. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  38. | :ref:`bool<class_bool>` | :ref:`editable<class_TextEdit_property_editable>` | ``true`` |
  39. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  40. | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` *(parent override)* |
  41. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  42. | :ref:`bool<class_bool>` | :ref:`highlight_all_occurrences<class_TextEdit_property_highlight_all_occurrences>` | ``false`` |
  43. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  44. | :ref:`bool<class_bool>` | :ref:`highlight_current_line<class_TextEdit_property_highlight_current_line>` | ``false`` |
  45. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  46. | :ref:`String<class_String>` | :ref:`language<class_TextEdit_property_language>` | ``""`` |
  47. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  48. | :ref:`bool<class_bool>` | :ref:`middle_mouse_paste_enabled<class_TextEdit_property_middle_mouse_paste_enabled>` | ``true`` |
  49. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  50. | :ref:`bool<class_bool>` | :ref:`minimap_draw<class_TextEdit_property_minimap_draw>` | ``false`` |
  51. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  52. | :ref:`int<class_int>` | :ref:`minimap_width<class_TextEdit_property_minimap_width>` | ``80`` |
  53. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  54. | :ref:`CursorShape<enum_Control_CursorShape>` | mouse_default_cursor_shape | ``1`` *(parent override)* |
  55. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  56. | :ref:`bool<class_bool>` | :ref:`override_selected_font_color<class_TextEdit_property_override_selected_font_color>` | ``false`` |
  57. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  58. | :ref:`int<class_int>` | :ref:`scroll_horizontal<class_TextEdit_property_scroll_horizontal>` | ``0`` |
  59. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  60. | :ref:`bool<class_bool>` | :ref:`scroll_past_end_of_file<class_TextEdit_property_scroll_past_end_of_file>` | ``false`` |
  61. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  62. | :ref:`bool<class_bool>` | :ref:`scroll_smooth<class_TextEdit_property_scroll_smooth>` | ``false`` |
  63. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  64. | :ref:`float<class_float>` | :ref:`scroll_v_scroll_speed<class_TextEdit_property_scroll_v_scroll_speed>` | ``80.0`` |
  65. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  66. | :ref:`float<class_float>` | :ref:`scroll_vertical<class_TextEdit_property_scroll_vertical>` | ``0.0`` |
  67. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  68. | :ref:`bool<class_bool>` | :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` | ``true`` |
  69. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  70. | :ref:`bool<class_bool>` | :ref:`shortcut_keys_enabled<class_TextEdit_property_shortcut_keys_enabled>` | ``true`` |
  71. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  72. | :ref:`StructuredTextParser<enum_Control_StructuredTextParser>` | :ref:`structured_text_bidi_override<class_TextEdit_property_structured_text_bidi_override>` | ``0`` |
  73. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  74. | :ref:`Array<class_Array>` | :ref:`structured_text_bidi_override_options<class_TextEdit_property_structured_text_bidi_override_options>` | ``[]`` |
  75. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  76. | :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` | :ref:`syntax_highlighter<class_TextEdit_property_syntax_highlighter>` | |
  77. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  78. | :ref:`String<class_String>` | :ref:`text<class_TextEdit_property_text>` | ``""`` |
  79. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  80. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`text_direction<class_TextEdit_property_text_direction>` | ``0`` |
  81. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  82. | :ref:`bool<class_bool>` | :ref:`virtual_keyboard_enabled<class_TextEdit_property_virtual_keyboard_enabled>` | ``true`` |
  83. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  84. | :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` | :ref:`wrap_mode<class_TextEdit_property_wrap_mode>` | ``0`` |
  85. +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+---------------------------+
  86. Methods
  87. -------
  88. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`_backspace<class_TextEdit_method__backspace>` **(** **)** |virtual| |
  90. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | void | :ref:`_copy<class_TextEdit_method__copy>` **(** **)** |virtual| |
  92. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | void | :ref:`_cut<class_TextEdit_method__cut>` **(** **)** |virtual| |
  94. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | void | :ref:`_handle_unicode_input<class_TextEdit_method__handle_unicode_input>` **(** :ref:`int<class_int>` unicode_char **)** |virtual| |
  96. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | void | :ref:`_paste<class_TextEdit_method__paste>` **(** **)** |virtual| |
  98. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | void | :ref:`_paste_primary_clipboard<class_TextEdit_method__paste_primary_clipboard>` **(** **)** |virtual| |
  100. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | void | :ref:`add_gutter<class_TextEdit_method_add_gutter>` **(** :ref:`int<class_int>` at=-1 **)** |
  102. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | void | :ref:`adjust_viewport_to_caret<class_TextEdit_method_adjust_viewport_to_caret>` **(** **)** |
  104. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | void | :ref:`backspace<class_TextEdit_method_backspace>` **(** **)** |
  106. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | void | :ref:`begin_complex_operation<class_TextEdit_method_begin_complex_operation>` **(** **)** |
  108. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | void | :ref:`center_viewport_to_caret<class_TextEdit_method_center_viewport_to_caret>` **(** **)** |
  110. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | void | :ref:`clear<class_TextEdit_method_clear>` **(** **)** |
  112. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | void | :ref:`clear_opentype_features<class_TextEdit_method_clear_opentype_features>` **(** **)** |
  114. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | void | :ref:`clear_undo_history<class_TextEdit_method_clear_undo_history>` **(** **)** |
  116. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | void | :ref:`copy<class_TextEdit_method_copy>` **(** **)** |
  118. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | void | :ref:`cut<class_TextEdit_method_cut>` **(** **)** |
  120. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | void | :ref:`delete_selection<class_TextEdit_method_delete_selection>` **(** **)** |
  122. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | void | :ref:`deselect<class_TextEdit_method_deselect>` **(** **)** |
  124. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | void | :ref:`end_complex_operation<class_TextEdit_method_end_complex_operation>` **(** **)** |
  126. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | :ref:`int<class_int>` | :ref:`get_caret_column<class_TextEdit_method_get_caret_column>` **(** **)** |const| |
  128. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | :ref:`Vector2<class_Vector2>` | :ref:`get_caret_draw_pos<class_TextEdit_method_get_caret_draw_pos>` **(** **)** |const| |
  130. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | :ref:`int<class_int>` | :ref:`get_caret_line<class_TextEdit_method_get_caret_line>` **(** **)** |const| |
  132. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | :ref:`int<class_int>` | :ref:`get_caret_wrap_index<class_TextEdit_method_get_caret_wrap_index>` **(** **)** |const| |
  134. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | :ref:`int<class_int>` | :ref:`get_first_non_whitespace_column<class_TextEdit_method_get_first_non_whitespace_column>` **(** :ref:`int<class_int>` line **)** |const| |
  136. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | :ref:`int<class_int>` | :ref:`get_first_visible_line<class_TextEdit_method_get_first_visible_line>` **(** **)** |const| |
  138. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | :ref:`int<class_int>` | :ref:`get_gutter_count<class_TextEdit_method_get_gutter_count>` **(** **)** |const| |
  140. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | :ref:`String<class_String>` | :ref:`get_gutter_name<class_TextEdit_method_get_gutter_name>` **(** :ref:`int<class_int>` gutter **)** |const| |
  142. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | :ref:`GutterType<enum_TextEdit_GutterType>` | :ref:`get_gutter_type<class_TextEdit_method_get_gutter_type>` **(** :ref:`int<class_int>` gutter **)** |const| |
  144. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | :ref:`int<class_int>` | :ref:`get_gutter_width<class_TextEdit_method_get_gutter_width>` **(** :ref:`int<class_int>` gutter **)** |const| |
  146. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | :ref:`int<class_int>` | :ref:`get_indent_level<class_TextEdit_method_get_indent_level>` **(** :ref:`int<class_int>` line **)** |const| |
  148. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | :ref:`int<class_int>` | :ref:`get_last_full_visible_line<class_TextEdit_method_get_last_full_visible_line>` **(** **)** |const| |
  150. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | :ref:`int<class_int>` | :ref:`get_last_full_visible_line_wrap_index<class_TextEdit_method_get_last_full_visible_line_wrap_index>` **(** **)** |const| |
  152. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | :ref:`int<class_int>` | :ref:`get_last_unhidden_line<class_TextEdit_method_get_last_unhidden_line>` **(** **)** |const| |
  154. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | :ref:`String<class_String>` | :ref:`get_line<class_TextEdit_method_get_line>` **(** :ref:`int<class_int>` line **)** |const| |
  156. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | :ref:`Color<class_Color>` | :ref:`get_line_background_color<class_TextEdit_method_get_line_background_color>` **(** :ref:`int<class_int>` line **)** |const| |
  158. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | :ref:`Vector2i<class_Vector2i>` | :ref:`get_line_column_at_pos<class_TextEdit_method_get_line_column_at_pos>` **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`bool<class_bool>` allow_out_of_bounds=true **)** |const| |
  160. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | :ref:`int<class_int>` | :ref:`get_line_count<class_TextEdit_method_get_line_count>` **(** **)** |const| |
  162. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_line_gutter_icon<class_TextEdit_method_get_line_gutter_icon>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| |
  164. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | :ref:`Color<class_Color>` | :ref:`get_line_gutter_item_color<class_TextEdit_method_get_line_gutter_item_color>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| |
  166. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | :ref:`Variant<class_Variant>` | :ref:`get_line_gutter_metadata<class_TextEdit_method_get_line_gutter_metadata>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| |
  168. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | :ref:`String<class_String>` | :ref:`get_line_gutter_text<class_TextEdit_method_get_line_gutter_text>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| |
  170. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. | :ref:`int<class_int>` | :ref:`get_line_height<class_TextEdit_method_get_line_height>` **(** **)** |const| |
  172. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  173. | :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| |
  174. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  175. | :ref:`int<class_int>` | :ref:`get_line_wrap_count<class_TextEdit_method_get_line_wrap_count>` **(** :ref:`int<class_int>` line **)** |const| |
  176. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  177. | :ref:`int<class_int>` | :ref:`get_line_wrap_index_at_column<class_TextEdit_method_get_line_wrap_index_at_column>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| |
  178. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  179. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_line_wrapped_text<class_TextEdit_method_get_line_wrapped_text>` **(** :ref:`int<class_int>` line **)** |const| |
  180. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  181. | :ref:`Vector2<class_Vector2>` | :ref:`get_local_mouse_pos<class_TextEdit_method_get_local_mouse_pos>` **(** **)** |const| |
  182. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  183. | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_TextEdit_method_get_menu>` **(** **)** |const| |
  184. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  185. | :ref:`int<class_int>` | :ref:`get_minimap_line_at_pos<class_TextEdit_method_get_minimap_line_at_pos>` **(** :ref:`Vector2i<class_Vector2i>` position **)** |const| |
  186. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  187. | :ref:`int<class_int>` | :ref:`get_minimap_visible_lines<class_TextEdit_method_get_minimap_visible_lines>` **(** **)** |const| |
  188. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  189. | :ref:`Vector2i<class_Vector2i>` | :ref:`get_next_visible_line_index_offset_from<class_TextEdit_method_get_next_visible_line_index_offset_from>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index, :ref:`int<class_int>` visible_amount **)** |const| |
  190. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  191. | :ref:`int<class_int>` | :ref:`get_next_visible_line_offset_from<class_TextEdit_method_get_next_visible_line_offset_from>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` visible_amount **)** |const| |
  192. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  193. | :ref:`int<class_int>` | :ref:`get_opentype_feature<class_TextEdit_method_get_opentype_feature>` **(** :ref:`String<class_String>` tag **)** |const| |
  194. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  195. | :ref:`int<class_int>` | :ref:`get_saved_version<class_TextEdit_method_get_saved_version>` **(** **)** |const| |
  196. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  197. | :ref:`float<class_float>` | :ref:`get_scroll_pos_for_line<class_TextEdit_method_get_scroll_pos_for_line>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** |const| |
  198. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  199. | :ref:`String<class_String>` | :ref:`get_selected_text<class_TextEdit_method_get_selected_text>` **(** **)** |const| |
  200. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  201. | :ref:`int<class_int>` | :ref:`get_selection_column<class_TextEdit_method_get_selection_column>` **(** **)** |const| |
  202. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  203. | :ref:`int<class_int>` | :ref:`get_selection_from_column<class_TextEdit_method_get_selection_from_column>` **(** **)** |const| |
  204. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  205. | :ref:`int<class_int>` | :ref:`get_selection_from_line<class_TextEdit_method_get_selection_from_line>` **(** **)** |const| |
  206. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  207. | :ref:`int<class_int>` | :ref:`get_selection_line<class_TextEdit_method_get_selection_line>` **(** **)** |const| |
  208. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  209. | :ref:`SelectionMode<enum_TextEdit_SelectionMode>` | :ref:`get_selection_mode<class_TextEdit_method_get_selection_mode>` **(** **)** |const| |
  210. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  211. | :ref:`int<class_int>` | :ref:`get_selection_to_column<class_TextEdit_method_get_selection_to_column>` **(** **)** |const| |
  212. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  213. | :ref:`int<class_int>` | :ref:`get_selection_to_line<class_TextEdit_method_get_selection_to_line>` **(** **)** |const| |
  214. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  215. | :ref:`int<class_int>` | :ref:`get_tab_size<class_TextEdit_method_get_tab_size>` **(** **)** |const| |
  216. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  217. | :ref:`int<class_int>` | :ref:`get_total_gutter_width<class_TextEdit_method_get_total_gutter_width>` **(** **)** |const| |
  218. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  219. | :ref:`int<class_int>` | :ref:`get_total_visible_line_count<class_TextEdit_method_get_total_visible_line_count>` **(** **)** |const| |
  220. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  221. | :ref:`int<class_int>` | :ref:`get_version<class_TextEdit_method_get_version>` **(** **)** |const| |
  222. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  223. | :ref:`int<class_int>` | :ref:`get_visible_line_count<class_TextEdit_method_get_visible_line_count>` **(** **)** |const| |
  224. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  225. | :ref:`int<class_int>` | :ref:`get_visible_line_count_in_range<class_TextEdit_method_get_visible_line_count_in_range>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** |const| |
  226. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  227. | :ref:`String<class_String>` | :ref:`get_word_at_pos<class_TextEdit_method_get_word_at_pos>` **(** :ref:`Vector2<class_Vector2>` position **)** |const| |
  228. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  229. | :ref:`String<class_String>` | :ref:`get_word_under_caret<class_TextEdit_method_get_word_under_caret>` **(** **)** |const| |
  230. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  231. | :ref:`bool<class_bool>` | :ref:`has_ime_text<class_TextEdit_method_has_ime_text>` **(** **)** |const| |
  232. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  233. | :ref:`bool<class_bool>` | :ref:`has_redo<class_TextEdit_method_has_redo>` **(** **)** |const| |
  234. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  235. | :ref:`bool<class_bool>` | :ref:`has_selection<class_TextEdit_method_has_selection>` **(** **)** |const| |
  236. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  237. | :ref:`bool<class_bool>` | :ref:`has_undo<class_TextEdit_method_has_undo>` **(** **)** |const| |
  238. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  239. | void | :ref:`insert_line_at<class_TextEdit_method_insert_line_at>` **(** :ref:`int<class_int>` line, :ref:`String<class_String>` text **)** |
  240. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  241. | void | :ref:`insert_text_at_caret<class_TextEdit_method_insert_text_at_caret>` **(** :ref:`String<class_String>` text **)** |
  242. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  243. | :ref:`bool<class_bool>` | :ref:`is_caret_visible<class_TextEdit_method_is_caret_visible>` **(** **)** |const| |
  244. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  245. | :ref:`bool<class_bool>` | :ref:`is_dragging_cursor<class_TextEdit_method_is_dragging_cursor>` **(** **)** |const| |
  246. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  247. | :ref:`bool<class_bool>` | :ref:`is_gutter_clickable<class_TextEdit_method_is_gutter_clickable>` **(** :ref:`int<class_int>` gutter **)** |const| |
  248. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  249. | :ref:`bool<class_bool>` | :ref:`is_gutter_drawn<class_TextEdit_method_is_gutter_drawn>` **(** :ref:`int<class_int>` gutter **)** |const| |
  250. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  251. | :ref:`bool<class_bool>` | :ref:`is_gutter_overwritable<class_TextEdit_method_is_gutter_overwritable>` **(** :ref:`int<class_int>` gutter **)** |const| |
  252. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  253. | :ref:`bool<class_bool>` | :ref:`is_line_gutter_clickable<class_TextEdit_method_is_line_gutter_clickable>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| |
  254. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  255. | :ref:`bool<class_bool>` | :ref:`is_line_wrapped<class_TextEdit_method_is_line_wrapped>` **(** :ref:`int<class_int>` line **)** |const| |
  256. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  257. | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_TextEdit_method_is_menu_visible>` **(** **)** |const| |
  258. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  259. | :ref:`bool<class_bool>` | :ref:`is_overtype_mode_enabled<class_TextEdit_method_is_overtype_mode_enabled>` **(** **)** |const| |
  260. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  261. | void | :ref:`menu_option<class_TextEdit_method_menu_option>` **(** :ref:`int<class_int>` option **)** |
  262. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  263. | void | :ref:`merge_gutters<class_TextEdit_method_merge_gutters>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** |
  264. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  265. | void | :ref:`paste<class_TextEdit_method_paste>` **(** **)** |
  266. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  267. | void | :ref:`redo<class_TextEdit_method_redo>` **(** **)** |
  268. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  269. | void | :ref:`remove_gutter<class_TextEdit_method_remove_gutter>` **(** :ref:`int<class_int>` gutter **)** |
  270. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  271. | void | :ref:`remove_text<class_TextEdit_method_remove_text>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_column **)** |
  272. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  273. | :ref:`Vector2i<class_Vector2i>` | :ref:`search<class_TextEdit_method_search>` **(** :ref:`String<class_String>` text, :ref:`int<class_int>` flags, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_colum **)** |const| |
  274. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  275. | 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 **)** |
  276. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  277. | void | :ref:`select_all<class_TextEdit_method_select_all>` **(** **)** |
  278. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  279. | void | :ref:`select_word_under_caret<class_TextEdit_method_select_word_under_caret>` **(** **)** |
  280. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  281. | void | :ref:`set_caret_column<class_TextEdit_method_set_caret_column>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` adjust_viewport=true **)** |
  282. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  283. | void | :ref:`set_caret_line<class_TextEdit_method_set_caret_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 **)** |
  284. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  285. | void | :ref:`set_gutter_clickable<class_TextEdit_method_set_gutter_clickable>` **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` clickable **)** |
  286. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  287. | void | :ref:`set_gutter_custom_draw<class_TextEdit_method_set_gutter_custom_draw>` **(** :ref:`int<class_int>` column, :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` callback **)** |
  288. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  289. | void | :ref:`set_gutter_draw<class_TextEdit_method_set_gutter_draw>` **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` draw **)** |
  290. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  291. | void | :ref:`set_gutter_name<class_TextEdit_method_set_gutter_name>` **(** :ref:`int<class_int>` gutter, :ref:`String<class_String>` name **)** |
  292. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  293. | void | :ref:`set_gutter_overwritable<class_TextEdit_method_set_gutter_overwritable>` **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` overwritable **)** |
  294. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  295. | void | :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>` **(** :ref:`int<class_int>` gutter, :ref:`GutterType<enum_TextEdit_GutterType>` type **)** |
  296. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  297. | void | :ref:`set_gutter_width<class_TextEdit_method_set_gutter_width>` **(** :ref:`int<class_int>` gutter, :ref:`int<class_int>` width **)** |
  298. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  299. | void | :ref:`set_line<class_TextEdit_method_set_line>` **(** :ref:`int<class_int>` line, :ref:`String<class_String>` new_text **)** |
  300. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  301. | void | :ref:`set_line_as_center_visible<class_TextEdit_method_set_line_as_center_visible>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** |
  302. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  303. | void | :ref:`set_line_as_first_visible<class_TextEdit_method_set_line_as_first_visible>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** |
  304. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  305. | void | :ref:`set_line_as_last_visible<class_TextEdit_method_set_line_as_last_visible>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** |
  306. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  307. | void | :ref:`set_line_background_color<class_TextEdit_method_set_line_background_color>` **(** :ref:`int<class_int>` line, :ref:`Color<class_Color>` color **)** |
  308. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  309. | void | :ref:`set_line_gutter_clickable<class_TextEdit_method_set_line_gutter_clickable>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` clickable **)** |
  310. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  311. | void | :ref:`set_line_gutter_icon<class_TextEdit_method_set_line_gutter_icon>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Texture2D<class_Texture2D>` icon **)** |
  312. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  313. | void | :ref:`set_line_gutter_item_color<class_TextEdit_method_set_line_gutter_item_color>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Color<class_Color>` color **)** |
  314. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  315. | void | :ref:`set_line_gutter_metadata<class_TextEdit_method_set_line_gutter_metadata>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Variant<class_Variant>` metadata **)** |
  316. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  317. | void | :ref:`set_line_gutter_text<class_TextEdit_method_set_line_gutter_text>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`String<class_String>` text **)** |
  318. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  319. | void | :ref:`set_opentype_feature<class_TextEdit_method_set_opentype_feature>` **(** :ref:`String<class_String>` tag, :ref:`int<class_int>` value **)** |
  320. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  321. | void | :ref:`set_overtype_mode_enabled<class_TextEdit_method_set_overtype_mode_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |
  322. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  323. | void | :ref:`set_search_flags<class_TextEdit_method_set_search_flags>` **(** :ref:`int<class_int>` flags **)** |
  324. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  325. | void | :ref:`set_search_text<class_TextEdit_method_set_search_text>` **(** :ref:`String<class_String>` search_text **)** |
  326. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  327. | void | :ref:`set_selection_mode<class_TextEdit_method_set_selection_mode>` **(** :ref:`SelectionMode<enum_TextEdit_SelectionMode>` mode, :ref:`int<class_int>` line=-1, :ref:`int<class_int>` column=-1 **)** |
  328. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  329. | void | :ref:`set_tab_size<class_TextEdit_method_set_tab_size>` **(** :ref:`int<class_int>` size **)** |
  330. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  331. | void | :ref:`set_tooltip_request_func<class_TextEdit_method_set_tooltip_request_func>` **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` callback, :ref:`Variant<class_Variant>` data **)** |
  332. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  333. | void | :ref:`swap_lines<class_TextEdit_method_swap_lines>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** |
  334. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  335. | void | :ref:`tag_saved_version<class_TextEdit_method_tag_saved_version>` **(** **)** |
  336. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  337. | void | :ref:`undo<class_TextEdit_method_undo>` **(** **)** |
  338. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  339. Theme Properties
  340. ----------------
  341. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  342. | :ref:`Color<class_Color>` | :ref:`background_color<class_TextEdit_theme_color_background_color>` | ``Color(0, 0, 0, 0)`` |
  343. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  344. | :ref:`Color<class_Color>` | :ref:`caret_background_color<class_TextEdit_theme_color_caret_background_color>` | ``Color(0, 0, 0, 1)`` |
  345. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  346. | :ref:`Color<class_Color>` | :ref:`caret_color<class_TextEdit_theme_color_caret_color>` | ``Color(0.88, 0.88, 0.88, 1)`` |
  347. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  348. | :ref:`Color<class_Color>` | :ref:`current_line_color<class_TextEdit_theme_color_current_line_color>` | ``Color(0.25, 0.25, 0.26, 0.8)`` |
  349. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  350. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_TextEdit_theme_style_focus>` | |
  351. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  352. | :ref:`Font<class_Font>` | :ref:`font<class_TextEdit_theme_font_font>` | |
  353. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  354. | :ref:`Color<class_Color>` | :ref:`font_color<class_TextEdit_theme_color_font_color>` | ``Color(0.88, 0.88, 0.88, 1)`` |
  355. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  356. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TextEdit_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
  357. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  358. | :ref:`Color<class_Color>` | :ref:`font_readonly_color<class_TextEdit_theme_color_font_readonly_color>` | ``Color(0.88, 0.88, 0.88, 0.5)`` |
  359. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  360. | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_TextEdit_theme_color_font_selected_color>` | ``Color(0, 0, 0, 1)`` |
  361. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  362. | :ref:`int<class_int>` | :ref:`font_size<class_TextEdit_theme_font_size_font_size>` | |
  363. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  364. | :ref:`int<class_int>` | :ref:`line_spacing<class_TextEdit_theme_constant_line_spacing>` | ``4`` |
  365. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  366. | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_TextEdit_theme_style_normal>` | |
  367. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  368. | :ref:`int<class_int>` | :ref:`outline_size<class_TextEdit_theme_constant_outline_size>` | ``0`` |
  369. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  370. | :ref:`StyleBox<class_StyleBox>` | :ref:`read_only<class_TextEdit_theme_style_read_only>` | |
  371. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  372. | :ref:`Color<class_Color>` | :ref:`search_result_border_color<class_TextEdit_theme_color_search_result_border_color>` | ``Color(0.3, 0.3, 0.3, 0.4)`` |
  373. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  374. | :ref:`Color<class_Color>` | :ref:`search_result_color<class_TextEdit_theme_color_search_result_color>` | ``Color(0.3, 0.3, 0.3, 1)`` |
  375. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  376. | :ref:`Color<class_Color>` | :ref:`selection_color<class_TextEdit_theme_color_selection_color>` | ``Color(0.49, 0.49, 0.49, 1)`` |
  377. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  378. | :ref:`Texture2D<class_Texture2D>` | :ref:`space<class_TextEdit_theme_icon_space>` | |
  379. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  380. | :ref:`Texture2D<class_Texture2D>` | :ref:`tab<class_TextEdit_theme_icon_tab>` | |
  381. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  382. | :ref:`Color<class_Color>` | :ref:`word_highlighted_color<class_TextEdit_theme_color_word_highlighted_color>` | ``Color(0.8, 0.9, 0.9, 0.15)`` |
  383. +-----------------------------------+------------------------------------------------------------------------------------------+----------------------------------+
  384. Signals
  385. -------
  386. .. _class_TextEdit_signal_caret_changed:
  387. - **caret_changed** **(** **)**
  388. Emitted when the caret changes position.
  389. ----
  390. .. _class_TextEdit_signal_gutter_added:
  391. - **gutter_added** **(** **)**
  392. Emitted when a gutter is added.
  393. ----
  394. .. _class_TextEdit_signal_gutter_clicked:
  395. - **gutter_clicked** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)**
  396. Emitted when a gutter is clicked.
  397. ----
  398. .. _class_TextEdit_signal_gutter_removed:
  399. - **gutter_removed** **(** **)**
  400. Emitted when a gutter is removed.
  401. ----
  402. .. _class_TextEdit_signal_lines_edited_from:
  403. - **lines_edited_from** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)**
  404. Emitted immediately when the text changes.
  405. When text is added ``from_line`` will be less then ``to_line``. On a remove ``to_line`` will be less then ``from_line``.
  406. ----
  407. .. _class_TextEdit_signal_text_changed:
  408. - **text_changed** **(** **)**
  409. Emitted when the text changes.
  410. ----
  411. .. _class_TextEdit_signal_text_set:
  412. - **text_set** **(** **)**
  413. Emitted when :ref:`clear<class_TextEdit_method_clear>` is called or :ref:`text<class_TextEdit_property_text>` is set.
  414. Enumerations
  415. ------------
  416. .. _enum_TextEdit_MenuItems:
  417. .. _class_TextEdit_constant_MENU_CUT:
  418. .. _class_TextEdit_constant_MENU_COPY:
  419. .. _class_TextEdit_constant_MENU_PASTE:
  420. .. _class_TextEdit_constant_MENU_CLEAR:
  421. .. _class_TextEdit_constant_MENU_SELECT_ALL:
  422. .. _class_TextEdit_constant_MENU_UNDO:
  423. .. _class_TextEdit_constant_MENU_REDO:
  424. .. _class_TextEdit_constant_MENU_DIR_INHERITED:
  425. .. _class_TextEdit_constant_MENU_DIR_AUTO:
  426. .. _class_TextEdit_constant_MENU_DIR_LTR:
  427. .. _class_TextEdit_constant_MENU_DIR_RTL:
  428. .. _class_TextEdit_constant_MENU_DISPLAY_UCC:
  429. .. _class_TextEdit_constant_MENU_INSERT_LRM:
  430. .. _class_TextEdit_constant_MENU_INSERT_RLM:
  431. .. _class_TextEdit_constant_MENU_INSERT_LRE:
  432. .. _class_TextEdit_constant_MENU_INSERT_RLE:
  433. .. _class_TextEdit_constant_MENU_INSERT_LRO:
  434. .. _class_TextEdit_constant_MENU_INSERT_RLO:
  435. .. _class_TextEdit_constant_MENU_INSERT_PDF:
  436. .. _class_TextEdit_constant_MENU_INSERT_ALM:
  437. .. _class_TextEdit_constant_MENU_INSERT_LRI:
  438. .. _class_TextEdit_constant_MENU_INSERT_RLI:
  439. .. _class_TextEdit_constant_MENU_INSERT_FSI:
  440. .. _class_TextEdit_constant_MENU_INSERT_PDI:
  441. .. _class_TextEdit_constant_MENU_INSERT_ZWJ:
  442. .. _class_TextEdit_constant_MENU_INSERT_ZWNJ:
  443. .. _class_TextEdit_constant_MENU_INSERT_WJ:
  444. .. _class_TextEdit_constant_MENU_INSERT_SHY:
  445. .. _class_TextEdit_constant_MENU_MAX:
  446. enum **MenuItems**:
  447. - **MENU_CUT** = **0** --- Cuts (copies and clears) the selected text.
  448. - **MENU_COPY** = **1** --- Copies the selected text.
  449. - **MENU_PASTE** = **2** --- Pastes the clipboard text over the selected text (or at the cursor's position).
  450. - **MENU_CLEAR** = **3** --- Erases the whole ``TextEdit`` text.
  451. - **MENU_SELECT_ALL** = **4** --- Selects the whole ``TextEdit`` text.
  452. - **MENU_UNDO** = **5** --- Undoes the previous action.
  453. - **MENU_REDO** = **6** --- Redoes the previous action.
  454. - **MENU_DIR_INHERITED** = **7** --- Sets text direction to inherited.
  455. - **MENU_DIR_AUTO** = **8** --- Sets text direction to automatic.
  456. - **MENU_DIR_LTR** = **9** --- Sets text direction to left-to-right.
  457. - **MENU_DIR_RTL** = **10** --- Sets text direction to right-to-left.
  458. - **MENU_DISPLAY_UCC** = **11** --- Toggles control character display.
  459. - **MENU_INSERT_LRM** = **12** --- Inserts left-to-right mark (LRM) character.
  460. - **MENU_INSERT_RLM** = **13** --- Inserts right-to-left mark (RLM) character.
  461. - **MENU_INSERT_LRE** = **14** --- Inserts start of left-to-right embedding (LRE) character.
  462. - **MENU_INSERT_RLE** = **15** --- Inserts start of right-to-left embedding (RLE) character.
  463. - **MENU_INSERT_LRO** = **16** --- Inserts start of left-to-right override (LRO) character.
  464. - **MENU_INSERT_RLO** = **17** --- Inserts start of right-to-left override (RLO) character.
  465. - **MENU_INSERT_PDF** = **18** --- Inserts pop direction formatting (PDF) character.
  466. - **MENU_INSERT_ALM** = **19** --- Inserts Arabic letter mark (ALM) character.
  467. - **MENU_INSERT_LRI** = **20** --- Inserts left-to-right isolate (LRI) character.
  468. - **MENU_INSERT_RLI** = **21** --- Inserts right-to-left isolate (RLI) character.
  469. - **MENU_INSERT_FSI** = **22** --- Inserts first strong isolate (FSI) character.
  470. - **MENU_INSERT_PDI** = **23** --- Inserts pop direction isolate (PDI) character.
  471. - **MENU_INSERT_ZWJ** = **24** --- Inserts zero width joiner (ZWJ) character.
  472. - **MENU_INSERT_ZWNJ** = **25** --- Inserts zero width non-joiner (ZWNJ) character.
  473. - **MENU_INSERT_WJ** = **26** --- Inserts word joiner (WJ) character.
  474. - **MENU_INSERT_SHY** = **27** --- Inserts soft hyphen (SHY) character.
  475. - **MENU_MAX** = **28** --- Represents the size of the :ref:`MenuItems<enum_TextEdit_MenuItems>` enum.
  476. ----
  477. .. _enum_TextEdit_SearchFlags:
  478. .. _class_TextEdit_constant_SEARCH_MATCH_CASE:
  479. .. _class_TextEdit_constant_SEARCH_WHOLE_WORDS:
  480. .. _class_TextEdit_constant_SEARCH_BACKWARDS:
  481. enum **SearchFlags**:
  482. - **SEARCH_MATCH_CASE** = **1** --- Match case when searching.
  483. - **SEARCH_WHOLE_WORDS** = **2** --- Match whole words when searching.
  484. - **SEARCH_BACKWARDS** = **4** --- Search from end to beginning.
  485. ----
  486. .. _enum_TextEdit_CaretType:
  487. .. _class_TextEdit_constant_CARET_TYPE_LINE:
  488. .. _class_TextEdit_constant_CARET_TYPE_BLOCK:
  489. enum **CaretType**:
  490. - **CARET_TYPE_LINE** = **0** --- Vertical line caret.
  491. - **CARET_TYPE_BLOCK** = **1** --- Block caret.
  492. ----
  493. .. _enum_TextEdit_SelectionMode:
  494. .. _class_TextEdit_constant_SELECTION_MODE_NONE:
  495. .. _class_TextEdit_constant_SELECTION_MODE_SHIFT:
  496. .. _class_TextEdit_constant_SELECTION_MODE_POINTER:
  497. .. _class_TextEdit_constant_SELECTION_MODE_WORD:
  498. .. _class_TextEdit_constant_SELECTION_MODE_LINE:
  499. enum **SelectionMode**:
  500. - **SELECTION_MODE_NONE** = **0** --- Not selecting.
  501. - **SELECTION_MODE_SHIFT** = **1** --- Select as if ``shift`` is pressed.
  502. - **SELECTION_MODE_POINTER** = **2** --- Select single characters as if the user single clicked.
  503. - **SELECTION_MODE_WORD** = **3** --- Select whole words as if the user double clicked.
  504. - **SELECTION_MODE_LINE** = **4** --- Select whole lines as if the user tripped clicked.
  505. ----
  506. .. _enum_TextEdit_LineWrappingMode:
  507. .. _class_TextEdit_constant_LINE_WRAPPING_NONE:
  508. .. _class_TextEdit_constant_LINE_WRAPPING_BOUNDARY:
  509. enum **LineWrappingMode**:
  510. - **LINE_WRAPPING_NONE** = **0** --- Line wrapping is disabled.
  511. - **LINE_WRAPPING_BOUNDARY** = **1** --- Line wrapping occurs at the control boundary, beyond what would normally be visible.
  512. ----
  513. .. _enum_TextEdit_GutterType:
  514. .. _class_TextEdit_constant_GUTTER_TYPE_STRING:
  515. .. _class_TextEdit_constant_GUTTER_TYPE_ICON:
  516. .. _class_TextEdit_constant_GUTTER_TYPE_CUSTOM:
  517. enum **GutterType**:
  518. - **GUTTER_TYPE_STRING** = **0** --- Draw a string.
  519. - **GUTTER_TYPE_ICON** = **1** --- Draw an icon.
  520. - **GUTTER_TYPE_CUSTOM** = **2** --- Custom draw.
  521. Property Descriptions
  522. ---------------------
  523. .. _class_TextEdit_property_caret_blink:
  524. - :ref:`bool<class_bool>` **caret_blink**
  525. +-----------+--------------------------------+
  526. | *Default* | ``false`` |
  527. +-----------+--------------------------------+
  528. | *Setter* | set_caret_blink_enabled(value) |
  529. +-----------+--------------------------------+
  530. | *Getter* | is_caret_blink_enabled() |
  531. +-----------+--------------------------------+
  532. Sets if the caret should blink.
  533. ----
  534. .. _class_TextEdit_property_caret_blink_speed:
  535. - :ref:`float<class_float>` **caret_blink_speed**
  536. +-----------+------------------------------+
  537. | *Default* | ``0.65`` |
  538. +-----------+------------------------------+
  539. | *Setter* | set_caret_blink_speed(value) |
  540. +-----------+------------------------------+
  541. | *Getter* | get_caret_blink_speed() |
  542. +-----------+------------------------------+
  543. Duration (in seconds) of a caret's blinking cycle.
  544. ----
  545. .. _class_TextEdit_property_caret_mid_grapheme:
  546. - :ref:`bool<class_bool>` **caret_mid_grapheme**
  547. +-----------+---------------------------------------+
  548. | *Default* | ``false`` |
  549. +-----------+---------------------------------------+
  550. | *Setter* | set_caret_mid_grapheme_enabled(value) |
  551. +-----------+---------------------------------------+
  552. | *Getter* | is_caret_mid_grapheme_enabled() |
  553. +-----------+---------------------------------------+
  554. Allow moving caret, selecting and removing the individual composite character components.
  555. **Note:** :kbd:`Backspace` is always removing individual composite character components.
  556. ----
  557. .. _class_TextEdit_property_caret_move_on_right_click:
  558. - :ref:`bool<class_bool>` **caret_move_on_right_click**
  559. +-----------+----------------------------------------------+
  560. | *Default* | ``true`` |
  561. +-----------+----------------------------------------------+
  562. | *Setter* | set_move_caret_on_right_click_enabled(value) |
  563. +-----------+----------------------------------------------+
  564. | *Getter* | is_move_caret_on_right_click_enabled() |
  565. +-----------+----------------------------------------------+
  566. If ``true``, a right-click moves the caret at the mouse position before displaying the context menu.
  567. If ``false``, the context menu disregards mouse location.
  568. ----
  569. .. _class_TextEdit_property_caret_type:
  570. - :ref:`CaretType<enum_TextEdit_CaretType>` **caret_type**
  571. +-----------+-----------------------+
  572. | *Default* | ``0`` |
  573. +-----------+-----------------------+
  574. | *Setter* | set_caret_type(value) |
  575. +-----------+-----------------------+
  576. | *Getter* | get_caret_type() |
  577. +-----------+-----------------------+
  578. Set the type of caret to draw.
  579. ----
  580. .. _class_TextEdit_property_context_menu_enabled:
  581. - :ref:`bool<class_bool>` **context_menu_enabled**
  582. +-----------+---------------------------------+
  583. | *Default* | ``true`` |
  584. +-----------+---------------------------------+
  585. | *Setter* | set_context_menu_enabled(value) |
  586. +-----------+---------------------------------+
  587. | *Getter* | is_context_menu_enabled() |
  588. +-----------+---------------------------------+
  589. If ``true``, a right-click displays the context menu.
  590. ----
  591. .. _class_TextEdit_property_deselect_on_focus_loss_enabled:
  592. - :ref:`bool<class_bool>` **deselect_on_focus_loss_enabled**
  593. +-----------+-------------------------------------------+
  594. | *Default* | ``true`` |
  595. +-----------+-------------------------------------------+
  596. | *Setter* | set_deselect_on_focus_loss_enabled(value) |
  597. +-----------+-------------------------------------------+
  598. | *Getter* | is_deselect_on_focus_loss_enabled() |
  599. +-----------+-------------------------------------------+
  600. If ``true``, the selected text will be deselected when focus is lost.
  601. ----
  602. .. _class_TextEdit_property_draw_control_chars:
  603. - :ref:`bool<class_bool>` **draw_control_chars**
  604. +-----------+-------------------------------+
  605. | *Default* | ``false`` |
  606. +-----------+-------------------------------+
  607. | *Setter* | set_draw_control_chars(value) |
  608. +-----------+-------------------------------+
  609. | *Getter* | get_draw_control_chars() |
  610. +-----------+-------------------------------+
  611. If ``true``, control characters are displayed.
  612. ----
  613. .. _class_TextEdit_property_draw_spaces:
  614. - :ref:`bool<class_bool>` **draw_spaces**
  615. +-----------+------------------------+
  616. | *Default* | ``false`` |
  617. +-----------+------------------------+
  618. | *Setter* | set_draw_spaces(value) |
  619. +-----------+------------------------+
  620. | *Getter* | is_drawing_spaces() |
  621. +-----------+------------------------+
  622. If ``true``, the "space" character will have a visible representation.
  623. ----
  624. .. _class_TextEdit_property_draw_tabs:
  625. - :ref:`bool<class_bool>` **draw_tabs**
  626. +-----------+----------------------+
  627. | *Default* | ``false`` |
  628. +-----------+----------------------+
  629. | *Setter* | set_draw_tabs(value) |
  630. +-----------+----------------------+
  631. | *Getter* | is_drawing_tabs() |
  632. +-----------+----------------------+
  633. If ``true``, the "tab" character will have a visible representation.
  634. ----
  635. .. _class_TextEdit_property_editable:
  636. - :ref:`bool<class_bool>` **editable**
  637. +-----------+---------------------+
  638. | *Default* | ``true`` |
  639. +-----------+---------------------+
  640. | *Setter* | set_editable(value) |
  641. +-----------+---------------------+
  642. | *Getter* | is_editable() |
  643. +-----------+---------------------+
  644. If ``false``, existing text cannot be modified and new text cannot be added.
  645. ----
  646. .. _class_TextEdit_property_highlight_all_occurrences:
  647. - :ref:`bool<class_bool>` **highlight_all_occurrences**
  648. +-----------+----------------------------------------+
  649. | *Default* | ``false`` |
  650. +-----------+----------------------------------------+
  651. | *Setter* | set_highlight_all_occurrences(value) |
  652. +-----------+----------------------------------------+
  653. | *Getter* | is_highlight_all_occurrences_enabled() |
  654. +-----------+----------------------------------------+
  655. If ``true``, all occurrences of the selected text will be highlighted.
  656. ----
  657. .. _class_TextEdit_property_highlight_current_line:
  658. - :ref:`bool<class_bool>` **highlight_current_line**
  659. +-----------+-------------------------------------+
  660. | *Default* | ``false`` |
  661. +-----------+-------------------------------------+
  662. | *Setter* | set_highlight_current_line(value) |
  663. +-----------+-------------------------------------+
  664. | *Getter* | is_highlight_current_line_enabled() |
  665. +-----------+-------------------------------------+
  666. If ``true``, the line containing the cursor is highlighted.
  667. ----
  668. .. _class_TextEdit_property_language:
  669. - :ref:`String<class_String>` **language**
  670. +-----------+---------------------+
  671. | *Default* | ``""`` |
  672. +-----------+---------------------+
  673. | *Setter* | set_language(value) |
  674. +-----------+---------------------+
  675. | *Getter* | get_language() |
  676. +-----------+---------------------+
  677. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  678. ----
  679. .. _class_TextEdit_property_middle_mouse_paste_enabled:
  680. - :ref:`bool<class_bool>` **middle_mouse_paste_enabled**
  681. +-----------+---------------------------------------+
  682. | *Default* | ``true`` |
  683. +-----------+---------------------------------------+
  684. | *Setter* | set_middle_mouse_paste_enabled(value) |
  685. +-----------+---------------------------------------+
  686. | *Getter* | is_middle_mouse_paste_enabled() |
  687. +-----------+---------------------------------------+
  688. If ``false``, using middle mouse button to paste clipboard will be disabled.
  689. **Note:** This method is only implemented on Linux.
  690. ----
  691. .. _class_TextEdit_property_minimap_draw:
  692. - :ref:`bool<class_bool>` **minimap_draw**
  693. +-----------+-------------------------+
  694. | *Default* | ``false`` |
  695. +-----------+-------------------------+
  696. | *Setter* | set_draw_minimap(value) |
  697. +-----------+-------------------------+
  698. | *Getter* | is_drawing_minimap() |
  699. +-----------+-------------------------+
  700. If ``true``, a minimap is shown, providing an outline of your source code.
  701. ----
  702. .. _class_TextEdit_property_minimap_width:
  703. - :ref:`int<class_int>` **minimap_width**
  704. +-----------+--------------------------+
  705. | *Default* | ``80`` |
  706. +-----------+--------------------------+
  707. | *Setter* | set_minimap_width(value) |
  708. +-----------+--------------------------+
  709. | *Getter* | get_minimap_width() |
  710. +-----------+--------------------------+
  711. The width, in pixels, of the minimap.
  712. ----
  713. .. _class_TextEdit_property_override_selected_font_color:
  714. - :ref:`bool<class_bool>` **override_selected_font_color**
  715. +-----------+-----------------------------------------+
  716. | *Default* | ``false`` |
  717. +-----------+-----------------------------------------+
  718. | *Setter* | set_override_selected_font_color(value) |
  719. +-----------+-----------------------------------------+
  720. | *Getter* | is_overriding_selected_font_color() |
  721. +-----------+-----------------------------------------+
  722. If ``true``, custom ``font_selected_color`` will be used for selected text.
  723. ----
  724. .. _class_TextEdit_property_scroll_horizontal:
  725. - :ref:`int<class_int>` **scroll_horizontal**
  726. +-----------+---------------------+
  727. | *Default* | ``0`` |
  728. +-----------+---------------------+
  729. | *Setter* | set_h_scroll(value) |
  730. +-----------+---------------------+
  731. | *Getter* | get_h_scroll() |
  732. +-----------+---------------------+
  733. If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.
  734. ----
  735. .. _class_TextEdit_property_scroll_past_end_of_file:
  736. - :ref:`bool<class_bool>` **scroll_past_end_of_file**
  737. +-----------+--------------------------------------------+
  738. | *Default* | ``false`` |
  739. +-----------+--------------------------------------------+
  740. | *Setter* | set_scroll_past_end_of_file_enabled(value) |
  741. +-----------+--------------------------------------------+
  742. | *Getter* | is_scroll_past_end_of_file_enabled() |
  743. +-----------+--------------------------------------------+
  744. Allow scrolling past the last line into "virtual" space.
  745. ----
  746. .. _class_TextEdit_property_scroll_smooth:
  747. - :ref:`bool<class_bool>` **scroll_smooth**
  748. +-----------+---------------------------------+
  749. | *Default* | ``false`` |
  750. +-----------+---------------------------------+
  751. | *Setter* | set_smooth_scroll_enable(value) |
  752. +-----------+---------------------------------+
  753. | *Getter* | is_smooth_scroll_enabled() |
  754. +-----------+---------------------------------+
  755. Scroll smoothly over the text rather then jumping to the next location.
  756. ----
  757. .. _class_TextEdit_property_scroll_v_scroll_speed:
  758. - :ref:`float<class_float>` **scroll_v_scroll_speed**
  759. +-----------+---------------------------+
  760. | *Default* | ``80.0`` |
  761. +-----------+---------------------------+
  762. | *Setter* | set_v_scroll_speed(value) |
  763. +-----------+---------------------------+
  764. | *Getter* | get_v_scroll_speed() |
  765. +-----------+---------------------------+
  766. Sets the scroll speed with the minimap or when :ref:`scroll_smooth<class_TextEdit_property_scroll_smooth>` is enabled.
  767. ----
  768. .. _class_TextEdit_property_scroll_vertical:
  769. - :ref:`float<class_float>` **scroll_vertical**
  770. +-----------+---------------------+
  771. | *Default* | ``0.0`` |
  772. +-----------+---------------------+
  773. | *Setter* | set_v_scroll(value) |
  774. +-----------+---------------------+
  775. | *Getter* | get_v_scroll() |
  776. +-----------+---------------------+
  777. If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line.
  778. ----
  779. .. _class_TextEdit_property_selecting_enabled:
  780. - :ref:`bool<class_bool>` **selecting_enabled**
  781. +-----------+------------------------------+
  782. | *Default* | ``true`` |
  783. +-----------+------------------------------+
  784. | *Setter* | set_selecting_enabled(value) |
  785. +-----------+------------------------------+
  786. | *Getter* | is_selecting_enabled() |
  787. +-----------+------------------------------+
  788. If ``true``, text can be selected.
  789. 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.
  790. ----
  791. .. _class_TextEdit_property_shortcut_keys_enabled:
  792. - :ref:`bool<class_bool>` **shortcut_keys_enabled**
  793. +-----------+----------------------------------+
  794. | *Default* | ``true`` |
  795. +-----------+----------------------------------+
  796. | *Setter* | set_shortcut_keys_enabled(value) |
  797. +-----------+----------------------------------+
  798. | *Getter* | is_shortcut_keys_enabled() |
  799. +-----------+----------------------------------+
  800. If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled.
  801. ----
  802. .. _class_TextEdit_property_structured_text_bidi_override:
  803. - :ref:`StructuredTextParser<enum_Control_StructuredTextParser>` **structured_text_bidi_override**
  804. +-----------+------------------------------------------+
  805. | *Default* | ``0`` |
  806. +-----------+------------------------------------------+
  807. | *Setter* | set_structured_text_bidi_override(value) |
  808. +-----------+------------------------------------------+
  809. | *Getter* | get_structured_text_bidi_override() |
  810. +-----------+------------------------------------------+
  811. Set BiDi algorithm override for the structured text.
  812. ----
  813. .. _class_TextEdit_property_structured_text_bidi_override_options:
  814. - :ref:`Array<class_Array>` **structured_text_bidi_override_options**
  815. +-----------+--------------------------------------------------+
  816. | *Default* | ``[]`` |
  817. +-----------+--------------------------------------------------+
  818. | *Setter* | set_structured_text_bidi_override_options(value) |
  819. +-----------+--------------------------------------------------+
  820. | *Getter* | get_structured_text_bidi_override_options() |
  821. +-----------+--------------------------------------------------+
  822. Set additional options for BiDi override.
  823. ----
  824. .. _class_TextEdit_property_syntax_highlighter:
  825. - :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` **syntax_highlighter**
  826. +----------+-------------------------------+
  827. | *Setter* | set_syntax_highlighter(value) |
  828. +----------+-------------------------------+
  829. | *Getter* | get_syntax_highlighter() |
  830. +----------+-------------------------------+
  831. Sets the :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` to use.
  832. ----
  833. .. _class_TextEdit_property_text:
  834. - :ref:`String<class_String>` **text**
  835. +-----------+-----------------+
  836. | *Default* | ``""`` |
  837. +-----------+-----------------+
  838. | *Setter* | set_text(value) |
  839. +-----------+-----------------+
  840. | *Getter* | get_text() |
  841. +-----------+-----------------+
  842. String value of the ``TextEdit``.
  843. ----
  844. .. _class_TextEdit_property_text_direction:
  845. - :ref:`TextDirection<enum_Control_TextDirection>` **text_direction**
  846. +-----------+---------------------------+
  847. | *Default* | ``0`` |
  848. +-----------+---------------------------+
  849. | *Setter* | set_text_direction(value) |
  850. +-----------+---------------------------+
  851. | *Getter* | get_text_direction() |
  852. +-----------+---------------------------+
  853. Base text writing direction.
  854. ----
  855. .. _class_TextEdit_property_virtual_keyboard_enabled:
  856. - :ref:`bool<class_bool>` **virtual_keyboard_enabled**
  857. +-----------+-------------------------------------+
  858. | *Default* | ``true`` |
  859. +-----------+-------------------------------------+
  860. | *Setter* | set_virtual_keyboard_enabled(value) |
  861. +-----------+-------------------------------------+
  862. | *Getter* | is_virtual_keyboard_enabled() |
  863. +-----------+-------------------------------------+
  864. If ``true``, the native virtual keyboard is shown when focused on platforms that support it.
  865. ----
  866. .. _class_TextEdit_property_wrap_mode:
  867. - :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` **wrap_mode**
  868. +-----------+-------------------------------+
  869. | *Default* | ``0`` |
  870. +-----------+-------------------------------+
  871. | *Setter* | set_line_wrapping_mode(value) |
  872. +-----------+-------------------------------+
  873. | *Getter* | get_line_wrapping_mode() |
  874. +-----------+-------------------------------+
  875. Sets the line wrapping mode to use.
  876. Method Descriptions
  877. -------------------
  878. .. _class_TextEdit_method__backspace:
  879. - void **_backspace** **(** **)** |virtual|
  880. Override this method to define what happens when the user presses the backspace key.
  881. ----
  882. .. _class_TextEdit_method__copy:
  883. - void **_copy** **(** **)** |virtual|
  884. Override this method to define what happens when the user performs a copy operation.
  885. ----
  886. .. _class_TextEdit_method__cut:
  887. - void **_cut** **(** **)** |virtual|
  888. Override this method to define what happens when the user performs a cut operation.
  889. ----
  890. .. _class_TextEdit_method__handle_unicode_input:
  891. - void **_handle_unicode_input** **(** :ref:`int<class_int>` unicode_char **)** |virtual|
  892. Override this method to define what happens when the types in the provided key ``unicode``.
  893. ----
  894. .. _class_TextEdit_method__paste:
  895. - void **_paste** **(** **)** |virtual|
  896. Override this method to define what happens when the user performs a paste operation.
  897. ----
  898. .. _class_TextEdit_method__paste_primary_clipboard:
  899. - void **_paste_primary_clipboard** **(** **)** |virtual|
  900. Override this method to define what happens when the user performs a paste operation with middle mouse button.
  901. **Note:** This method is only implemented on Linux.
  902. ----
  903. .. _class_TextEdit_method_add_gutter:
  904. - void **add_gutter** **(** :ref:`int<class_int>` at=-1 **)**
  905. Register a new gutter to this ``TextEdit``. Use ``at`` to have a specific gutter order. A value of ``-1`` appends the gutter to the right.
  906. ----
  907. .. _class_TextEdit_method_adjust_viewport_to_caret:
  908. - void **adjust_viewport_to_caret** **(** **)**
  909. Adjust the viewport so the caret is visible.
  910. ----
  911. .. _class_TextEdit_method_backspace:
  912. - void **backspace** **(** **)**
  913. Called when the user presses the backspace key. Can be overridden with :ref:`_backspace<class_TextEdit_method__backspace>`.
  914. ----
  915. .. _class_TextEdit_method_begin_complex_operation:
  916. - void **begin_complex_operation** **(** **)**
  917. Starts a multipart edit. All edits will be treated as one action until :ref:`end_complex_operation<class_TextEdit_method_end_complex_operation>` is called.
  918. ----
  919. .. _class_TextEdit_method_center_viewport_to_caret:
  920. - void **center_viewport_to_caret** **(** **)**
  921. Centers the viewport on the line the editing caret is at. This also resets the :ref:`scroll_horizontal<class_TextEdit_property_scroll_horizontal>` value to ``0``.
  922. ----
  923. .. _class_TextEdit_method_clear:
  924. - void **clear** **(** **)**
  925. Performs a full reset of ``TextEdit``, including undo history.
  926. ----
  927. .. _class_TextEdit_method_clear_opentype_features:
  928. - void **clear_opentype_features** **(** **)**
  929. Removes all OpenType features.
  930. ----
  931. .. _class_TextEdit_method_clear_undo_history:
  932. - void **clear_undo_history** **(** **)**
  933. Clears the undo history.
  934. ----
  935. .. _class_TextEdit_method_copy:
  936. - void **copy** **(** **)**
  937. Copies the current text selection. Can be overridden with :ref:`_copy<class_TextEdit_method__copy>`.
  938. ----
  939. .. _class_TextEdit_method_cut:
  940. - void **cut** **(** **)**
  941. Cut's the current selection. Can be overridden with :ref:`_cut<class_TextEdit_method__cut>`.
  942. ----
  943. .. _class_TextEdit_method_delete_selection:
  944. - void **delete_selection** **(** **)**
  945. Deletes the selected text.
  946. ----
  947. .. _class_TextEdit_method_deselect:
  948. - void **deselect** **(** **)**
  949. Deselects the current selection.
  950. ----
  951. .. _class_TextEdit_method_end_complex_operation:
  952. - void **end_complex_operation** **(** **)**
  953. Ends a multipart edit, started with :ref:`begin_complex_operation<class_TextEdit_method_begin_complex_operation>`. If called outside a complex operation, the current operation is pushed onto the undo/redo stack.
  954. ----
  955. .. _class_TextEdit_method_get_caret_column:
  956. - :ref:`int<class_int>` **get_caret_column** **(** **)** |const|
  957. Returns the column the editing caret is at.
  958. ----
  959. .. _class_TextEdit_method_get_caret_draw_pos:
  960. - :ref:`Vector2<class_Vector2>` **get_caret_draw_pos** **(** **)** |const|
  961. Returns the caret pixel draw position.
  962. ----
  963. .. _class_TextEdit_method_get_caret_line:
  964. - :ref:`int<class_int>` **get_caret_line** **(** **)** |const|
  965. Returns the line the editing caret is on.
  966. ----
  967. .. _class_TextEdit_method_get_caret_wrap_index:
  968. - :ref:`int<class_int>` **get_caret_wrap_index** **(** **)** |const|
  969. Returns the wrap index the editing caret is on.
  970. ----
  971. .. _class_TextEdit_method_get_first_non_whitespace_column:
  972. - :ref:`int<class_int>` **get_first_non_whitespace_column** **(** :ref:`int<class_int>` line **)** |const|
  973. Returns the first column containing a non-whitespace character.
  974. ----
  975. .. _class_TextEdit_method_get_first_visible_line:
  976. - :ref:`int<class_int>` **get_first_visible_line** **(** **)** |const|
  977. Returns the first visible line.
  978. ----
  979. .. _class_TextEdit_method_get_gutter_count:
  980. - :ref:`int<class_int>` **get_gutter_count** **(** **)** |const|
  981. Returns the total amount of gutters registered.
  982. ----
  983. .. _class_TextEdit_method_get_gutter_name:
  984. - :ref:`String<class_String>` **get_gutter_name** **(** :ref:`int<class_int>` gutter **)** |const|
  985. Returns the name of the gutter at the given index.
  986. ----
  987. .. _class_TextEdit_method_get_gutter_type:
  988. - :ref:`GutterType<enum_TextEdit_GutterType>` **get_gutter_type** **(** :ref:`int<class_int>` gutter **)** |const|
  989. Returns the type of the gutter at the given index.
  990. ----
  991. .. _class_TextEdit_method_get_gutter_width:
  992. - :ref:`int<class_int>` **get_gutter_width** **(** :ref:`int<class_int>` gutter **)** |const|
  993. Returns the width of the gutter at the given index.
  994. ----
  995. .. _class_TextEdit_method_get_indent_level:
  996. - :ref:`int<class_int>` **get_indent_level** **(** :ref:`int<class_int>` line **)** |const|
  997. Returns the amount of spaces and ``tab * tab_size`` before the first char.
  998. ----
  999. .. _class_TextEdit_method_get_last_full_visible_line:
  1000. - :ref:`int<class_int>` **get_last_full_visible_line** **(** **)** |const|
  1001. Return the last visible line. Use :ref:`get_last_full_visible_line_wrap_index<class_TextEdit_method_get_last_full_visible_line_wrap_index>` for the wrap index.
  1002. ----
  1003. .. _class_TextEdit_method_get_last_full_visible_line_wrap_index:
  1004. - :ref:`int<class_int>` **get_last_full_visible_line_wrap_index** **(** **)** |const|
  1005. Returns the last visible wrap index of the last visible line.
  1006. ----
  1007. .. _class_TextEdit_method_get_last_unhidden_line:
  1008. - :ref:`int<class_int>` **get_last_unhidden_line** **(** **)** |const|
  1009. Returns the last unhidden line in the entire ``TextEdit``.
  1010. ----
  1011. .. _class_TextEdit_method_get_line:
  1012. - :ref:`String<class_String>` **get_line** **(** :ref:`int<class_int>` line **)** |const|
  1013. Returns the text of a specific line.
  1014. ----
  1015. .. _class_TextEdit_method_get_line_background_color:
  1016. - :ref:`Color<class_Color>` **get_line_background_color** **(** :ref:`int<class_int>` line **)** |const|
  1017. Returns the current background color of the line. ``Color(0, 0, 0, 0)`` is returned if no color is set.
  1018. ----
  1019. .. _class_TextEdit_method_get_line_column_at_pos:
  1020. - :ref:`Vector2i<class_Vector2i>` **get_line_column_at_pos** **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`bool<class_bool>` allow_out_of_bounds=true **)** |const|
  1021. Returns the line and column at the given position. In the returned vector, ``x`` is the column, ``y`` is the line. If ``allow_out_of_bounds`` is ``false`` and the position is not over the text, both vector values will be set to ``-1``.
  1022. ----
  1023. .. _class_TextEdit_method_get_line_count:
  1024. - :ref:`int<class_int>` **get_line_count** **(** **)** |const|
  1025. Returns the amount of total lines in the text.
  1026. ----
  1027. .. _class_TextEdit_method_get_line_gutter_icon:
  1028. - :ref:`Texture2D<class_Texture2D>` **get_line_gutter_icon** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const|
  1029. Returns the icon currently in ``gutter`` at ``line``.
  1030. ----
  1031. .. _class_TextEdit_method_get_line_gutter_item_color:
  1032. - :ref:`Color<class_Color>` **get_line_gutter_item_color** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const|
  1033. Returns the color currently in ``gutter`` at ``line``.
  1034. ----
  1035. .. _class_TextEdit_method_get_line_gutter_metadata:
  1036. - :ref:`Variant<class_Variant>` **get_line_gutter_metadata** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const|
  1037. Returns the metadata currently in ``gutter`` at ``line``.
  1038. ----
  1039. .. _class_TextEdit_method_get_line_gutter_text:
  1040. - :ref:`String<class_String>` **get_line_gutter_text** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const|
  1041. Returns the text currently in ``gutter`` at ``line``.
  1042. ----
  1043. .. _class_TextEdit_method_get_line_height:
  1044. - :ref:`int<class_int>` **get_line_height** **(** **)** |const|
  1045. Returns the height of a largest line.
  1046. ----
  1047. .. _class_TextEdit_method_get_line_width:
  1048. - :ref:`int<class_int>` **get_line_width** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=-1 **)** |const|
  1049. Returns the width in pixels of the ``wrap_index`` on ``line``.
  1050. ----
  1051. .. _class_TextEdit_method_get_line_wrap_count:
  1052. - :ref:`int<class_int>` **get_line_wrap_count** **(** :ref:`int<class_int>` line **)** |const|
  1053. Returns the number of times the given line is wrapped.
  1054. ----
  1055. .. _class_TextEdit_method_get_line_wrap_index_at_column:
  1056. - :ref:`int<class_int>` **get_line_wrap_index_at_column** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const|
  1057. Returns the wrap index of the given line column.
  1058. ----
  1059. .. _class_TextEdit_method_get_line_wrapped_text:
  1060. - :ref:`PackedStringArray<class_PackedStringArray>` **get_line_wrapped_text** **(** :ref:`int<class_int>` line **)** |const|
  1061. Returns an array of :ref:`String<class_String>`\ s representing each wrapped index.
  1062. ----
  1063. .. _class_TextEdit_method_get_local_mouse_pos:
  1064. - :ref:`Vector2<class_Vector2>` **get_local_mouse_pos** **(** **)** |const|
  1065. Returns the local mouse position adjusted for the text direction.
  1066. ----
  1067. .. _class_TextEdit_method_get_menu:
  1068. - :ref:`PopupMenu<class_PopupMenu>` **get_menu** **(** **)** |const|
  1069. Returns the :ref:`PopupMenu<class_PopupMenu>` of this ``TextEdit``. By default, this menu is displayed when right-clicking on the ``TextEdit``.
  1070. **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:`Window.visible<class_Window_property_visible>` property.
  1071. ----
  1072. .. _class_TextEdit_method_get_minimap_line_at_pos:
  1073. - :ref:`int<class_int>` **get_minimap_line_at_pos** **(** :ref:`Vector2i<class_Vector2i>` position **)** |const|
  1074. Returns the equivalent minimap line at ``position``
  1075. ----
  1076. .. _class_TextEdit_method_get_minimap_visible_lines:
  1077. - :ref:`int<class_int>` **get_minimap_visible_lines** **(** **)** |const|
  1078. Returns the total amount of lines that can be draw on the minimap.
  1079. ----
  1080. .. _class_TextEdit_method_get_next_visible_line_index_offset_from:
  1081. - :ref:`Vector2i<class_Vector2i>` **get_next_visible_line_index_offset_from** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index, :ref:`int<class_int>` visible_amount **)** |const|
  1082. Similar to :ref:`get_next_visible_line_offset_from<class_TextEdit_method_get_next_visible_line_offset_from>`, but takes into account the line wrap indexes. In the returned vector, ``x`` is the line, ``y`` is the wrap index.
  1083. ----
  1084. .. _class_TextEdit_method_get_next_visible_line_offset_from:
  1085. - :ref:`int<class_int>` **get_next_visible_line_offset_from** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` visible_amount **)** |const|
  1086. Returns the count to the next visible line from ``line`` to ``line + visible_amount``. Can also count backwards. For example if a ``TextEdit`` has 5 lines with lines 2 and 3 hidden, calling this with ``line = 1, visible_amount = 1`` would return 3.
  1087. ----
  1088. .. _class_TextEdit_method_get_opentype_feature:
  1089. - :ref:`int<class_int>` **get_opentype_feature** **(** :ref:`String<class_String>` tag **)** |const|
  1090. Returns OpenType feature ``tag``.
  1091. ----
  1092. .. _class_TextEdit_method_get_saved_version:
  1093. - :ref:`int<class_int>` **get_saved_version** **(** **)** |const|
  1094. Returns the last tagged saved version from :ref:`tag_saved_version<class_TextEdit_method_tag_saved_version>`
  1095. ----
  1096. .. _class_TextEdit_method_get_scroll_pos_for_line:
  1097. - :ref:`float<class_float>` **get_scroll_pos_for_line** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** |const|
  1098. Returns the scroll position for ``wrap_index`` of ``line``.
  1099. ----
  1100. .. _class_TextEdit_method_get_selected_text:
  1101. - :ref:`String<class_String>` **get_selected_text** **(** **)** |const|
  1102. Returns the text inside the selection.
  1103. ----
  1104. .. _class_TextEdit_method_get_selection_column:
  1105. - :ref:`int<class_int>` **get_selection_column** **(** **)** |const|
  1106. Returns the original start column of the selection.
  1107. ----
  1108. .. _class_TextEdit_method_get_selection_from_column:
  1109. - :ref:`int<class_int>` **get_selection_from_column** **(** **)** |const|
  1110. Returns the selection begin column.
  1111. ----
  1112. .. _class_TextEdit_method_get_selection_from_line:
  1113. - :ref:`int<class_int>` **get_selection_from_line** **(** **)** |const|
  1114. Returns the selection begin line.
  1115. ----
  1116. .. _class_TextEdit_method_get_selection_line:
  1117. - :ref:`int<class_int>` **get_selection_line** **(** **)** |const|
  1118. Returns the original start line of the selection.
  1119. ----
  1120. .. _class_TextEdit_method_get_selection_mode:
  1121. - :ref:`SelectionMode<enum_TextEdit_SelectionMode>` **get_selection_mode** **(** **)** |const|
  1122. Returns the current selection mode.
  1123. ----
  1124. .. _class_TextEdit_method_get_selection_to_column:
  1125. - :ref:`int<class_int>` **get_selection_to_column** **(** **)** |const|
  1126. Returns the selection end column.
  1127. ----
  1128. .. _class_TextEdit_method_get_selection_to_line:
  1129. - :ref:`int<class_int>` **get_selection_to_line** **(** **)** |const|
  1130. Returns the selection end line.
  1131. ----
  1132. .. _class_TextEdit_method_get_tab_size:
  1133. - :ref:`int<class_int>` **get_tab_size** **(** **)** |const|
  1134. Returns the ``TextEdit``'s' tab size.
  1135. ----
  1136. .. _class_TextEdit_method_get_total_gutter_width:
  1137. - :ref:`int<class_int>` **get_total_gutter_width** **(** **)** |const|
  1138. Returns the total width of all gutters and internal padding.
  1139. ----
  1140. .. _class_TextEdit_method_get_total_visible_line_count:
  1141. - :ref:`int<class_int>` **get_total_visible_line_count** **(** **)** |const|
  1142. Returns the total amount of lines that could be draw.
  1143. ----
  1144. .. _class_TextEdit_method_get_version:
  1145. - :ref:`int<class_int>` **get_version** **(** **)** |const|
  1146. Returns the current version of the ``TextEdit``. The version is a count of recorded operations by the undo/redo history.
  1147. ----
  1148. .. _class_TextEdit_method_get_visible_line_count:
  1149. - :ref:`int<class_int>` **get_visible_line_count** **(** **)** |const|
  1150. Returns the number of visible lines, including wrapped text.
  1151. ----
  1152. .. _class_TextEdit_method_get_visible_line_count_in_range:
  1153. - :ref:`int<class_int>` **get_visible_line_count_in_range** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** |const|
  1154. Returns the total number of visible + wrapped lines between the two lines.
  1155. ----
  1156. .. _class_TextEdit_method_get_word_at_pos:
  1157. - :ref:`String<class_String>` **get_word_at_pos** **(** :ref:`Vector2<class_Vector2>` position **)** |const|
  1158. Returns the word at ``position``.
  1159. ----
  1160. .. _class_TextEdit_method_get_word_under_caret:
  1161. - :ref:`String<class_String>` **get_word_under_caret** **(** **)** |const|
  1162. Returns a :ref:`String<class_String>` text with the word under the caret's location.
  1163. ----
  1164. .. _class_TextEdit_method_has_ime_text:
  1165. - :ref:`bool<class_bool>` **has_ime_text** **(** **)** |const|
  1166. Returns if the user has IME text.
  1167. ----
  1168. .. _class_TextEdit_method_has_redo:
  1169. - :ref:`bool<class_bool>` **has_redo** **(** **)** |const|
  1170. Returns ``true`` if a "redo" action is available.
  1171. ----
  1172. .. _class_TextEdit_method_has_selection:
  1173. - :ref:`bool<class_bool>` **has_selection** **(** **)** |const|
  1174. Returns ``true`` if the user has selected text.
  1175. ----
  1176. .. _class_TextEdit_method_has_undo:
  1177. - :ref:`bool<class_bool>` **has_undo** **(** **)** |const|
  1178. Returns ``true`` if an "undo" action is available.
  1179. ----
  1180. .. _class_TextEdit_method_insert_line_at:
  1181. - void **insert_line_at** **(** :ref:`int<class_int>` line, :ref:`String<class_String>` text **)**
  1182. Inserts a new line with ``text`` at ``line``.
  1183. ----
  1184. .. _class_TextEdit_method_insert_text_at_caret:
  1185. - void **insert_text_at_caret** **(** :ref:`String<class_String>` text **)**
  1186. Insert the specified text at the caret position.
  1187. ----
  1188. .. _class_TextEdit_method_is_caret_visible:
  1189. - :ref:`bool<class_bool>` **is_caret_visible** **(** **)** |const|
  1190. Returns ``true`` if the caret is visible on the screen.
  1191. ----
  1192. .. _class_TextEdit_method_is_dragging_cursor:
  1193. - :ref:`bool<class_bool>` **is_dragging_cursor** **(** **)** |const|
  1194. Returns ``true`` if the user is dragging their mouse for scrolling or selecting.
  1195. ----
  1196. .. _class_TextEdit_method_is_gutter_clickable:
  1197. - :ref:`bool<class_bool>` **is_gutter_clickable** **(** :ref:`int<class_int>` gutter **)** |const|
  1198. Returns whether the gutter is clickable.
  1199. ----
  1200. .. _class_TextEdit_method_is_gutter_drawn:
  1201. - :ref:`bool<class_bool>` **is_gutter_drawn** **(** :ref:`int<class_int>` gutter **)** |const|
  1202. Returns whether the gutter is currently drawn.
  1203. ----
  1204. .. _class_TextEdit_method_is_gutter_overwritable:
  1205. - :ref:`bool<class_bool>` **is_gutter_overwritable** **(** :ref:`int<class_int>` gutter **)** |const|
  1206. Returns whether the gutter is overwritable.
  1207. ----
  1208. .. _class_TextEdit_method_is_line_gutter_clickable:
  1209. - :ref:`bool<class_bool>` **is_line_gutter_clickable** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const|
  1210. Returns whether the gutter on the given line is clickable.
  1211. ----
  1212. .. _class_TextEdit_method_is_line_wrapped:
  1213. - :ref:`bool<class_bool>` **is_line_wrapped** **(** :ref:`int<class_int>` line **)** |const|
  1214. Returns if the given line is wrapped.
  1215. ----
  1216. .. _class_TextEdit_method_is_menu_visible:
  1217. - :ref:`bool<class_bool>` **is_menu_visible** **(** **)** |const|
  1218. Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided).
  1219. ----
  1220. .. _class_TextEdit_method_is_overtype_mode_enabled:
  1221. - :ref:`bool<class_bool>` **is_overtype_mode_enabled** **(** **)** |const|
  1222. Returns whether the user is in overtype mode.
  1223. ----
  1224. .. _class_TextEdit_method_menu_option:
  1225. - void **menu_option** **(** :ref:`int<class_int>` option **)**
  1226. Triggers a right-click menu action by the specified index. See :ref:`MenuItems<enum_TextEdit_MenuItems>` for a list of available indexes.
  1227. ----
  1228. .. _class_TextEdit_method_merge_gutters:
  1229. - void **merge_gutters** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)**
  1230. Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters will be copied.
  1231. ----
  1232. .. _class_TextEdit_method_paste:
  1233. - void **paste** **(** **)**
  1234. Paste at the current location. Can be overridden with :ref:`_paste<class_TextEdit_method__paste>`.
  1235. ----
  1236. .. _class_TextEdit_method_redo:
  1237. - void **redo** **(** **)**
  1238. Perform redo operation.
  1239. ----
  1240. .. _class_TextEdit_method_remove_gutter:
  1241. - void **remove_gutter** **(** :ref:`int<class_int>` gutter **)**
  1242. Removes the gutter from this ``TextEdit``.
  1243. ----
  1244. .. _class_TextEdit_method_remove_text:
  1245. - void **remove_text** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_column **)**
  1246. Removes text between the given positions.
  1247. **Note:** This does not adjust the caret or selection, which as a result it can end up in an invalid position.
  1248. ----
  1249. .. _class_TextEdit_method_search:
  1250. - :ref:`Vector2i<class_Vector2i>` **search** **(** :ref:`String<class_String>` text, :ref:`int<class_int>` flags, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_colum **)** |const|
  1251. Perform a search inside the text. Search flags can be specified in the :ref:`SearchFlags<enum_TextEdit_SearchFlags>` enum.
  1252. In the returned vector, ``x`` is the column, ``y`` is the line. If no results are found, both are equal to ``-1``.
  1253. .. tabs::
  1254. .. code-tab:: gdscript
  1255. var result = search("print", SEARCH_WHOLE_WORDS, 0, 0)
  1256. if result.x != -1:
  1257. # Result found.
  1258. var line_number = result.y
  1259. var column_number = result.x
  1260. .. code-tab:: csharp
  1261. Vector2i result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0);
  1262. if (result.Length > 0)
  1263. {
  1264. // Result found.
  1265. int lineNumber = result.y;
  1266. int columnNumber = result.x;
  1267. }
  1268. ----
  1269. .. _class_TextEdit_method_select:
  1270. - 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 **)**
  1271. Perform selection, from line/column to line/column.
  1272. If :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` is ``false``, no selection will occur.
  1273. ----
  1274. .. _class_TextEdit_method_select_all:
  1275. - void **select_all** **(** **)**
  1276. Select all the text.
  1277. If :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` is ``false``, no selection will occur.
  1278. ----
  1279. .. _class_TextEdit_method_select_word_under_caret:
  1280. - void **select_word_under_caret** **(** **)**
  1281. Selects the word under the caret.
  1282. ----
  1283. .. _class_TextEdit_method_set_caret_column:
  1284. - void **set_caret_column** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` adjust_viewport=true **)**
  1285. Moves the caret to the specified ``column`` index.
  1286. If ``adjust_viewport`` is ``true``, the viewport will center at the caret position after the move occurs.
  1287. ----
  1288. .. _class_TextEdit_method_set_caret_line:
  1289. - void **set_caret_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 **)**
  1290. Moves the caret to the specified ``line`` index.
  1291. If ``adjust_viewport`` is ``true``, the viewport will center at the caret position after the move occurs.
  1292. If ``can_be_hidden`` is ``true``, the specified ``line`` can be hidden.
  1293. ----
  1294. .. _class_TextEdit_method_set_gutter_clickable:
  1295. - void **set_gutter_clickable** **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` clickable **)**
  1296. Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter.
  1297. ----
  1298. .. _class_TextEdit_method_set_gutter_custom_draw:
  1299. - void **set_gutter_custom_draw** **(** :ref:`int<class_int>` column, :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` callback **)**
  1300. Set a custom draw method for the gutter. The callback method must take the following args: ``line: int, gutter: int, Area: Rect2``.
  1301. ----
  1302. .. _class_TextEdit_method_set_gutter_draw:
  1303. - void **set_gutter_draw** **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` draw **)**
  1304. Sets whether the gutter should be drawn.
  1305. ----
  1306. .. _class_TextEdit_method_set_gutter_name:
  1307. - void **set_gutter_name** **(** :ref:`int<class_int>` gutter, :ref:`String<class_String>` name **)**
  1308. Sets the name of the gutter.
  1309. ----
  1310. .. _class_TextEdit_method_set_gutter_overwritable:
  1311. - void **set_gutter_overwritable** **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` overwritable **)**
  1312. Sets the gutter to overwritable. See :ref:`merge_gutters<class_TextEdit_method_merge_gutters>`.
  1313. ----
  1314. .. _class_TextEdit_method_set_gutter_type:
  1315. - void **set_gutter_type** **(** :ref:`int<class_int>` gutter, :ref:`GutterType<enum_TextEdit_GutterType>` type **)**
  1316. Sets the type of gutter.
  1317. ----
  1318. .. _class_TextEdit_method_set_gutter_width:
  1319. - void **set_gutter_width** **(** :ref:`int<class_int>` gutter, :ref:`int<class_int>` width **)**
  1320. Set the width of the gutter.
  1321. ----
  1322. .. _class_TextEdit_method_set_line:
  1323. - void **set_line** **(** :ref:`int<class_int>` line, :ref:`String<class_String>` new_text **)**
  1324. Sets the text for a specific line.
  1325. ----
  1326. .. _class_TextEdit_method_set_line_as_center_visible:
  1327. - void **set_line_as_center_visible** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)**
  1328. Positions the ``wrap_index`` of ``line`` at the center of the viewport.
  1329. ----
  1330. .. _class_TextEdit_method_set_line_as_first_visible:
  1331. - void **set_line_as_first_visible** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)**
  1332. Positions the ``wrap_index`` of ``line`` at the top of the viewport.
  1333. ----
  1334. .. _class_TextEdit_method_set_line_as_last_visible:
  1335. - void **set_line_as_last_visible** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)**
  1336. Positions the ``wrap_index`` of ``line`` at the bottom of the viewport.
  1337. ----
  1338. .. _class_TextEdit_method_set_line_background_color:
  1339. - void **set_line_background_color** **(** :ref:`int<class_int>` line, :ref:`Color<class_Color>` color **)**
  1340. Sets the current background color of the line. Set to ``Color(0, 0, 0, 0)`` for no color.
  1341. ----
  1342. .. _class_TextEdit_method_set_line_gutter_clickable:
  1343. - void **set_line_gutter_clickable** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` clickable **)**
  1344. Sets the ``gutter`` on ``line`` as clickable.
  1345. ----
  1346. .. _class_TextEdit_method_set_line_gutter_icon:
  1347. - void **set_line_gutter_icon** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Texture2D<class_Texture2D>` icon **)**
  1348. Sets the icon for ``gutter`` on ``line``.
  1349. ----
  1350. .. _class_TextEdit_method_set_line_gutter_item_color:
  1351. - void **set_line_gutter_item_color** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Color<class_Color>` color **)**
  1352. Sets the color for ``gutter`` on ``line``.
  1353. ----
  1354. .. _class_TextEdit_method_set_line_gutter_metadata:
  1355. - void **set_line_gutter_metadata** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Variant<class_Variant>` metadata **)**
  1356. Sets the metadata for ``gutter`` on ``line``.
  1357. ----
  1358. .. _class_TextEdit_method_set_line_gutter_text:
  1359. - void **set_line_gutter_text** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`String<class_String>` text **)**
  1360. Sets the text for ``gutter`` on ``line``.
  1361. ----
  1362. .. _class_TextEdit_method_set_opentype_feature:
  1363. - void **set_opentype_feature** **(** :ref:`String<class_String>` tag, :ref:`int<class_int>` value **)**
  1364. Sets OpenType feature ``tag``. More info: `OpenType feature tags <https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags>`__.
  1365. ----
  1366. .. _class_TextEdit_method_set_overtype_mode_enabled:
  1367. - void **set_overtype_mode_enabled** **(** :ref:`bool<class_bool>` enabled **)**
  1368. If ``true``, sets the user into overtype mode. When the user types in this mode, it will override existing text.
  1369. ----
  1370. .. _class_TextEdit_method_set_search_flags:
  1371. - void **set_search_flags** **(** :ref:`int<class_int>` flags **)**
  1372. Sets the search flags. This is used with :ref:`set_search_text<class_TextEdit_method_set_search_text>` to highlight occurrences of the searched text. Search flags can be specified from the :ref:`SearchFlags<enum_TextEdit_SearchFlags>` enum.
  1373. ----
  1374. .. _class_TextEdit_method_set_search_text:
  1375. - void **set_search_text** **(** :ref:`String<class_String>` search_text **)**
  1376. Sets the search text. See :ref:`set_search_flags<class_TextEdit_method_set_search_flags>`.
  1377. ----
  1378. .. _class_TextEdit_method_set_selection_mode:
  1379. - void **set_selection_mode** **(** :ref:`SelectionMode<enum_TextEdit_SelectionMode>` mode, :ref:`int<class_int>` line=-1, :ref:`int<class_int>` column=-1 **)**
  1380. Sets the current selection mode.
  1381. ----
  1382. .. _class_TextEdit_method_set_tab_size:
  1383. - void **set_tab_size** **(** :ref:`int<class_int>` size **)**
  1384. Sets the tab size for the ``TextEdit`` to use.
  1385. ----
  1386. .. _class_TextEdit_method_set_tooltip_request_func:
  1387. - void **set_tooltip_request_func** **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` callback, :ref:`Variant<class_Variant>` data **)**
  1388. Provide custom tooltip text. The callback method must take the following args: ``hovered_word: String, data: Variant``
  1389. ----
  1390. .. _class_TextEdit_method_swap_lines:
  1391. - void **swap_lines** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)**
  1392. Swaps the two lines.
  1393. ----
  1394. .. _class_TextEdit_method_tag_saved_version:
  1395. - void **tag_saved_version** **(** **)**
  1396. Tag the current version as saved.
  1397. ----
  1398. .. _class_TextEdit_method_undo:
  1399. - void **undo** **(** **)**
  1400. Perform undo operation.
  1401. Theme Property Descriptions
  1402. ---------------------------
  1403. .. _class_TextEdit_theme_color_background_color:
  1404. - :ref:`Color<class_Color>` **background_color**
  1405. +-----------+-----------------------+
  1406. | *Default* | ``Color(0, 0, 0, 0)`` |
  1407. +-----------+-----------------------+
  1408. Sets the background :ref:`Color<class_Color>` of this ``TextEdit``.
  1409. ----
  1410. .. _class_TextEdit_theme_color_caret_background_color:
  1411. - :ref:`Color<class_Color>` **caret_background_color**
  1412. +-----------+-----------------------+
  1413. | *Default* | ``Color(0, 0, 0, 1)`` |
  1414. +-----------+-----------------------+
  1415. :ref:`Color<class_Color>` of the text behind the caret when using a block caret.
  1416. ----
  1417. .. _class_TextEdit_theme_color_caret_color:
  1418. - :ref:`Color<class_Color>` **caret_color**
  1419. +-----------+--------------------------------+
  1420. | *Default* | ``Color(0.88, 0.88, 0.88, 1)`` |
  1421. +-----------+--------------------------------+
  1422. :ref:`Color<class_Color>` of the caret.
  1423. ----
  1424. .. _class_TextEdit_theme_color_current_line_color:
  1425. - :ref:`Color<class_Color>` **current_line_color**
  1426. +-----------+----------------------------------+
  1427. | *Default* | ``Color(0.25, 0.25, 0.26, 0.8)`` |
  1428. +-----------+----------------------------------+
  1429. Background :ref:`Color<class_Color>` of the line containing the caret.
  1430. ----
  1431. .. _class_TextEdit_theme_style_focus:
  1432. - :ref:`StyleBox<class_StyleBox>` **focus**
  1433. Sets the :ref:`StyleBox<class_StyleBox>` when in focus.
  1434. ----
  1435. .. _class_TextEdit_theme_font_font:
  1436. - :ref:`Font<class_Font>` **font**
  1437. Sets the default :ref:`Font<class_Font>`.
  1438. ----
  1439. .. _class_TextEdit_theme_color_font_color:
  1440. - :ref:`Color<class_Color>` **font_color**
  1441. +-----------+--------------------------------+
  1442. | *Default* | ``Color(0.88, 0.88, 0.88, 1)`` |
  1443. +-----------+--------------------------------+
  1444. Sets the font :ref:`Color<class_Color>`.
  1445. ----
  1446. .. _class_TextEdit_theme_color_font_outline_color:
  1447. - :ref:`Color<class_Color>` **font_outline_color**
  1448. +-----------+-----------------------+
  1449. | *Default* | ``Color(1, 1, 1, 1)`` |
  1450. +-----------+-----------------------+
  1451. The tint of text outline of the ``TextEdit``.
  1452. ----
  1453. .. _class_TextEdit_theme_color_font_readonly_color:
  1454. - :ref:`Color<class_Color>` **font_readonly_color**
  1455. +-----------+----------------------------------+
  1456. | *Default* | ``Color(0.88, 0.88, 0.88, 0.5)`` |
  1457. +-----------+----------------------------------+
  1458. Sets the font :ref:`Color<class_Color>` when :ref:`editable<class_TextEdit_property_editable>` is disabled.
  1459. ----
  1460. .. _class_TextEdit_theme_color_font_selected_color:
  1461. - :ref:`Color<class_Color>` **font_selected_color**
  1462. +-----------+-----------------------+
  1463. | *Default* | ``Color(0, 0, 0, 1)`` |
  1464. +-----------+-----------------------+
  1465. 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.
  1466. ----
  1467. .. _class_TextEdit_theme_font_size_font_size:
  1468. - :ref:`int<class_int>` **font_size**
  1469. Sets default font size.
  1470. ----
  1471. .. _class_TextEdit_theme_constant_line_spacing:
  1472. - :ref:`int<class_int>` **line_spacing**
  1473. +-----------+-------+
  1474. | *Default* | ``4`` |
  1475. +-----------+-------+
  1476. Sets the spacing between the lines.
  1477. ----
  1478. .. _class_TextEdit_theme_style_normal:
  1479. - :ref:`StyleBox<class_StyleBox>` **normal**
  1480. Sets the :ref:`StyleBox<class_StyleBox>` of this ``TextEdit``.
  1481. ----
  1482. .. _class_TextEdit_theme_constant_outline_size:
  1483. - :ref:`int<class_int>` **outline_size**
  1484. +-----------+-------+
  1485. | *Default* | ``0`` |
  1486. +-----------+-------+
  1487. The size of the text outline.
  1488. ----
  1489. .. _class_TextEdit_theme_style_read_only:
  1490. - :ref:`StyleBox<class_StyleBox>` **read_only**
  1491. Sets the :ref:`StyleBox<class_StyleBox>` of this ``TextEdit`` when :ref:`editable<class_TextEdit_property_editable>` is disabled.
  1492. ----
  1493. .. _class_TextEdit_theme_color_search_result_border_color:
  1494. - :ref:`Color<class_Color>` **search_result_border_color**
  1495. +-----------+-------------------------------+
  1496. | *Default* | ``Color(0.3, 0.3, 0.3, 0.4)`` |
  1497. +-----------+-------------------------------+
  1498. :ref:`Color<class_Color>` of the border around text that matches the search query.
  1499. ----
  1500. .. _class_TextEdit_theme_color_search_result_color:
  1501. - :ref:`Color<class_Color>` **search_result_color**
  1502. +-----------+-----------------------------+
  1503. | *Default* | ``Color(0.3, 0.3, 0.3, 1)`` |
  1504. +-----------+-----------------------------+
  1505. :ref:`Color<class_Color>` behind the text that matches the search query.
  1506. ----
  1507. .. _class_TextEdit_theme_color_selection_color:
  1508. - :ref:`Color<class_Color>` **selection_color**
  1509. +-----------+--------------------------------+
  1510. | *Default* | ``Color(0.49, 0.49, 0.49, 1)`` |
  1511. +-----------+--------------------------------+
  1512. Sets the highlight :ref:`Color<class_Color>` of text selections.
  1513. ----
  1514. .. _class_TextEdit_theme_icon_space:
  1515. - :ref:`Texture2D<class_Texture2D>` **space**
  1516. Sets a custom :ref:`Texture2D<class_Texture2D>` for space text characters.
  1517. ----
  1518. .. _class_TextEdit_theme_icon_tab:
  1519. - :ref:`Texture2D<class_Texture2D>` **tab**
  1520. Sets a custom :ref:`Texture2D<class_Texture2D>` for tab text characters.
  1521. ----
  1522. .. _class_TextEdit_theme_color_word_highlighted_color:
  1523. - :ref:`Color<class_Color>` **word_highlighted_color**
  1524. +-----------+--------------------------------+
  1525. | *Default* | ``Color(0.8, 0.9, 0.9, 0.15)`` |
  1526. +-----------+--------------------------------+
  1527. Sets the highlight :ref:`Color<class_Color>` of multiple occurrences. :ref:`highlight_all_occurrences<class_TextEdit_property_highlight_all_occurrences>` has to be enabled.
  1528. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1529. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1530. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1531. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1532. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1533. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`