From e60900a35395f0aa97d01383e2095c4e50faa500 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Thu, 8 Jul 2021 16:48:58 +0100 Subject: Make TextEdit cut, copy and paste overridable --- doc/classes/TextEdit.xml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 7b34b3c461..855f19852f 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -13,13 +13,35 @@ - A virtual method that is called whenever backspace is triggered. + Overide this method to define what happens when the user presses the backspace key. + + + + + + + Overide this method to define what happens when the user performs a copy. + + + + + + + Overide this method to define what happens when the user perfroms a cut. + Overide this method to define what happens when the types in the provided key [code]unicode[/code]. + + + + + + + Overide this method to define what happens when the user perfroms a paste. @@ -31,7 +53,7 @@ - Causes the [TextEdit] to perform a backspace. + Called when the user presses the backspace key. Can be overriden with [method _backspace]. @@ -55,7 +77,7 @@ - Copy's the current text selection. + Copy's the current text selection. Can be overriden with [method _copy]. @@ -94,7 +116,7 @@ - Cut's the current selection. + Cut's the current selection. Can be overriden with [method _cut]. @@ -351,7 +373,7 @@ - Paste the current selection. + Paste the current selection. Can be overriden with [method _paste]. -- cgit v1.2.3 From d5dcaee4c5b41faca64f02888b152f7f05c4a20b Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Thu, 8 Jul 2021 18:35:56 +0100 Subject: Cleanup and rename caret operations --- doc/classes/TextEdit.xml | 142 ++++++++++++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 56 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 855f19852f..00e15f9f2a 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -56,8 +56,9 @@ Called when the user presses the backspace key. Can be overriden with [method _backspace]. - - + + + Centers the viewport on the line the editing cursor is at. This also resets the [member scroll_horizontal] value to [code]0[/code]. @@ -80,60 +81,52 @@ Copy's the current text selection. Can be overriden with [method _copy]. - - - - Returns the column the editing cursor is at. - - - - + + + - Returns the line the editing cursor is at. + Cut's the current selection. Can be overriden with [method _cut]. - - - - + + + - Moves the cursor at the specified [code]column[/code] index. - If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs. - - - - - - + + + - Moves the cursor at the specified [code]line[/code] index. - If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs. - If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden. + Deselects the current selection. - - + + + - Cut's the current selection. Can be overriden with [method _cut]. + Returns the column the editing caret is at. - - + + + + Gets the caret pixel draw poistion. - - + + + - Deselects the current selection. + Returns the line the editing caret is on. - - + + + - Gets the caret pixel draw position. + Returns the wrap index the editing caret is on. @@ -295,17 +288,20 @@ Returns the number of visible lines, including wrapped text. - - + + + - Returns a [String] text with the word under the caret (text cursor) location. + Returns a [String] text with the word under the caret location. - - - + + + + + - Insert the specified text at the cursor position. + Insert the specified text at the caret position. @@ -435,6 +431,35 @@ If [member selecting_enabled] is [code]false[/code], no selection will occur. + + + + + + + + + Moves the caret to the specified [code]column[/code] index. + If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the caret position after the move occurs. + + + + + + + + + + + + + + + Moves the caret to the specified [code]line[/code] index. + If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the caret position after the move occurs. + If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden. + + @@ -572,24 +597,23 @@ - - If [code]true[/code], the caret (visual cursor) blinks. + + Sets if the caret should blink. - + Duration (in seconds) of a caret's blinking cycle. - - If [code]true[/code], the caret displays as a rectangle. - If [code]false[/code], the caret displays as a bar. - - + Allow moving caret, selecting and removing the individual composite character components. Note: [kbd]Backspace[/kbd] is always removing individual composite character components. - - If [code]true[/code], a right-click moves the cursor at the mouse position before displaying the context menu. + + If [code]true[/code], a right-click moves the caret at the mouse position before displaying the context menu. If [code]false[/code], the context menu disregards mouse location. + + Set the type of caret to draw. + If [code]true[/code], a right-click displays the context menu. @@ -667,9 +691,9 @@ - + - Emitted when the cursor changes. + Emitted when the caret changes position. @@ -708,6 +732,12 @@ Search from end to beginning. + + Vertical line caret. + + + Block caret. + -- cgit v1.2.3 From 7e70f9e0b9696fab55e2d0570c6bdc8b07c14462 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Fri, 9 Jul 2021 11:52:49 +0100 Subject: Expose and cleanup TextEdit line wrap API --- doc/classes/TextEdit.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 00e15f9f2a..ce25c8c7f4 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -213,6 +213,35 @@ + + + + + + + Returns the number of the time given line is wrapped. + + + + + + + + + + + Returns the wrap index of the given line column. + + + + + + + + + Returns an array of [String] repersenting each wrapped index. + + @@ -346,6 +375,15 @@ Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided). + + + + + + + Returns if the given line is wrapped. + + @@ -686,8 +724,8 @@ If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it. - - If [code]true[/code], enables text wrapping when it goes beyond the edge of what is visible. + + Sets the line wrapping mode to use. @@ -748,6 +786,12 @@ + + Line wrapping is disabled. + + + Line wrapping occurs at the control boundary, beyond what would normally be visible. + -- cgit v1.2.3 From 9ec3e7f3d7ae7f9eaf5a1de29346c5e10b3af6f9 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Fri, 9 Jul 2021 12:42:55 +0100 Subject: Cleanup TextEdit selection methods --- doc/classes/TextEdit.xml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index ce25c8c7f4..088072b411 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -324,6 +324,13 @@ Returns a [String] text with the word under the caret location. + + + + + Returns [code]true[/code] if the user is has a selection. + + @@ -384,12 +391,6 @@ Returns if the given line is wrapped. - - - - Returns [code]true[/code] if the selection is active. - - @@ -469,6 +470,13 @@ If [member selecting_enabled] is [code]false[/code], no selection will occur. + + + + + Selects the word under the caret. + + -- cgit v1.2.3 From b799e5583acd40f62603305c8a6b2fb31dfca9e3 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Fri, 9 Jul 2021 13:40:05 +0100 Subject: Rename insert mode to overtype mode --- doc/classes/TextEdit.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc/classes') diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 088072b411..7bf8520c1c 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -391,6 +391,13 @@ Returns if the given line is wrapped. + + + + + Gets if the user is in overtype mode. + + @@ -620,6 +627,15 @@ Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. + + + + + + + If [code]True[/code] set the user into overtype mode. When the user types it will override existing text. + + -- cgit v1.2.3 From 7dbb0f32333a2bb2c856e17cc1cc69a91fbf1fa3 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Fri, 9 Jul 2021 14:05:52 +0100 Subject: Rename readonly to editable --- doc/classes/TextEdit.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 7bf8520c1c..00c4c170db 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -688,6 +688,9 @@ If [code]true[/code], the "tab" character will have a visible representation. + + If [code]false[/code], existing text cannot be modified and new text cannot be added. + If [code]true[/code], all occurrences of the selected text will be highlighted. @@ -708,9 +711,6 @@ If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text. - - If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. - If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels. -- cgit v1.2.3 From 0a32a6907b4c6801e0b9d22057863c01fd25a3cd Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Fri, 9 Jul 2021 17:27:09 +0100 Subject: Cleanup and expose viewport / scrolling methods --- doc/classes/TextEdit.xml | 102 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 96 insertions(+), 6 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 00c4c170db..c89748f323 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -50,6 +50,13 @@ + + + + + Adjust the viewport so the caret is visible. + + @@ -135,6 +142,13 @@ + + + + + Returns the first visible line. + + @@ -165,6 +179,20 @@ Returns the indent level of a specific line. + + + + + Return the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index. + + + + + + + Returns the last visible wrap index of the last visible line. + + @@ -248,6 +276,13 @@ Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit]. + + + + + Gets the total amount of lines that can be draw on the minimap. + + @@ -255,6 +290,24 @@ Returns OpenType feature [code]tag[/code]. + + + + + + + + + Gets the scroll position for [code]wrap_index[/code] of [code]line[/code]. + + + + + + + Returns the text inside the selection. + + @@ -282,12 +335,6 @@ - - - - Returns the text inside the selection. - - @@ -311,6 +358,13 @@ + + + + + Gets the total amount of lines that could be draw. + + @@ -571,6 +625,39 @@ Sets the text for a specific line. + + + + + + + + + Positions the [code]wrap_index[/code] of [code]line[/code] at the center of the viewport. + + + + + + + + + + + Positions the [code]wrap_index[/code] of [code]line[/code] at the top of the viewport. + + + + + + + + + + + Positions the [code]wrap_index[/code] of [code]line[/code] at the bottom of the viewport. + + @@ -714,6 +801,9 @@ If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels. + + Allow scrolling past the last line into "virtual" space. + If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line. -- cgit v1.2.3 From a4606c2806c37d166dd57a87f70298d91a6d072b Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sat, 10 Jul 2021 14:01:25 +0100 Subject: Cleanup and complete TextEdit inspector and docs --- doc/classes/CodeEdit.xml | 4 +- doc/classes/TextEdit.xml | 543 ++++++++++++++++++++++++++++++----------------- 2 files changed, 348 insertions(+), 199 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index eb1dad14f2..47078330f3 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -645,7 +645,7 @@ The tint of text outline of the [CodeEdit]. - Sets the font [Color] when [member TextEdit.readonly] is enabled. + Sets the font [Color] when [member TextEdit.editable] is disabled. Sets the [Color] of the selected text. [member TextEdit.override_selected_font_color] has to be enabled. @@ -669,7 +669,7 @@ The size of the text outline. - Sets the [StyleBox] when [member TextEdit.readonly] is enabled. + Sets the [StyleBox] when [member TextEdit.editable] is disabled. Sets the highlight [Color] of text selections. diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index c89748f323..c31b7b953e 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -13,46 +13,43 @@ - Overide this method to define what happens when the user presses the backspace key. + Override this method to define what happens when the user presses the backspace key. - - + - Overide this method to define what happens when the user performs a copy. + Override this method to define what happens when the user performs a copy operation. - - + - Overide this method to define what happens when the user perfroms a cut. + Override this method to define what happens when the user performs a cut operation. - Overide this method to define what happens when the types in the provided key [code]unicode[/code]. + Override this method to define what happens when the types in the provided key [code]unicode[/code]. - - + - Overide this method to define what happens when the user perfroms a paste. + Override this method to define what happens when the user performs a paste operation. + Register a new gutter to this [TextEdit]. Use [code]at[/code] to have a specific gutter order. A value of [code]-1[/code] appends the gutter to the right. - - + Adjust the viewport so the caret is visible. @@ -60,14 +57,25 @@ - Called when the user presses the backspace key. Can be overriden with [method _backspace]. + Called when the user presses the backspace key. Can be overridden with [method _backspace]. + + + + + + Starts a multipart edit. All edits will be treated as one action until [method end_complex_operation] is called. - - + - Centers the viewport on the line the editing cursor is at. This also resets the [member scroll_horizontal] value to [code]0[/code]. + Centers the viewport on the line the editing caret is at. This also resets the [member scroll_horizontal] value to [code]0[/code]. + + + + + + Performs a full reset of [TextEdit], including undo history. @@ -85,53 +93,53 @@ - Copy's the current text selection. Can be overriden with [method _copy]. + Copies the current text selection. Can be overridden with [method _copy]. - - + - Cut's the current selection. Can be overriden with [method _cut]. + Cut's the current selection. Can be overridden with [method _cut]. - - + + Deletes the selected text. - - + Deselects the current selection. + + + + Ends a multipart edit, started with [method begin_complex_operation]. If called outside a complex operation, the current operation is pushed onto the undo/redo stack. + + - - + Returns the column the editing caret is at. - - + - Gets the caret pixel draw poistion. + Returns the caret pixel draw position. - - + Returns the line the editing caret is on. - - + Returns the wrap index the editing caret is on. @@ -140,11 +148,11 @@ + Returns the first column containing a non-whitespace character. - - + Returns the first visible line. @@ -152,47 +160,55 @@ + Returns the total amount of gutters registered. + Returns the name of the gutter at the given index. + Returns the type of the gutter at the given index. + Returns the width of the gutter at the given index. - Returns the indent level of a specific line. + Returns the amount of spaces and [code]tab * tab_size[/code] before the first char. - - + Return the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index. - - + Returns the last visible wrap index of the last visible line. + + + + Returns the last unhidden line in the entire [TextEdit]. + + @@ -200,13 +216,20 @@ Returns the text of a specific line. - + Returns the current background color of the line. [code]Color(0, 0, 0, 0)[/code] is returned if no color is set. + + + + + Returns the line and column at the given position. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. + + @@ -218,13 +241,15 @@ + Returns the icon currently in [code]gutter[/code] at [code]line[/code]. - + + Returns the color currently in [code]gutter[/code] at [code]line[/code]. @@ -232,6 +257,7 @@ + Returns the metadata currently in [code]gutter[/code] at [code]line[/code]. @@ -239,35 +265,49 @@ + Returns the text currently in [code]gutter[/code] at [code]line[/code]. + + + + + + Returns the height of a largest line. + + + + + + + + Returns the width in pixels of the [code]wrap_index[/code] on [code]line[/code]. - - - - + + - Returns the number of the time given line is wrapped. + Returns the number of times the given line is wrapped. - - - - - - + + + Returns the wrap index of the given line column. - - - - + + + + Returns an array of [String]s representing each wrapped index. + + + + - Returns an array of [String] repersenting each wrapped index. + Returns the local mouse position adjusted for the text direction. @@ -276,11 +316,34 @@ Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit]. + + + + + Returns the equivalent minimap line at [code]position[/code] + + - - + - Gets the total amount of lines that can be draw on the minimap. + Returns the total amount of lines that can be draw on the minimap. + + + + + + + + + Similar to [method get_next_visible_line_offset_from], but takes into account the line wrap indexes. In the returned vector, [code]x[/code] is the line, [code]y[/code] is the wrap index. + + + + + + + + Returns the count to the next visible line from [code]line[/code] to [code]line + visible_amount[/code]. Can also count backwards. For example if a [TextEdit] has 5 lines with lines 2 and 3 hidden, calling this with [code]line = 1, visible_amount = 1[/code] would return 3. @@ -290,27 +353,30 @@ Returns OpenType feature [code]tag[/code]. + + + + Returns the last tagged saved version from [method tag_saved_version] + + - - - - - - + + + - Gets the scroll position for [code]wrap_index[/code] of [code]line[/code]. + Returns the scroll position for [code]wrap_index[/code] of [code]line[/code]. - - + - Returns the text inside the selection. + Returns the text inside the selection. + Returns the original start column of the selection. @@ -328,11 +394,13 @@ + Returns the original start line of the selection. + Returns the current selection mode. @@ -356,13 +424,19 @@ + Returns the total width of all gutters and internal padding. - - + - Gets the total amount of lines that could be draw. + Returns the total amount of lines that could be draw. + + + + + + Returns the current version of the [TextEdit]. The version is a count of recorded operations by the undo/redo history. @@ -371,25 +445,42 @@ Returns the number of visible lines, including wrapped text. + + + + + Returns the word at [code]position[/code]. + + - - + + + Returns a [String] text with the word under the caret's location. + + + + - Returns a [String] text with the word under the caret location. + Returns if the user has IME text. - - + - Returns [code]true[/code] if the user is has a selection. + Returns [code]true[/code] if the user has selected text. + + + + + + + + Inserts a new line with [code]text[/code] at [code]line[/code]. - - - - + + Insert the specified text at the caret position. @@ -403,24 +494,28 @@ + Returns [code]true[/code] if the user is dragging their mouse for scrolling or selecting. + Returns whether the gutter is clickable. + Returns whether the gutter is currently drawn. + Returns whether the gutter is overwritable. @@ -428,28 +523,26 @@ + Returns whether the gutter on the given line is clickable. - + + - Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided). + Returns if the given line is wrapped. - - - - - + + - Returns if the given line is wrapped. + Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided). - - + - Gets if the user is in overtype mode. + Returns whether the user is in overtype mode. @@ -464,12 +557,13 @@ + Merge the gutters from [code]from_line[/code] into [code]to_line[/code]. Only overwritable gutters will be copied. - Paste the current selection. Can be overriden with [method _paste]. + Paste at the current location. Can be overridden with [method _paste]. @@ -482,32 +576,44 @@ + Removes the gutter from this [TextEdit]. + + + + + + + + + + Removes text between the given positions. + [b]Note:[/b]This does not adjust the caret or selection, which as a result it can end up in an invalid position. - - + + - + Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum. - Returns an empty [code]Dictionary[/code] if no result was found. Otherwise, returns a [code]Dictionary[/code] containing [code]line[/code] and [code]column[/code] entries, e.g: + In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If no results are found, both are equal to [code]-1[/code]. [codeblocks] [gdscript] var result = search("print", SEARCH_WHOLE_WORDS, 0, 0) - if !result.empty(): + if result.x != -1: # Result found. - var line_number = result.line - var column_number = result.column + var line_number = result.y + var column_number = result.x [/gdscript] [csharp] - int[] result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0); + Vector2i result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0); if (result.Length > 0) { // Result found. - int lineNumber = result[(int)TextEdit.SearchResult.Line]; - int columnNumber = result[(int)TextEdit.SearchResult.Column]; + int lineNumber = result.y; + int columnNumber = result.x; } [/csharp] [/codeblocks] @@ -532,39 +638,30 @@ - - + Selects the word under the caret. - - - - - - + + + Moves the caret to the specified [code]column[/code] index. - If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the caret position after the move occurs. + If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs. - - - - - - - - - - + + + + + Moves the caret to the specified [code]line[/code] index. - If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the caret position after the move occurs. - If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden. + If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs. + If [code]can_be_hidden[/code] is [code]true[/code], the specified [code]line[/code] can be hidden. @@ -572,6 +669,7 @@ + Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter. @@ -580,6 +678,7 @@ + Set a custom draw method for the gutter. The callback method must take the following args: [code]line: int, gutter: int, Area: Rect2[/code]. @@ -587,6 +686,7 @@ + Sets whether the gutter should be drawn. @@ -594,6 +694,7 @@ + Sets the name of the gutter. @@ -601,6 +702,7 @@ + Sets the gutter to overwritable. See [method merge_gutters]. @@ -608,6 +710,7 @@ + Sets the type of gutter. @@ -615,6 +718,7 @@ + Set the width of the gutter. @@ -626,34 +730,25 @@ - - - - - - + + + Positions the [code]wrap_index[/code] of [code]line[/code] at the center of the viewport. - - - - - - + + + Positions the [code]wrap_index[/code] of [code]line[/code] at the top of the viewport. - - - - - - + + + Positions the [code]wrap_index[/code] of [code]line[/code] at the bottom of the viewport. @@ -672,6 +767,7 @@ + Sets the [code]gutter[/code] on [code]line[/code] as clickable. @@ -680,6 +776,7 @@ + Sets the icon for [code]gutter[/code] on [code]line[/code]. @@ -688,6 +785,7 @@ + Sets the color for [code]gutter[/code] on [code]line[/code]. @@ -696,6 +794,7 @@ + Sets the metadata for [code]gutter[/code] on [code]line[/code]. @@ -704,6 +803,7 @@ + Sets the text for [code]gutter[/code] on [code]line[/code]. @@ -715,12 +815,24 @@ - - - - + + + + If [code]true[/code], sets the user into overtype mode. When the user types in this mode, it will override existing text. + + + + + - If [code]True[/code] set the user into overtype mode. When the user types it will override existing text. + Sets the search flags. This is used with [method set_search_text] to highlight occurrences of the searched text. Search flags can be specified from the [enum SearchFlags] enum. + + + + + + + Sets the search text. See [method set_search_flags]. @@ -729,6 +841,7 @@ + Sets the current selection mode. @@ -738,6 +851,29 @@ Sets the tab size for the [TextEdit] to use. + + + + + + + Provide custom tooltip text. The callback method must take the following args: [code]hovered_word: String, data: Variant[/code] + + + + + + + + Swaps the two lines. + + + + + + Tag the current version as saved. + + @@ -804,6 +940,12 @@ Allow scrolling past the last line into "virtual" space. + + Scroll smoothly over the text rather then jumping to the next location. + + + Sets the scroll speed with the minimap or when [member scroll_smooth] is enabled. + If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line. @@ -814,9 +956,6 @@ If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled. - - If [code]true[/code], sets the [code]step[/code] of the scrollbars to [code]0.25[/code] which results in smoother scrolling. - Set BiDi algorithm override for the structured text. @@ -832,9 +971,6 @@ Base text writing direction. - - Vertical scroll sensitivity. - If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it. @@ -850,22 +986,27 @@ + Emitted when a gutter is added. + Emitted when a gutter is clicked. + Emitted when a gutter is removed. + Emitted immediately when the text changes. + When text is added [code]from_line[/code] will be less then [code]to_line[/code]. On a remove [code]to_line[/code] will be less then [code]from_line[/code]. @@ -875,43 +1016,6 @@ - - Match case when searching. - - - Match whole words when searching. - - - Search from end to beginning. - - - Vertical line caret. - - - Block caret. - - - - - - - - - - - - - Line wrapping is disabled. - - - Line wrapping occurs at the control boundary, beyond what would normally be visible. - - - - - - - Cuts (copies and clears) the selected text. @@ -999,13 +1103,58 @@ Represents the size of the [enum MenuItems] enum. + + Match case when searching. + + + Match whole words when searching. + + + Search from end to beginning. + + + Vertical line caret. + + + Block caret. + + + Not selecting. + + + Select as if [code]shift[/code] is pressed. + + + Select single characters as if the user single clicked. + + + Select whole words as if the user double clicked. + + + Select whole lines as if the user tripped clicked. + + + Line wrapping is disabled. + + + Line wrapping occurs at the control boundary, beyond what would normally be visible. + + + Draw a string. + + + Draw an icon. + + + Custom draw. + Sets the background [Color] of this [TextEdit]. - [Color] of the text behind the caret when block caret is enabled. + [Color] of the text behind the caret when using a block caret. [Color] of the caret. @@ -1026,7 +1175,7 @@ The tint of text outline of the [TextEdit]. - Sets the font [Color] when [member readonly] is enabled. + Sets the font [Color] when [member editable] is disabled. Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled. @@ -1044,7 +1193,7 @@ The size of the text outline. - Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled. + Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled. Sets the highlight [Color] of text selections. -- cgit v1.2.3