123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextEdit.xml.
- .. _class_TextEdit:
- TextEdit
- ========
- **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- **Inherited By:** :ref:`CodeEdit<class_CodeEdit>`
- A multiline text editor.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- A multiline text editor. It also has limited facilities for editing code, such as syntax highlighting support. For more advanced facilities for editing code, see :ref:`CodeEdit<class_CodeEdit>`.
- \ **Note:** Most viewport, caret and edit methods contain a ``caret_index`` argument for :ref:`caret_multiple<class_TextEdit_property_caret_multiple>` support. The argument should be one of the following: ``-1`` for all carets, ``0`` for the main caret, or greater than ``0`` for secondary carets.
- \ **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.
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` | :ref:`autowrap_mode<class_TextEdit_property_autowrap_mode>` | ``3`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`caret_blink<class_TextEdit_property_caret_blink>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`caret_blink_interval<class_TextEdit_property_caret_blink_interval>` | ``0.65`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`caret_draw_when_editable_disabled<class_TextEdit_property_caret_draw_when_editable_disabled>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`caret_mid_grapheme<class_TextEdit_property_caret_mid_grapheme>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`caret_move_on_right_click<class_TextEdit_property_caret_move_on_right_click>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`caret_multiple<class_TextEdit_property_caret_multiple>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`CaretType<enum_TextEdit_CaretType>` | :ref:`caret_type<class_TextEdit_property_caret_type>` | ``0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`context_menu_enabled<class_TextEdit_property_context_menu_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`deselect_on_focus_loss_enabled<class_TextEdit_property_deselect_on_focus_loss_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`drag_and_drop_selection_enabled<class_TextEdit_property_drag_and_drop_selection_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`draw_control_chars<class_TextEdit_property_draw_control_chars>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`draw_spaces<class_TextEdit_property_draw_spaces>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`draw_tabs<class_TextEdit_property_draw_tabs>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`editable<class_TextEdit_property_editable>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`highlight_all_occurrences<class_TextEdit_property_highlight_all_occurrences>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`highlight_current_line<class_TextEdit_property_highlight_current_line>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`language<class_TextEdit_property_language>` | ``""`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`middle_mouse_paste_enabled<class_TextEdit_property_middle_mouse_paste_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`minimap_draw<class_TextEdit_property_minimap_draw>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`minimap_width<class_TextEdit_property_minimap_width>` | ``80`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`CursorShape<enum_Control_CursorShape>` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control<class_Control_property_mouse_default_cursor_shape>`) |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`placeholder_text<class_TextEdit_property_placeholder_text>` | ``""`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`scroll_fit_content_height<class_TextEdit_property_scroll_fit_content_height>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`scroll_horizontal<class_TextEdit_property_scroll_horizontal>` | ``0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`scroll_past_end_of_file<class_TextEdit_property_scroll_past_end_of_file>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`scroll_smooth<class_TextEdit_property_scroll_smooth>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`scroll_v_scroll_speed<class_TextEdit_property_scroll_v_scroll_speed>` | ``80.0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`scroll_vertical<class_TextEdit_property_scroll_vertical>` | ``0.0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`shortcut_keys_enabled<class_TextEdit_property_shortcut_keys_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` | :ref:`structured_text_bidi_override<class_TextEdit_property_structured_text_bidi_override>` | ``0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`Array<class_Array>` | :ref:`structured_text_bidi_override_options<class_TextEdit_property_structured_text_bidi_override_options>` | ``[]`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` | :ref:`syntax_highlighter<class_TextEdit_property_syntax_highlighter>` | |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`text<class_TextEdit_property_text>` | ``""`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`text_direction<class_TextEdit_property_text_direction>` | ``0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`virtual_keyboard_enabled<class_TextEdit_property_virtual_keyboard_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` | :ref:`wrap_mode<class_TextEdit_property_wrap_mode>` | ``0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_backspace<class_TextEdit_private_method__backspace>` **(** :ref:`int<class_int>` caret_index **)** |virtual| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_copy<class_TextEdit_private_method__copy>` **(** :ref:`int<class_int>` caret_index **)** |virtual| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_cut<class_TextEdit_private_method__cut>` **(** :ref:`int<class_int>` caret_index **)** |virtual| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_handle_unicode_input<class_TextEdit_private_method__handle_unicode_input>` **(** :ref:`int<class_int>` unicode_char, :ref:`int<class_int>` caret_index **)** |virtual| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_paste<class_TextEdit_private_method__paste>` **(** :ref:`int<class_int>` caret_index **)** |virtual| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_paste_primary_clipboard<class_TextEdit_private_method__paste_primary_clipboard>` **(** :ref:`int<class_int>` caret_index **)** |virtual| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`add_caret<class_TextEdit_method_add_caret>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` col **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_caret_at_carets<class_TextEdit_method_add_caret_at_carets>` **(** :ref:`bool<class_bool>` below **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_gutter<class_TextEdit_method_add_gutter>` **(** :ref:`int<class_int>` at=-1 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_selection_for_next_occurrence<class_TextEdit_method_add_selection_for_next_occurrence>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`adjust_carets_after_edit<class_TextEdit_method_adjust_carets_after_edit>` **(** :ref:`int<class_int>` caret, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_col, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_col **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`adjust_viewport_to_caret<class_TextEdit_method_adjust_viewport_to_caret>` **(** :ref:`int<class_int>` caret_index=0 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`backspace<class_TextEdit_method_backspace>` **(** :ref:`int<class_int>` caret_index=-1 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`begin_complex_operation<class_TextEdit_method_begin_complex_operation>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`center_viewport_to_caret<class_TextEdit_method_center_viewport_to_caret>` **(** :ref:`int<class_int>` caret_index=0 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`clear<class_TextEdit_method_clear>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`clear_undo_history<class_TextEdit_method_clear_undo_history>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`copy<class_TextEdit_method_copy>` **(** :ref:`int<class_int>` caret_index=-1 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`cut<class_TextEdit_method_cut>` **(** :ref:`int<class_int>` caret_index=-1 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`delete_selection<class_TextEdit_method_delete_selection>` **(** :ref:`int<class_int>` caret_index=-1 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`deselect<class_TextEdit_method_deselect>` **(** :ref:`int<class_int>` caret_index=-1 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`end_action<class_TextEdit_method_end_action>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`end_complex_operation<class_TextEdit_method_end_complex_operation>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_caret_column<class_TextEdit_method_get_caret_column>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_caret_count<class_TextEdit_method_get_caret_count>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`get_caret_draw_pos<class_TextEdit_method_get_caret_draw_pos>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_caret_index_edit_order<class_TextEdit_method_get_caret_index_edit_order>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_caret_line<class_TextEdit_method_get_caret_line>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_caret_wrap_index<class_TextEdit_method_get_caret_wrap_index>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_first_non_whitespace_column<class_TextEdit_method_get_first_non_whitespace_column>` **(** :ref:`int<class_int>` line **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_first_visible_line<class_TextEdit_method_get_first_visible_line>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_gutter_count<class_TextEdit_method_get_gutter_count>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_gutter_name<class_TextEdit_method_get_gutter_name>` **(** :ref:`int<class_int>` gutter **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`GutterType<enum_TextEdit_GutterType>` | :ref:`get_gutter_type<class_TextEdit_method_get_gutter_type>` **(** :ref:`int<class_int>` gutter **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_gutter_width<class_TextEdit_method_get_gutter_width>` **(** :ref:`int<class_int>` gutter **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`HScrollBar<class_HScrollBar>` | :ref:`get_h_scroll_bar<class_TextEdit_method_get_h_scroll_bar>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_indent_level<class_TextEdit_method_get_indent_level>` **(** :ref:`int<class_int>` line **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_last_full_visible_line<class_TextEdit_method_get_last_full_visible_line>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_last_full_visible_line_wrap_index<class_TextEdit_method_get_last_full_visible_line_wrap_index>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_last_unhidden_line<class_TextEdit_method_get_last_unhidden_line>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_line<class_TextEdit_method_get_line>` **(** :ref:`int<class_int>` line **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`get_line_background_color<class_TextEdit_method_get_line_background_color>` **(** :ref:`int<class_int>` line **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_line_count<class_TextEdit_method_get_line_count>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_line_height<class_TextEdit_method_get_line_height>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_line_wrap_count<class_TextEdit_method_get_line_wrap_count>` **(** :ref:`int<class_int>` line **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_line_wrapped_text<class_TextEdit_method_get_line_wrapped_text>` **(** :ref:`int<class_int>` line **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`get_local_mouse_pos<class_TextEdit_method_get_local_mouse_pos>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_TextEdit_method_get_menu>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_minimap_line_at_pos<class_TextEdit_method_get_minimap_line_at_pos>` **(** :ref:`Vector2i<class_Vector2i>` position **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_minimap_visible_lines<class_TextEdit_method_get_minimap_visible_lines>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2i<class_Vector2i>` | :ref:`get_pos_at_line_column<class_TextEdit_method_get_pos_at_line_column>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Rect2i<class_Rect2i>` | :ref:`get_rect_at_line_column<class_TextEdit_method_get_rect_at_line_column>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_saved_version<class_TextEdit_method_get_saved_version>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_selected_text<class_TextEdit_method_get_selected_text>` **(** :ref:`int<class_int>` caret_index=-1 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_selection_column<class_TextEdit_method_get_selection_column>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_selection_from_column<class_TextEdit_method_get_selection_from_column>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_selection_from_line<class_TextEdit_method_get_selection_from_line>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_selection_line<class_TextEdit_method_get_selection_line>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`SelectionMode<enum_TextEdit_SelectionMode>` | :ref:`get_selection_mode<class_TextEdit_method_get_selection_mode>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_selection_to_column<class_TextEdit_method_get_selection_to_column>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_selection_to_line<class_TextEdit_method_get_selection_to_line>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_tab_size<class_TextEdit_method_get_tab_size>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_total_gutter_width<class_TextEdit_method_get_total_gutter_width>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_total_visible_line_count<class_TextEdit_method_get_total_visible_line_count>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_TextEdit_method_get_v_scroll_bar>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_version<class_TextEdit_method_get_version>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_visible_line_count<class_TextEdit_method_get_visible_line_count>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_word_at_pos<class_TextEdit_method_get_word_at_pos>` **(** :ref:`Vector2<class_Vector2>` position **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_word_under_caret<class_TextEdit_method_get_word_under_caret>` **(** :ref:`int<class_int>` caret_index=-1 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_ime_text<class_TextEdit_method_has_ime_text>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_redo<class_TextEdit_method_has_redo>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_selection<class_TextEdit_method_has_selection>` **(** :ref:`int<class_int>` caret_index=-1 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_undo<class_TextEdit_method_has_undo>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`insert_line_at<class_TextEdit_method_insert_line_at>` **(** :ref:`int<class_int>` line, :ref:`String<class_String>` text **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`insert_text_at_caret<class_TextEdit_method_insert_text_at_caret>` **(** :ref:`String<class_String>` text, :ref:`int<class_int>` caret_index=-1 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_caret_visible<class_TextEdit_method_is_caret_visible>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_dragging_cursor<class_TextEdit_method_is_dragging_cursor>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_gutter_clickable<class_TextEdit_method_is_gutter_clickable>` **(** :ref:`int<class_int>` gutter **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_gutter_drawn<class_TextEdit_method_is_gutter_drawn>` **(** :ref:`int<class_int>` gutter **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_gutter_overwritable<class_TextEdit_method_is_gutter_overwritable>` **(** :ref:`int<class_int>` gutter **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_line_wrapped<class_TextEdit_method_is_line_wrapped>` **(** :ref:`int<class_int>` line **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_TextEdit_method_is_menu_visible>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_mouse_over_selection<class_TextEdit_method_is_mouse_over_selection>` **(** :ref:`bool<class_bool>` edges, :ref:`int<class_int>` caret_index=-1 **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_overtype_mode_enabled<class_TextEdit_method_is_overtype_mode_enabled>` **(** **)** |const| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`menu_option<class_TextEdit_method_menu_option>` **(** :ref:`int<class_int>` option **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`merge_gutters<class_TextEdit_method_merge_gutters>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`merge_overlapping_carets<class_TextEdit_method_merge_overlapping_carets>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`paste<class_TextEdit_method_paste>` **(** :ref:`int<class_int>` caret_index=-1 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`paste_primary_clipboard<class_TextEdit_method_paste_primary_clipboard>` **(** :ref:`int<class_int>` caret_index=-1 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`redo<class_TextEdit_method_redo>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`remove_caret<class_TextEdit_method_remove_caret>` **(** :ref:`int<class_int>` caret **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`remove_gutter<class_TextEdit_method_remove_gutter>` **(** :ref:`int<class_int>` gutter **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`remove_secondary_carets<class_TextEdit_method_remove_secondary_carets>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :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| |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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, :ref:`int<class_int>` caret_index=0 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`select_all<class_TextEdit_method_select_all>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`select_word_under_caret<class_TextEdit_method_select_word_under_caret>` **(** :ref:`int<class_int>` caret_index=-1 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_caret_column<class_TextEdit_method_set_caret_column>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` adjust_viewport=true, :ref:`int<class_int>` caret_index=0 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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, :ref:`int<class_int>` caret_index=0 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_gutter_clickable<class_TextEdit_method_set_gutter_clickable>` **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` clickable **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_gutter_custom_draw<class_TextEdit_method_set_gutter_custom_draw>` **(** :ref:`int<class_int>` column, :ref:`Callable<class_Callable>` draw_callback **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_gutter_draw<class_TextEdit_method_set_gutter_draw>` **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` draw **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_gutter_name<class_TextEdit_method_set_gutter_name>` **(** :ref:`int<class_int>` gutter, :ref:`String<class_String>` name **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_gutter_overwritable<class_TextEdit_method_set_gutter_overwritable>` **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` overwritable **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>` **(** :ref:`int<class_int>` gutter, :ref:`GutterType<enum_TextEdit_GutterType>` type **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_gutter_width<class_TextEdit_method_set_gutter_width>` **(** :ref:`int<class_int>` gutter, :ref:`int<class_int>` width **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_line<class_TextEdit_method_set_line>` **(** :ref:`int<class_int>` line, :ref:`String<class_String>` new_text **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_line_background_color<class_TextEdit_method_set_line_background_color>` **(** :ref:`int<class_int>` line, :ref:`Color<class_Color>` color **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_overtype_mode_enabled<class_TextEdit_method_set_overtype_mode_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_search_flags<class_TextEdit_method_set_search_flags>` **(** :ref:`int<class_int>` flags **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_search_text<class_TextEdit_method_set_search_text>` **(** :ref:`String<class_String>` search_text **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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, :ref:`int<class_int>` caret_index=0 **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_tab_size<class_TextEdit_method_set_tab_size>` **(** :ref:`int<class_int>` size **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_tooltip_request_func<class_TextEdit_method_set_tooltip_request_func>` **(** :ref:`Callable<class_Callable>` callback **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`start_action<class_TextEdit_method_start_action>` **(** :ref:`EditAction<enum_TextEdit_EditAction>` action **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`swap_lines<class_TextEdit_method_swap_lines>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`tag_saved_version<class_TextEdit_method_tag_saved_version>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`undo<class_TextEdit_method_undo>` **(** **)** |
- +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-reftable-group
- Theme Properties
- ----------------
- .. table::
- :widths: auto
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`background_color<class_TextEdit_theme_color_background_color>` | ``Color(0, 0, 0, 0)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`caret_background_color<class_TextEdit_theme_color_caret_background_color>` | ``Color(0, 0, 0, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`caret_color<class_TextEdit_theme_color_caret_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`current_line_color<class_TextEdit_theme_color_current_line_color>` | ``Color(0.25, 0.25, 0.26, 0.8)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`font_color<class_TextEdit_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TextEdit_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`font_placeholder_color<class_TextEdit_theme_color_font_placeholder_color>` | ``Color(0.875, 0.875, 0.875, 0.6)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`font_readonly_color<class_TextEdit_theme_color_font_readonly_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_TextEdit_theme_color_font_selected_color>` | ``Color(0, 0, 0, 0)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :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)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`search_result_color<class_TextEdit_theme_color_search_result_color>` | ``Color(0.3, 0.3, 0.3, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`selection_color<class_TextEdit_theme_color_selection_color>` | ``Color(0.5, 0.5, 0.5, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`word_highlighted_color<class_TextEdit_theme_color_word_highlighted_color>` | ``Color(0.5, 0.5, 0.5, 0.25)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`int<class_int>` | :ref:`caret_width<class_TextEdit_theme_constant_caret_width>` | ``1`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`int<class_int>` | :ref:`line_spacing<class_TextEdit_theme_constant_line_spacing>` | ``4`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`int<class_int>` | :ref:`outline_size<class_TextEdit_theme_constant_outline_size>` | ``0`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Font<class_Font>` | :ref:`font<class_TextEdit_theme_font_font>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_size<class_TextEdit_theme_font_size_font_size>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Texture2D<class_Texture2D>` | :ref:`space<class_TextEdit_theme_icon_space>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Texture2D<class_Texture2D>` | :ref:`tab<class_TextEdit_theme_icon_tab>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_TextEdit_theme_style_focus>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_TextEdit_theme_style_normal>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`StyleBox<class_StyleBox>` | :ref:`read_only<class_TextEdit_theme_style_read_only>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Signals
- -------
- .. _class_TextEdit_signal_caret_changed:
- .. rst-class:: classref-signal
- **caret_changed** **(** **)**
- Emitted when the caret changes position.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_signal_gutter_added:
- .. rst-class:: classref-signal
- **gutter_added** **(** **)**
- Emitted when a gutter is added.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_signal_gutter_clicked:
- .. rst-class:: classref-signal
- **gutter_clicked** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)**
- Emitted when a gutter is clicked.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_signal_gutter_removed:
- .. rst-class:: classref-signal
- **gutter_removed** **(** **)**
- Emitted when a gutter is removed.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_signal_lines_edited_from:
- .. rst-class:: classref-signal
- **lines_edited_from** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)**
- Emitted immediately when the text changes.
- When text is added ``from_line`` will be less than ``to_line``. On a remove ``to_line`` will be less than ``from_line``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_signal_text_changed:
- .. rst-class:: classref-signal
- **text_changed** **(** **)**
- Emitted when the text changes.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_signal_text_set:
- .. rst-class:: classref-signal
- **text_set** **(** **)**
- Emitted when :ref:`clear<class_TextEdit_method_clear>` is called or :ref:`text<class_TextEdit_property_text>` is set.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_TextEdit_MenuItems:
- .. rst-class:: classref-enumeration
- enum **MenuItems**:
- .. _class_TextEdit_constant_MENU_CUT:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_CUT** = ``0``
- Cuts (copies and clears) the selected text.
- .. _class_TextEdit_constant_MENU_COPY:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_COPY** = ``1``
- Copies the selected text.
- .. _class_TextEdit_constant_MENU_PASTE:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_PASTE** = ``2``
- Pastes the clipboard text over the selected text (or at the cursor's position).
- .. _class_TextEdit_constant_MENU_CLEAR:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_CLEAR** = ``3``
- Erases the whole **TextEdit** text.
- .. _class_TextEdit_constant_MENU_SELECT_ALL:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_SELECT_ALL** = ``4``
- Selects the whole **TextEdit** text.
- .. _class_TextEdit_constant_MENU_UNDO:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_UNDO** = ``5``
- Undoes the previous action.
- .. _class_TextEdit_constant_MENU_REDO:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_REDO** = ``6``
- Redoes the previous action.
- .. _class_TextEdit_constant_MENU_SUBMENU_TEXT_DIR:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_SUBMENU_TEXT_DIR** = ``7``
- ID of "Text Writing Direction" submenu.
- .. _class_TextEdit_constant_MENU_DIR_INHERITED:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_DIR_INHERITED** = ``8``
- Sets text direction to inherited.
- .. _class_TextEdit_constant_MENU_DIR_AUTO:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_DIR_AUTO** = ``9``
- Sets text direction to automatic.
- .. _class_TextEdit_constant_MENU_DIR_LTR:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_DIR_LTR** = ``10``
- Sets text direction to left-to-right.
- .. _class_TextEdit_constant_MENU_DIR_RTL:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_DIR_RTL** = ``11``
- Sets text direction to right-to-left.
- .. _class_TextEdit_constant_MENU_DISPLAY_UCC:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_DISPLAY_UCC** = ``12``
- Toggles control character display.
- .. _class_TextEdit_constant_MENU_SUBMENU_INSERT_UCC:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_SUBMENU_INSERT_UCC** = ``13``
- ID of "Insert Control Character" submenu.
- .. _class_TextEdit_constant_MENU_INSERT_LRM:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_LRM** = ``14``
- Inserts left-to-right mark (LRM) character.
- .. _class_TextEdit_constant_MENU_INSERT_RLM:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_RLM** = ``15``
- Inserts right-to-left mark (RLM) character.
- .. _class_TextEdit_constant_MENU_INSERT_LRE:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_LRE** = ``16``
- Inserts start of left-to-right embedding (LRE) character.
- .. _class_TextEdit_constant_MENU_INSERT_RLE:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_RLE** = ``17``
- Inserts start of right-to-left embedding (RLE) character.
- .. _class_TextEdit_constant_MENU_INSERT_LRO:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_LRO** = ``18``
- Inserts start of left-to-right override (LRO) character.
- .. _class_TextEdit_constant_MENU_INSERT_RLO:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_RLO** = ``19``
- Inserts start of right-to-left override (RLO) character.
- .. _class_TextEdit_constant_MENU_INSERT_PDF:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_PDF** = ``20``
- Inserts pop direction formatting (PDF) character.
- .. _class_TextEdit_constant_MENU_INSERT_ALM:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_ALM** = ``21``
- Inserts Arabic letter mark (ALM) character.
- .. _class_TextEdit_constant_MENU_INSERT_LRI:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_LRI** = ``22``
- Inserts left-to-right isolate (LRI) character.
- .. _class_TextEdit_constant_MENU_INSERT_RLI:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_RLI** = ``23``
- Inserts right-to-left isolate (RLI) character.
- .. _class_TextEdit_constant_MENU_INSERT_FSI:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_FSI** = ``24``
- Inserts first strong isolate (FSI) character.
- .. _class_TextEdit_constant_MENU_INSERT_PDI:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_PDI** = ``25``
- Inserts pop direction isolate (PDI) character.
- .. _class_TextEdit_constant_MENU_INSERT_ZWJ:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_ZWJ** = ``26``
- Inserts zero width joiner (ZWJ) character.
- .. _class_TextEdit_constant_MENU_INSERT_ZWNJ:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_ZWNJ** = ``27``
- Inserts zero width non-joiner (ZWNJ) character.
- .. _class_TextEdit_constant_MENU_INSERT_WJ:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_WJ** = ``28``
- Inserts word joiner (WJ) character.
- .. _class_TextEdit_constant_MENU_INSERT_SHY:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_INSERT_SHY** = ``29``
- Inserts soft hyphen (SHY) character.
- .. _class_TextEdit_constant_MENU_MAX:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_TextEdit_MenuItems>` **MENU_MAX** = ``30``
- Represents the size of the :ref:`MenuItems<enum_TextEdit_MenuItems>` enum.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextEdit_EditAction:
- .. rst-class:: classref-enumeration
- enum **EditAction**:
- .. _class_TextEdit_constant_ACTION_NONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`EditAction<enum_TextEdit_EditAction>` **ACTION_NONE** = ``0``
- No current action.
- .. _class_TextEdit_constant_ACTION_TYPING:
- .. rst-class:: classref-enumeration-constant
- :ref:`EditAction<enum_TextEdit_EditAction>` **ACTION_TYPING** = ``1``
- A typing action.
- .. _class_TextEdit_constant_ACTION_BACKSPACE:
- .. rst-class:: classref-enumeration-constant
- :ref:`EditAction<enum_TextEdit_EditAction>` **ACTION_BACKSPACE** = ``2``
- A backwards delete action.
- .. _class_TextEdit_constant_ACTION_DELETE:
- .. rst-class:: classref-enumeration-constant
- :ref:`EditAction<enum_TextEdit_EditAction>` **ACTION_DELETE** = ``3``
- A forward delete action.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextEdit_SearchFlags:
- .. rst-class:: classref-enumeration
- enum **SearchFlags**:
- .. _class_TextEdit_constant_SEARCH_MATCH_CASE:
- .. rst-class:: classref-enumeration-constant
- :ref:`SearchFlags<enum_TextEdit_SearchFlags>` **SEARCH_MATCH_CASE** = ``1``
- Match case when searching.
- .. _class_TextEdit_constant_SEARCH_WHOLE_WORDS:
- .. rst-class:: classref-enumeration-constant
- :ref:`SearchFlags<enum_TextEdit_SearchFlags>` **SEARCH_WHOLE_WORDS** = ``2``
- Match whole words when searching.
- .. _class_TextEdit_constant_SEARCH_BACKWARDS:
- .. rst-class:: classref-enumeration-constant
- :ref:`SearchFlags<enum_TextEdit_SearchFlags>` **SEARCH_BACKWARDS** = ``4``
- Search from end to beginning.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextEdit_CaretType:
- .. rst-class:: classref-enumeration
- enum **CaretType**:
- .. _class_TextEdit_constant_CARET_TYPE_LINE:
- .. rst-class:: classref-enumeration-constant
- :ref:`CaretType<enum_TextEdit_CaretType>` **CARET_TYPE_LINE** = ``0``
- Vertical line caret.
- .. _class_TextEdit_constant_CARET_TYPE_BLOCK:
- .. rst-class:: classref-enumeration-constant
- :ref:`CaretType<enum_TextEdit_CaretType>` **CARET_TYPE_BLOCK** = ``1``
- Block caret.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextEdit_SelectionMode:
- .. rst-class:: classref-enumeration
- enum **SelectionMode**:
- .. _class_TextEdit_constant_SELECTION_MODE_NONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`SelectionMode<enum_TextEdit_SelectionMode>` **SELECTION_MODE_NONE** = ``0``
- Not selecting.
- .. _class_TextEdit_constant_SELECTION_MODE_SHIFT:
- .. rst-class:: classref-enumeration-constant
- :ref:`SelectionMode<enum_TextEdit_SelectionMode>` **SELECTION_MODE_SHIFT** = ``1``
- Select as if ``shift`` is pressed.
- .. _class_TextEdit_constant_SELECTION_MODE_POINTER:
- .. rst-class:: classref-enumeration-constant
- :ref:`SelectionMode<enum_TextEdit_SelectionMode>` **SELECTION_MODE_POINTER** = ``2``
- Select single characters as if the user single clicked.
- .. _class_TextEdit_constant_SELECTION_MODE_WORD:
- .. rst-class:: classref-enumeration-constant
- :ref:`SelectionMode<enum_TextEdit_SelectionMode>` **SELECTION_MODE_WORD** = ``3``
- Select whole words as if the user double clicked.
- .. _class_TextEdit_constant_SELECTION_MODE_LINE:
- .. rst-class:: classref-enumeration-constant
- :ref:`SelectionMode<enum_TextEdit_SelectionMode>` **SELECTION_MODE_LINE** = ``4``
- Select whole lines as if the user triple clicked.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextEdit_LineWrappingMode:
- .. rst-class:: classref-enumeration
- enum **LineWrappingMode**:
- .. _class_TextEdit_constant_LINE_WRAPPING_NONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` **LINE_WRAPPING_NONE** = ``0``
- Line wrapping is disabled.
- .. _class_TextEdit_constant_LINE_WRAPPING_BOUNDARY:
- .. rst-class:: classref-enumeration-constant
- :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` **LINE_WRAPPING_BOUNDARY** = ``1``
- Line wrapping occurs at the control boundary, beyond what would normally be visible.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextEdit_GutterType:
- .. rst-class:: classref-enumeration
- enum **GutterType**:
- .. _class_TextEdit_constant_GUTTER_TYPE_STRING:
- .. rst-class:: classref-enumeration-constant
- :ref:`GutterType<enum_TextEdit_GutterType>` **GUTTER_TYPE_STRING** = ``0``
- Draw a string.
- .. _class_TextEdit_constant_GUTTER_TYPE_ICON:
- .. rst-class:: classref-enumeration-constant
- :ref:`GutterType<enum_TextEdit_GutterType>` **GUTTER_TYPE_ICON** = ``1``
- Draw an icon.
- .. _class_TextEdit_constant_GUTTER_TYPE_CUSTOM:
- .. rst-class:: classref-enumeration-constant
- :ref:`GutterType<enum_TextEdit_GutterType>` **GUTTER_TYPE_CUSTOM** = ``2``
- Custom draw.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_TextEdit_property_autowrap_mode:
- .. rst-class:: classref-property
- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``3``
- .. rst-class:: classref-property-setget
- - void **set_autowrap_mode** **(** :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` value **)**
- - :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode** **(** **)**
- If :ref:`wrap_mode<class_TextEdit_property_wrap_mode>` is set to :ref:`LINE_WRAPPING_BOUNDARY<class_TextEdit_constant_LINE_WRAPPING_BOUNDARY>`, sets text wrapping mode. To see how each mode behaves, see :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_caret_blink:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **caret_blink** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_caret_blink_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_caret_blink_enabled** **(** **)**
- If ``true``, makes the caret blink.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_caret_blink_interval:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **caret_blink_interval** = ``0.65``
- .. rst-class:: classref-property-setget
- - void **set_caret_blink_interval** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **get_caret_blink_interval** **(** **)**
- The interval at which the caret blinks (in seconds).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_caret_draw_when_editable_disabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **caret_draw_when_editable_disabled** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_draw_caret_when_editable_disabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_drawing_caret_when_editable_disabled** **(** **)**
- If ``true``, caret will be visible when :ref:`editable<class_TextEdit_property_editable>` is disabled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_caret_mid_grapheme:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **caret_mid_grapheme** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_caret_mid_grapheme_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_caret_mid_grapheme_enabled** **(** **)**
- Allow moving caret, selecting and removing the individual composite character components.
- \ **Note:** :kbd:`Backspace` is always removing individual composite character components.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_caret_move_on_right_click:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **caret_move_on_right_click** = ``true``
- .. rst-class:: classref-property-setget
- - void **set_move_caret_on_right_click_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_move_caret_on_right_click_enabled** **(** **)**
- If ``true``, a right-click moves the caret at the mouse position before displaying the context menu.
- If ``false``, the context menu disregards mouse location.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_caret_multiple:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **caret_multiple** = ``true``
- .. rst-class:: classref-property-setget
- - void **set_multiple_carets_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_multiple_carets_enabled** **(** **)**
- Sets if multiple carets are allowed.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_caret_type:
- .. rst-class:: classref-property
- :ref:`CaretType<enum_TextEdit_CaretType>` **caret_type** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_caret_type** **(** :ref:`CaretType<enum_TextEdit_CaretType>` value **)**
- - :ref:`CaretType<enum_TextEdit_CaretType>` **get_caret_type** **(** **)**
- Set the type of caret to draw.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_context_menu_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **context_menu_enabled** = ``true``
- .. rst-class:: classref-property-setget
- - void **set_context_menu_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_context_menu_enabled** **(** **)**
- If ``true``, a right-click displays the context menu.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_deselect_on_focus_loss_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **deselect_on_focus_loss_enabled** = ``true``
- .. rst-class:: classref-property-setget
- - void **set_deselect_on_focus_loss_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_deselect_on_focus_loss_enabled** **(** **)**
- If ``true``, the selected text will be deselected when focus is lost.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_drag_and_drop_selection_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **drag_and_drop_selection_enabled** = ``true``
- .. rst-class:: classref-property-setget
- - void **set_drag_and_drop_selection_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_drag_and_drop_selection_enabled** **(** **)**
- If ``true``, allow drag and drop of selected text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_draw_control_chars:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **draw_control_chars** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_draw_control_chars** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **get_draw_control_chars** **(** **)**
- If ``true``, control characters are displayed.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_draw_spaces:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **draw_spaces** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_draw_spaces** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_drawing_spaces** **(** **)**
- If ``true``, the "space" character will have a visible representation.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_draw_tabs:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **draw_tabs** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_draw_tabs** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_drawing_tabs** **(** **)**
- If ``true``, the "tab" character will have a visible representation.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_editable:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **editable** = ``true``
- .. rst-class:: classref-property-setget
- - void **set_editable** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_editable** **(** **)**
- If ``false``, existing text cannot be modified and new text cannot be added.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_highlight_all_occurrences:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **highlight_all_occurrences** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_highlight_all_occurrences** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_highlight_all_occurrences_enabled** **(** **)**
- If ``true``, all occurrences of the selected text will be highlighted.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_highlight_current_line:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **highlight_current_line** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_highlight_current_line** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_highlight_current_line_enabled** **(** **)**
- If ``true``, the line containing the cursor is highlighted.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_language:
- .. rst-class:: classref-property
- :ref:`String<class_String>` **language** = ``""``
- .. rst-class:: classref-property-setget
- - void **set_language** **(** :ref:`String<class_String>` value **)**
- - :ref:`String<class_String>` **get_language** **(** **)**
- Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_middle_mouse_paste_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **middle_mouse_paste_enabled** = ``true``
- .. rst-class:: classref-property-setget
- - void **set_middle_mouse_paste_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_middle_mouse_paste_enabled** **(** **)**
- If ``false``, using middle mouse button to paste clipboard will be disabled.
- \ **Note:** This method is only implemented on Linux.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_minimap_draw:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **minimap_draw** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_draw_minimap** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_drawing_minimap** **(** **)**
- If ``true``, a minimap is shown, providing an outline of your source code.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_minimap_width:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **minimap_width** = ``80``
- .. rst-class:: classref-property-setget
- - void **set_minimap_width** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_minimap_width** **(** **)**
- The width, in pixels, of the minimap.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_placeholder_text:
- .. rst-class:: classref-property
- :ref:`String<class_String>` **placeholder_text** = ``""``
- .. rst-class:: classref-property-setget
- - void **set_placeholder** **(** :ref:`String<class_String>` value **)**
- - :ref:`String<class_String>` **get_placeholder** **(** **)**
- Text shown when the **TextEdit** is empty. It is **not** the **TextEdit**'s default value (see :ref:`text<class_TextEdit_property_text>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_scroll_fit_content_height:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **scroll_fit_content_height** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_fit_content_height_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_fit_content_height_enabled** **(** **)**
- If ``true``, **TextEdit** will disable vertical scroll and fit minimum height to the number of visible lines.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_scroll_horizontal:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **scroll_horizontal** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_h_scroll** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_h_scroll** **(** **)**
- If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_scroll_past_end_of_file:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **scroll_past_end_of_file** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_scroll_past_end_of_file_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_scroll_past_end_of_file_enabled** **(** **)**
- Allow scrolling past the last line into "virtual" space.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_scroll_smooth:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **scroll_smooth** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_smooth_scroll_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_smooth_scroll_enabled** **(** **)**
- Scroll smoothly over the text rather than jumping to the next location.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_scroll_v_scroll_speed:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **scroll_v_scroll_speed** = ``80.0``
- .. rst-class:: classref-property-setget
- - void **set_v_scroll_speed** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **get_v_scroll_speed** **(** **)**
- Sets the scroll speed with the minimap or when :ref:`scroll_smooth<class_TextEdit_property_scroll_smooth>` is enabled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_scroll_vertical:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **scroll_vertical** = ``0.0``
- .. rst-class:: classref-property-setget
- - void **set_v_scroll** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **get_v_scroll** **(** **)**
- If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_selecting_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **selecting_enabled** = ``true``
- .. rst-class:: classref-property-setget
- - void **set_selecting_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_selecting_enabled** **(** **)**
- If ``true``, text can be selected.
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_shortcut_keys_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **shortcut_keys_enabled** = ``true``
- .. rst-class:: classref-property-setget
- - void **set_shortcut_keys_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_shortcut_keys_enabled** **(** **)**
- If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_structured_text_bidi_override:
- .. rst-class:: classref-property
- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` value **)**
- - :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override** **(** **)**
- Set BiDi algorithm override for the structured text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_structured_text_bidi_override_options:
- .. rst-class:: classref-property
- :ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]``
- .. rst-class:: classref-property-setget
- - void **set_structured_text_bidi_override_options** **(** :ref:`Array<class_Array>` value **)**
- - :ref:`Array<class_Array>` **get_structured_text_bidi_override_options** **(** **)**
- Set additional options for BiDi override.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_syntax_highlighter:
- .. rst-class:: classref-property
- :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` **syntax_highlighter**
- .. rst-class:: classref-property-setget
- - void **set_syntax_highlighter** **(** :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` value **)**
- - :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` **get_syntax_highlighter** **(** **)**
- Sets the :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` to use.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_text:
- .. rst-class:: classref-property
- :ref:`String<class_String>` **text** = ``""``
- .. rst-class:: classref-property-setget
- - void **set_text** **(** :ref:`String<class_String>` value **)**
- - :ref:`String<class_String>` **get_text** **(** **)**
- String value of the **TextEdit**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_text_direction:
- .. rst-class:: classref-property
- :ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_text_direction** **(** :ref:`TextDirection<enum_Control_TextDirection>` value **)**
- - :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction** **(** **)**
- Base text writing direction.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_virtual_keyboard_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **virtual_keyboard_enabled** = ``true``
- .. rst-class:: classref-property-setget
- - void **set_virtual_keyboard_enabled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_virtual_keyboard_enabled** **(** **)**
- If ``true``, the native virtual keyboard is shown when focused on platforms that support it.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_property_wrap_mode:
- .. rst-class:: classref-property
- :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` **wrap_mode** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_line_wrapping_mode** **(** :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` value **)**
- - :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` **get_line_wrapping_mode** **(** **)**
- Sets the line wrapping mode to use.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_TextEdit_private_method__backspace:
- .. rst-class:: classref-method
- void **_backspace** **(** :ref:`int<class_int>` caret_index **)** |virtual|
- Override this method to define what happens when the user presses the backspace key.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_private_method__copy:
- .. rst-class:: classref-method
- void **_copy** **(** :ref:`int<class_int>` caret_index **)** |virtual|
- Override this method to define what happens when the user performs a copy operation.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_private_method__cut:
- .. rst-class:: classref-method
- void **_cut** **(** :ref:`int<class_int>` caret_index **)** |virtual|
- Override this method to define what happens when the user performs a cut operation.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_private_method__handle_unicode_input:
- .. rst-class:: classref-method
- void **_handle_unicode_input** **(** :ref:`int<class_int>` unicode_char, :ref:`int<class_int>` caret_index **)** |virtual|
- Override this method to define what happens when the user types in the provided key ``unicode_char``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_private_method__paste:
- .. rst-class:: classref-method
- void **_paste** **(** :ref:`int<class_int>` caret_index **)** |virtual|
- Override this method to define what happens when the user performs a paste operation.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_private_method__paste_primary_clipboard:
- .. rst-class:: classref-method
- void **_paste_primary_clipboard** **(** :ref:`int<class_int>` caret_index **)** |virtual|
- Override this method to define what happens when the user performs a paste operation with middle mouse button.
- \ **Note:** This method is only implemented on Linux.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_add_caret:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **add_caret** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` col **)**
- Adds a new caret at the given location. Returns the index of the new caret, or ``-1`` if the location is invalid.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_add_caret_at_carets:
- .. rst-class:: classref-method
- void **add_caret_at_carets** **(** :ref:`bool<class_bool>` below **)**
- Adds an additional caret above or below every caret. If ``below`` is true the new caret will be added below and above otherwise.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_add_gutter:
- .. rst-class:: classref-method
- void **add_gutter** **(** :ref:`int<class_int>` at=-1 **)**
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_add_selection_for_next_occurrence:
- .. rst-class:: classref-method
- void **add_selection_for_next_occurrence** **(** **)**
- Adds a selection and a caret for the next occurrence of the current selection. If there is no active selection, selects word under caret.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_adjust_carets_after_edit:
- .. rst-class:: classref-method
- void **adjust_carets_after_edit** **(** :ref:`int<class_int>` caret, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_col, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_col **)**
- Reposition the carets affected by the edit. This assumes edits are applied in edit order, see :ref:`get_caret_index_edit_order<class_TextEdit_method_get_caret_index_edit_order>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_adjust_viewport_to_caret:
- .. rst-class:: classref-method
- void **adjust_viewport_to_caret** **(** :ref:`int<class_int>` caret_index=0 **)**
- Adjust the viewport so the caret is visible.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_backspace:
- .. rst-class:: classref-method
- void **backspace** **(** :ref:`int<class_int>` caret_index=-1 **)**
- Called when the user presses the backspace key. Can be overridden with :ref:`_backspace<class_TextEdit_private_method__backspace>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_begin_complex_operation:
- .. rst-class:: classref-method
- void **begin_complex_operation** **(** **)**
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_center_viewport_to_caret:
- .. rst-class:: classref-method
- void **center_viewport_to_caret** **(** :ref:`int<class_int>` caret_index=0 **)**
- 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``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_clear:
- .. rst-class:: classref-method
- void **clear** **(** **)**
- Performs a full reset of **TextEdit**, including undo history.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_clear_undo_history:
- .. rst-class:: classref-method
- void **clear_undo_history** **(** **)**
- Clears the undo history.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_copy:
- .. rst-class:: classref-method
- void **copy** **(** :ref:`int<class_int>` caret_index=-1 **)**
- Copies the current text selection. Can be overridden with :ref:`_copy<class_TextEdit_private_method__copy>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_cut:
- .. rst-class:: classref-method
- void **cut** **(** :ref:`int<class_int>` caret_index=-1 **)**
- Cut's the current selection. Can be overridden with :ref:`_cut<class_TextEdit_private_method__cut>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_delete_selection:
- .. rst-class:: classref-method
- void **delete_selection** **(** :ref:`int<class_int>` caret_index=-1 **)**
- Deletes the selected text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_deselect:
- .. rst-class:: classref-method
- void **deselect** **(** :ref:`int<class_int>` caret_index=-1 **)**
- Deselects the current selection.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_end_action:
- .. rst-class:: classref-method
- void **end_action** **(** **)**
- Marks the end of steps in the current action started with :ref:`start_action<class_TextEdit_method_start_action>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_end_complex_operation:
- .. rst-class:: classref-method
- void **end_complex_operation** **(** **)**
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_caret_column:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_caret_column** **(** :ref:`int<class_int>` caret_index=0 **)** |const|
- Returns the column the editing caret is at.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_caret_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_caret_count** **(** **)** |const|
- Returns the number of carets in this **TextEdit**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_caret_draw_pos:
- .. rst-class:: classref-method
- :ref:`Vector2<class_Vector2>` **get_caret_draw_pos** **(** :ref:`int<class_int>` caret_index=0 **)** |const|
- Returns the caret pixel draw position.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_caret_index_edit_order:
- .. rst-class:: classref-method
- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_caret_index_edit_order** **(** **)**
- Returns a list of caret indexes in their edit order, this done from bottom to top. Edit order refers to the way actions such as :ref:`insert_text_at_caret<class_TextEdit_method_insert_text_at_caret>` are applied.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_caret_line:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_caret_line** **(** :ref:`int<class_int>` caret_index=0 **)** |const|
- Returns the line the editing caret is on.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_caret_wrap_index:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_caret_wrap_index** **(** :ref:`int<class_int>` caret_index=0 **)** |const|
- Returns the wrap index the editing caret is on.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_first_non_whitespace_column:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_first_non_whitespace_column** **(** :ref:`int<class_int>` line **)** |const|
- Returns the first column containing a non-whitespace character.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_first_visible_line:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_first_visible_line** **(** **)** |const|
- Returns the first visible line.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_gutter_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_gutter_count** **(** **)** |const|
- Returns the number of gutters registered.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_gutter_name:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_gutter_name** **(** :ref:`int<class_int>` gutter **)** |const|
- Returns the name of the gutter at the given index.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_gutter_type:
- .. rst-class:: classref-method
- :ref:`GutterType<enum_TextEdit_GutterType>` **get_gutter_type** **(** :ref:`int<class_int>` gutter **)** |const|
- Returns the type of the gutter at the given index.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_gutter_width:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_gutter_width** **(** :ref:`int<class_int>` gutter **)** |const|
- Returns the width of the gutter at the given index.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_h_scroll_bar:
- .. rst-class:: classref-method
- :ref:`HScrollBar<class_HScrollBar>` **get_h_scroll_bar** **(** **)** |const|
- Returns the :ref:`HScrollBar<class_HScrollBar>` used by **TextEdit**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_indent_level:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_indent_level** **(** :ref:`int<class_int>` line **)** |const|
- Returns the number of spaces and ``tab * tab_size`` before the first char.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_last_full_visible_line:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_last_full_visible_line** **(** **)** |const|
- Returns 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_last_full_visible_line_wrap_index:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_last_full_visible_line_wrap_index** **(** **)** |const|
- Returns the last visible wrap index of the last visible line.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_last_unhidden_line:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_last_unhidden_line** **(** **)** |const|
- Returns the last unhidden line in the entire **TextEdit**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_line** **(** :ref:`int<class_int>` line **)** |const|
- Returns the text of a specific line.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_background_color:
- .. rst-class:: classref-method
- :ref:`Color<class_Color>` **get_line_background_color** **(** :ref:`int<class_int>` line **)** |const|
- Returns the current background color of the line. ``Color(0, 0, 0, 0)`` is returned if no color is set.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_column_at_pos:
- .. rst-class:: classref-method
- :ref:`Vector2i<class_Vector2i>` **get_line_column_at_pos** **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`bool<class_bool>` allow_out_of_bounds=true **)** |const|
- 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``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_line_count** **(** **)** |const|
- Returns the number of lines in the text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_gutter_icon:
- .. rst-class:: classref-method
- :ref:`Texture2D<class_Texture2D>` **get_line_gutter_icon** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const|
- Returns the icon currently in ``gutter`` at ``line``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_gutter_item_color:
- .. rst-class:: classref-method
- :ref:`Color<class_Color>` **get_line_gutter_item_color** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const|
- Returns the color currently in ``gutter`` at ``line``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_gutter_metadata:
- .. rst-class:: classref-method
- :ref:`Variant<class_Variant>` **get_line_gutter_metadata** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const|
- Returns the metadata currently in ``gutter`` at ``line``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_gutter_text:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_line_gutter_text** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const|
- Returns the text currently in ``gutter`` at ``line``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_height:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_line_height** **(** **)** |const|
- Returns the maximum value of the line height among all lines.
- \ **Note:** The return value is influenced by :ref:`line_spacing<class_TextEdit_theme_constant_line_spacing>` and :ref:`font_size<class_TextEdit_theme_font_size_font_size>`. And it will not be less than ``1``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_width:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_line_width** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=-1 **)** |const|
- Returns the width in pixels of the ``wrap_index`` on ``line``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_wrap_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_line_wrap_count** **(** :ref:`int<class_int>` line **)** |const|
- Returns the number of times the given line is wrapped.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_wrap_index_at_column:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_line_wrap_index_at_column** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const|
- Returns the wrap index of the given line column.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_line_wrapped_text:
- .. rst-class:: classref-method
- :ref:`PackedStringArray<class_PackedStringArray>` **get_line_wrapped_text** **(** :ref:`int<class_int>` line **)** |const|
- Returns an array of :ref:`String<class_String>`\ s representing each wrapped index.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_local_mouse_pos:
- .. rst-class:: classref-method
- :ref:`Vector2<class_Vector2>` **get_local_mouse_pos** **(** **)** |const|
- Returns the local mouse position adjusted for the text direction.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_menu:
- .. rst-class:: classref-method
- :ref:`PopupMenu<class_PopupMenu>` **get_menu** **(** **)** |const|
- Returns the :ref:`PopupMenu<class_PopupMenu>` of this **TextEdit**. By default, this menu is displayed when right-clicking on the **TextEdit**.
- You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see :ref:`MenuItems<enum_TextEdit_MenuItems>`). For example:
- .. tabs::
- .. code-tab:: gdscript
- func _ready():
- var menu = get_menu()
- # Remove all items after "Redo".
- menu.item_count = menu.get_item_index(MENU_REDO) + 1
- # Add custom items.
- menu.add_separator()
- menu.add_item("Insert Date", MENU_MAX + 1)
- # Connect callback.
- menu.id_pressed.connect(_on_item_pressed)
-
- func _on_item_pressed(id):
- if id == MENU_MAX + 1:
- insert_text_at_caret(Time.get_date_string_from_system())
- .. code-tab:: csharp
- public override void _Ready()
- {
- var menu = GetMenu();
- // Remove all items after "Redo".
- menu.ItemCount = menu.GetItemIndex(TextEdit.MenuItems.Redo) + 1;
- // Add custom items.
- menu.AddSeparator();
- menu.AddItem("Insert Date", TextEdit.MenuItems.Max + 1);
- // Add event handler.
- menu.IdPressed += OnItemPressed;
- }
-
- public void OnItemPressed(int id)
- {
- if (id == TextEdit.MenuItems.Max + 1)
- {
- InsertTextAtCaret(Time.GetDateStringFromSystem());
- }
- }
- \ **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_minimap_line_at_pos:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_minimap_line_at_pos** **(** :ref:`Vector2i<class_Vector2i>` position **)** |const|
- Returns the equivalent minimap line at ``position``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_minimap_visible_lines:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_minimap_visible_lines** **(** **)** |const|
- Returns the number of lines that may be drawn on the minimap.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_next_visible_line_index_offset_from:
- .. rst-class:: classref-method
- :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|
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_next_visible_line_offset_from:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_next_visible_line_offset_from** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` visible_amount **)** |const|
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_pos_at_line_column:
- .. rst-class:: classref-method
- :ref:`Vector2i<class_Vector2i>` **get_pos_at_line_column** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const|
- Returns the local position for the given ``line`` and ``column``. If ``x`` or ``y`` of the returned vector equal ``-1``, the position is outside of the viewable area of the control.
- \ **Note:** The Y position corresponds to the bottom side of the line. Use :ref:`get_rect_at_line_column<class_TextEdit_method_get_rect_at_line_column>` to get the top side position.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_rect_at_line_column:
- .. rst-class:: classref-method
- :ref:`Rect2i<class_Rect2i>` **get_rect_at_line_column** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const|
- Returns the local position and size for the grapheme at the given ``line`` and ``column``. If ``x`` or ``y`` position of the returned rect equal ``-1``, the position is outside of the viewable area of the control.
- \ **Note:** The Y position of the returned rect corresponds to the top side of the line, unlike :ref:`get_pos_at_line_column<class_TextEdit_method_get_pos_at_line_column>` which returns the bottom side.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_saved_version:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_saved_version** **(** **)** |const|
- Returns the last tagged saved version from :ref:`tag_saved_version<class_TextEdit_method_tag_saved_version>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_scroll_pos_for_line:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **get_scroll_pos_for_line** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** |const|
- Returns the scroll position for ``wrap_index`` of ``line``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_selected_text:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_selected_text** **(** :ref:`int<class_int>` caret_index=-1 **)**
- Returns the text inside the selection of a caret, or all the carets if ``caret_index`` is its default value ``-1``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_selection_column:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_selection_column** **(** :ref:`int<class_int>` caret_index=0 **)** |const|
- Returns the original start column of the selection.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_selection_from_column:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_selection_from_column** **(** :ref:`int<class_int>` caret_index=0 **)** |const|
- Returns the selection begin column.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_selection_from_line:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_selection_from_line** **(** :ref:`int<class_int>` caret_index=0 **)** |const|
- Returns the selection begin line.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_selection_line:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_selection_line** **(** :ref:`int<class_int>` caret_index=0 **)** |const|
- Returns the original start line of the selection.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_selection_mode:
- .. rst-class:: classref-method
- :ref:`SelectionMode<enum_TextEdit_SelectionMode>` **get_selection_mode** **(** **)** |const|
- Returns the current selection mode.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_selection_to_column:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_selection_to_column** **(** :ref:`int<class_int>` caret_index=0 **)** |const|
- Returns the selection end column.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_selection_to_line:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_selection_to_line** **(** :ref:`int<class_int>` caret_index=0 **)** |const|
- Returns the selection end line.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_tab_size:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_tab_size** **(** **)** |const|
- Returns the **TextEdit**'s' tab size.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_total_gutter_width:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_total_gutter_width** **(** **)** |const|
- Returns the total width of all gutters and internal padding.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_total_visible_line_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_total_visible_line_count** **(** **)** |const|
- Returns the number of lines that may be drawn.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_v_scroll_bar:
- .. rst-class:: classref-method
- :ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar** **(** **)** |const|
- Returns the :ref:`VScrollBar<class_VScrollBar>` of the **TextEdit**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_version:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_version** **(** **)** |const|
- Returns the current version of the **TextEdit**. The version is a count of recorded operations by the undo/redo history.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_visible_line_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_visible_line_count** **(** **)** |const|
- Returns the number of visible lines, including wrapped text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_visible_line_count_in_range:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_visible_line_count_in_range** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** |const|
- Returns the total number of visible + wrapped lines between the two lines.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_word_at_pos:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_word_at_pos** **(** :ref:`Vector2<class_Vector2>` position **)** |const|
- Returns the word at ``position``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_get_word_under_caret:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_word_under_caret** **(** :ref:`int<class_int>` caret_index=-1 **)** |const|
- Returns a :ref:`String<class_String>` text with the word under the caret's location.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_has_ime_text:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_ime_text** **(** **)** |const|
- Returns if the user has IME text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_has_redo:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_redo** **(** **)** |const|
- Returns ``true`` if a "redo" action is available.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_has_selection:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_selection** **(** :ref:`int<class_int>` caret_index=-1 **)** |const|
- Returns ``true`` if the user has selected text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_has_undo:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_undo** **(** **)** |const|
- Returns ``true`` if an "undo" action is available.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_insert_line_at:
- .. rst-class:: classref-method
- void **insert_line_at** **(** :ref:`int<class_int>` line, :ref:`String<class_String>` text **)**
- Inserts a new line with ``text`` at ``line``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_insert_text_at_caret:
- .. rst-class:: classref-method
- void **insert_text_at_caret** **(** :ref:`String<class_String>` text, :ref:`int<class_int>` caret_index=-1 **)**
- Insert the specified text at the caret position.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_is_caret_visible:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_caret_visible** **(** :ref:`int<class_int>` caret_index=0 **)** |const|
- Returns ``true`` if the caret is visible on the screen.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_is_dragging_cursor:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_dragging_cursor** **(** **)** |const|
- Returns ``true`` if the user is dragging their mouse for scrolling or selecting.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_is_gutter_clickable:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_gutter_clickable** **(** :ref:`int<class_int>` gutter **)** |const|
- Returns whether the gutter is clickable.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_is_gutter_drawn:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_gutter_drawn** **(** :ref:`int<class_int>` gutter **)** |const|
- Returns whether the gutter is currently drawn.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_is_gutter_overwritable:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_gutter_overwritable** **(** :ref:`int<class_int>` gutter **)** |const|
- Returns whether the gutter is overwritable.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_is_line_gutter_clickable:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_line_gutter_clickable** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const|
- Returns whether the gutter on the given line is clickable.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_is_line_wrapped:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_line_wrapped** **(** :ref:`int<class_int>` line **)** |const|
- Returns if the given line is wrapped.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_is_menu_visible:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_menu_visible** **(** **)** |const|
- Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_is_mouse_over_selection:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_mouse_over_selection** **(** :ref:`bool<class_bool>` edges, :ref:`int<class_int>` caret_index=-1 **)** |const|
- Returns whether the mouse is over selection. If ``edges`` is ``true``, the edges are considered part of the selection.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_is_overtype_mode_enabled:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_overtype_mode_enabled** **(** **)** |const|
- Returns whether the user is in overtype mode.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_menu_option:
- .. rst-class:: classref-method
- void **menu_option** **(** :ref:`int<class_int>` option **)**
- Executes a given action as defined in the :ref:`MenuItems<enum_TextEdit_MenuItems>` enum.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_merge_gutters:
- .. rst-class:: classref-method
- void **merge_gutters** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)**
- Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters will be copied.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_merge_overlapping_carets:
- .. rst-class:: classref-method
- void **merge_overlapping_carets** **(** **)**
- Merges any overlapping carets. Will favor the newest caret, or the caret with a selection.
- \ **Note:** This is not called when a caret changes position but after certain actions, so it is possible to get into a state where carets overlap.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_paste:
- .. rst-class:: classref-method
- void **paste** **(** :ref:`int<class_int>` caret_index=-1 **)**
- Paste at the current location. Can be overridden with :ref:`_paste<class_TextEdit_private_method__paste>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_paste_primary_clipboard:
- .. rst-class:: classref-method
- void **paste_primary_clipboard** **(** :ref:`int<class_int>` caret_index=-1 **)**
- Pastes the primary clipboard.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_redo:
- .. rst-class:: classref-method
- void **redo** **(** **)**
- Perform redo operation.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_remove_caret:
- .. rst-class:: classref-method
- void **remove_caret** **(** :ref:`int<class_int>` caret **)**
- Removes the given caret index.
- \ **Note:** This can result in adjustment of all other caret indices.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_remove_gutter:
- .. rst-class:: classref-method
- void **remove_gutter** **(** :ref:`int<class_int>` gutter **)**
- Removes the gutter from this **TextEdit**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_remove_secondary_carets:
- .. rst-class:: classref-method
- void **remove_secondary_carets** **(** **)**
- Removes all additional carets.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_remove_text:
- .. rst-class:: classref-method
- 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 **)**
- Removes text between the given positions.
- \ **Note:** This does not adjust the caret or selection, which as a result it can end up in an invalid position.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_search:
- .. rst-class:: classref-method
- :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|
- Perform a search inside the text. Search flags can be specified in the :ref:`SearchFlags<enum_TextEdit_SearchFlags>` enum.
- In the returned vector, ``x`` is the column, ``y`` is the line. If no results are found, both are equal to ``-1``.
- .. tabs::
- .. code-tab:: gdscript
- var result = search("print", SEARCH_WHOLE_WORDS, 0, 0)
- if result.x != -1:
- # Result found.
- var line_number = result.y
- var column_number = result.x
- .. code-tab:: csharp
- Vector2I result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0);
- if (result.X != -1)
- {
- // Result found.
- int lineNumber = result.Y;
- int columnNumber = result.X;
- }
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_select:
- .. rst-class:: classref-method
- 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, :ref:`int<class_int>` caret_index=0 **)**
- Perform selection, from line/column to line/column.
- If :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` is ``false``, no selection will occur.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_select_all:
- .. rst-class:: classref-method
- void **select_all** **(** **)**
- Select all the text.
- If :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` is ``false``, no selection will occur.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_select_word_under_caret:
- .. rst-class:: classref-method
- void **select_word_under_caret** **(** :ref:`int<class_int>` caret_index=-1 **)**
- Selects the word under the caret.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_caret_column:
- .. rst-class:: classref-method
- void **set_caret_column** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` adjust_viewport=true, :ref:`int<class_int>` caret_index=0 **)**
- Moves the caret to the specified ``column`` index.
- If ``adjust_viewport`` is ``true``, the viewport will center at the caret position after the move occurs.
- \ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets<class_TextEdit_method_merge_overlapping_carets>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_caret_line:
- .. rst-class:: classref-method
- 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, :ref:`int<class_int>` caret_index=0 **)**
- Moves the caret to the specified ``line`` index.
- If ``adjust_viewport`` is ``true``, the viewport will center at the caret position after the move occurs.
- If ``can_be_hidden`` is ``true``, the specified ``line`` can be hidden.
- \ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets<class_TextEdit_method_merge_overlapping_carets>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_gutter_clickable:
- .. rst-class:: classref-method
- void **set_gutter_clickable** **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` clickable **)**
- Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_gutter_custom_draw:
- .. rst-class:: classref-method
- void **set_gutter_custom_draw** **(** :ref:`int<class_int>` column, :ref:`Callable<class_Callable>` draw_callback **)**
- Set a custom draw method for the gutter. The callback method must take the following args: ``line: int, gutter: int, Area: Rect2``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_gutter_draw:
- .. rst-class:: classref-method
- void **set_gutter_draw** **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` draw **)**
- Sets whether the gutter should be drawn.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_gutter_name:
- .. rst-class:: classref-method
- void **set_gutter_name** **(** :ref:`int<class_int>` gutter, :ref:`String<class_String>` name **)**
- Sets the name of the gutter.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_gutter_overwritable:
- .. rst-class:: classref-method
- void **set_gutter_overwritable** **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` overwritable **)**
- Sets the gutter to overwritable. See :ref:`merge_gutters<class_TextEdit_method_merge_gutters>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_gutter_type:
- .. rst-class:: classref-method
- void **set_gutter_type** **(** :ref:`int<class_int>` gutter, :ref:`GutterType<enum_TextEdit_GutterType>` type **)**
- Sets the type of gutter.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_gutter_width:
- .. rst-class:: classref-method
- void **set_gutter_width** **(** :ref:`int<class_int>` gutter, :ref:`int<class_int>` width **)**
- Set the width of the gutter.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_line:
- .. rst-class:: classref-method
- void **set_line** **(** :ref:`int<class_int>` line, :ref:`String<class_String>` new_text **)**
- Sets the text for a specific line.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_line_as_center_visible:
- .. rst-class:: classref-method
- void **set_line_as_center_visible** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)**
- Positions the ``wrap_index`` of ``line`` at the center of the viewport.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_line_as_first_visible:
- .. rst-class:: classref-method
- void **set_line_as_first_visible** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)**
- Positions the ``wrap_index`` of ``line`` at the top of the viewport.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_line_as_last_visible:
- .. rst-class:: classref-method
- void **set_line_as_last_visible** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)**
- Positions the ``wrap_index`` of ``line`` at the bottom of the viewport.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_line_background_color:
- .. rst-class:: classref-method
- void **set_line_background_color** **(** :ref:`int<class_int>` line, :ref:`Color<class_Color>` color **)**
- Sets the current background color of the line. Set to ``Color(0, 0, 0, 0)`` for no color.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_line_gutter_clickable:
- .. rst-class:: classref-method
- void **set_line_gutter_clickable** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` clickable **)**
- If ``clickable`` is ``true``, makes the ``gutter`` on ``line`` clickable. See :ref:`gutter_clicked<class_TextEdit_signal_gutter_clicked>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_line_gutter_icon:
- .. rst-class:: classref-method
- void **set_line_gutter_icon** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Texture2D<class_Texture2D>` icon **)**
- Sets the icon for ``gutter`` on ``line`` to ``icon``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_line_gutter_item_color:
- .. rst-class:: classref-method
- void **set_line_gutter_item_color** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Color<class_Color>` color **)**
- Sets the color for ``gutter`` on ``line`` to ``color``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_line_gutter_metadata:
- .. rst-class:: classref-method
- void **set_line_gutter_metadata** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Variant<class_Variant>` metadata **)**
- Sets the metadata for ``gutter`` on ``line`` to ``metadata``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_line_gutter_text:
- .. rst-class:: classref-method
- void **set_line_gutter_text** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`String<class_String>` text **)**
- Sets the text for ``gutter`` on ``line`` to ``text``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_overtype_mode_enabled:
- .. rst-class:: classref-method
- void **set_overtype_mode_enabled** **(** :ref:`bool<class_bool>` enabled **)**
- If ``true``, sets the user into overtype mode. When the user types in this mode, it will override existing text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_search_flags:
- .. rst-class:: classref-method
- void **set_search_flags** **(** :ref:`int<class_int>` flags **)**
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_search_text:
- .. rst-class:: classref-method
- void **set_search_text** **(** :ref:`String<class_String>` search_text **)**
- Sets the search text. See :ref:`set_search_flags<class_TextEdit_method_set_search_flags>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_selection_mode:
- .. rst-class:: classref-method
- void **set_selection_mode** **(** :ref:`SelectionMode<enum_TextEdit_SelectionMode>` mode, :ref:`int<class_int>` line=-1, :ref:`int<class_int>` column=-1, :ref:`int<class_int>` caret_index=0 **)**
- Sets the current selection mode.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_tab_size:
- .. rst-class:: classref-method
- void **set_tab_size** **(** :ref:`int<class_int>` size **)**
- Sets the tab size for the **TextEdit** to use.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_set_tooltip_request_func:
- .. rst-class:: classref-method
- void **set_tooltip_request_func** **(** :ref:`Callable<class_Callable>` callback **)**
- Provide custom tooltip text. The callback method must take the following args: ``hovered_word: String``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_start_action:
- .. rst-class:: classref-method
- void **start_action** **(** :ref:`EditAction<enum_TextEdit_EditAction>` action **)**
- Starts an action, will end the current action if ``action`` is different.
- An action will also end after a call to :ref:`end_action<class_TextEdit_method_end_action>`, after :ref:`ProjectSettings.gui/timers/text_edit_idle_detect_sec<class_ProjectSettings_property_gui/timers/text_edit_idle_detect_sec>` is triggered or a new undoable step outside the :ref:`start_action<class_TextEdit_method_start_action>` and :ref:`end_action<class_TextEdit_method_end_action>` calls.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_swap_lines:
- .. rst-class:: classref-method
- void **swap_lines** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)**
- Swaps the two lines.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_tag_saved_version:
- .. rst-class:: classref-method
- void **tag_saved_version** **(** **)**
- Tag the current version as saved.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_method_undo:
- .. rst-class:: classref-method
- void **undo** **(** **)**
- Perform undo operation.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Theme Property Descriptions
- ---------------------------
- .. _class_TextEdit_theme_color_background_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **background_color** = ``Color(0, 0, 0, 0)``
- Sets the background :ref:`Color<class_Color>` of this **TextEdit**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_caret_background_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **caret_background_color** = ``Color(0, 0, 0, 1)``
- :ref:`Color<class_Color>` of the text behind the caret when using a block caret.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_caret_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **caret_color** = ``Color(0.875, 0.875, 0.875, 1)``
- :ref:`Color<class_Color>` of the caret. This can be set to a fully transparent color to hide the caret entirely.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_current_line_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **current_line_color** = ``Color(0.25, 0.25, 0.26, 0.8)``
- Background :ref:`Color<class_Color>` of the line containing the caret.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_font_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)``
- Sets the font :ref:`Color<class_Color>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_font_outline_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)``
- The tint of text outline of the **TextEdit**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_font_placeholder_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)``
- Font color for :ref:`placeholder_text<class_TextEdit_property_placeholder_text>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_font_readonly_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **font_readonly_color** = ``Color(0.875, 0.875, 0.875, 0.5)``
- Sets the font :ref:`Color<class_Color>` when :ref:`editable<class_TextEdit_property_editable>` is disabled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_font_selected_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **font_selected_color** = ``Color(0, 0, 0, 0)``
- Sets the :ref:`Color<class_Color>` of the selected text. If equal to ``Color(0, 0, 0, 0)``, it will be ignored.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_search_result_border_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **search_result_border_color** = ``Color(0.3, 0.3, 0.3, 0.4)``
- :ref:`Color<class_Color>` of the border around text that matches the search query.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_search_result_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **search_result_color** = ``Color(0.3, 0.3, 0.3, 1)``
- :ref:`Color<class_Color>` behind the text that matches the search query.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_selection_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **selection_color** = ``Color(0.5, 0.5, 0.5, 1)``
- Sets the highlight :ref:`Color<class_Color>` of text selections.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_color_word_highlighted_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **word_highlighted_color** = ``Color(0.5, 0.5, 0.5, 0.25)``
- Sets the highlight :ref:`Color<class_Color>` of multiple occurrences. :ref:`highlight_all_occurrences<class_TextEdit_property_highlight_all_occurrences>` has to be enabled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_constant_caret_width:
- .. rst-class:: classref-themeproperty
- :ref:`int<class_int>` **caret_width** = ``1``
- The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size. If set to ``0`` or lower, the caret width is automatically set to 1 pixel and multiplied by the display scaling factor.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_constant_line_spacing:
- .. rst-class:: classref-themeproperty
- :ref:`int<class_int>` **line_spacing** = ``4``
- Sets the spacing between the lines.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_constant_outline_size:
- .. rst-class:: classref-themeproperty
- :ref:`int<class_int>` **outline_size** = ``0``
- The size of the text outline.
- \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_TextEdit_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_font_font:
- .. rst-class:: classref-themeproperty
- :ref:`Font<class_Font>` **font**
- Sets the default :ref:`Font<class_Font>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_font_size_font_size:
- .. rst-class:: classref-themeproperty
- :ref:`int<class_int>` **font_size**
- Sets default font size.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_icon_space:
- .. rst-class:: classref-themeproperty
- :ref:`Texture2D<class_Texture2D>` **space**
- Sets a custom :ref:`Texture2D<class_Texture2D>` for space text characters.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_icon_tab:
- .. rst-class:: classref-themeproperty
- :ref:`Texture2D<class_Texture2D>` **tab**
- Sets a custom :ref:`Texture2D<class_Texture2D>` for tab text characters.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_style_focus:
- .. rst-class:: classref-themeproperty
- :ref:`StyleBox<class_StyleBox>` **focus**
- Sets the :ref:`StyleBox<class_StyleBox>` when in focus. The :ref:`focus<class_TextEdit_theme_style_focus>` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_style_normal:
- .. rst-class:: classref-themeproperty
- :ref:`StyleBox<class_StyleBox>` **normal**
- Sets the :ref:`StyleBox<class_StyleBox>` of this **TextEdit**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextEdit_theme_style_read_only:
- .. rst-class:: classref-themeproperty
- :ref:`StyleBox<class_StyleBox>` **read_only**
- Sets the :ref:`StyleBox<class_StyleBox>` of this **TextEdit** when :ref:`editable<class_TextEdit_property_editable>` is disabled.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|