Documentation
¶
Overview ¶
Package CodeEdit provides methods for working with CodeEdit object instances.
Index ¶
- type Advanced
- type Any
- type CodeCompletionKind
- type CodeCompletionLocation
- type CompletionInfo
- type Expanded
- func (self Expanded) AddCodeCompletionOption(atype CodeCompletionKind, display_text string, insert_text string, ...)
- func (self Expanded) AddCommentDelimiter(start_key string, end_key string, line_only bool)
- func (self Expanded) AddStringDelimiter(start_key string, end_key string, line_only bool)
- func (self Expanded) ConfirmCodeCompletion(replace bool)
- func (self Expanded) ConvertIndent(from_line int, to_line int)
- func (self Expanded) IsInComment(line int, column int) int
- func (self Expanded) IsInString(line int, column int) int
- func (self Expanded) RequestCodeCompletion(force bool)
- func (self Expanded) SetCodeRegionTags(start string, end string)
- type Extension
- func (self *Extension[T]) AsCanvasItem() CanvasItem.Instance
- func (self *Extension[T]) AsCodeEdit() Instance
- func (self *Extension[T]) AsControl() Control.Instance
- func (self *Extension[T]) AsNode() Node.Instance
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsTextEdit() TextEdit.Instance
- type ID
- type Implementation
- type Instance
- func (self Instance) AddAutoBraceCompletionPair(start_key string, end_key string)
- func (self Instance) AddCodeCompletionOption(atype CodeCompletionKind, display_text string, insert_text string)
- func (self Instance) AddCommentDelimiter(start_key string, end_key string)
- func (self Instance) AddStringDelimiter(start_key string, end_key string)
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsCodeEdit() Instance
- func (self Instance) AsControl() Control.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsTextEdit() TextEdit.Instance
- func (self Instance) AutoBraceCompletionEnabled() bool
- func (self Instance) AutoBraceCompletionHighlightMatching() bool
- func (self Instance) AutoBraceCompletionPairs() map[any]any
- func (self Instance) CanFoldLine(line int) bool
- func (self Instance) CancelCodeCompletion()
- func (self Instance) ClearBookmarkedLines()
- func (self Instance) ClearBreakpointedLines()
- func (self Instance) ClearCommentDelimiters()
- func (self Instance) ClearExecutingLines()
- func (self Instance) ClearStringDelimiters()
- func (self Instance) CodeCompletionEnabled() bool
- func (self Instance) CodeCompletionPrefixes() []string
- func (self Instance) ConfirmCodeCompletion()
- func (self Instance) ConvertIndent()
- func (self Instance) CreateCodeRegion()
- func (self Instance) DeleteLines()
- func (self Instance) DelimiterComments() []string
- func (self Instance) DelimiterStrings() []string
- func (self Instance) DoIndent()
- func (self Instance) DuplicateLines()
- func (self Instance) DuplicateSelection()
- func (self Instance) FoldAllLines()
- func (self Instance) FoldLine(line int)
- func (self Instance) GetAutoBraceCompletionCloseKey(open_key string) string
- func (self Instance) GetBookmarkedLines() []int32
- func (self Instance) GetBreakpointedLines() []int32
- func (self Instance) GetCodeCompletionOption(index int) CompletionInfo
- func (self Instance) GetCodeCompletionOptions() []CompletionInfo
- func (self Instance) GetCodeCompletionSelectedIndex() int
- func (self Instance) GetCodeRegionEndTag() string
- func (self Instance) GetCodeRegionStartTag() string
- func (self Instance) GetDelimiterEndKey(delimiter_index int) string
- func (self Instance) GetDelimiterEndPosition(line int, column int) Vector2.XY
- func (self Instance) GetDelimiterStartKey(delimiter_index int) string
- func (self Instance) GetDelimiterStartPosition(line int, column int) Vector2.XY
- func (self Instance) GetExecutingLines() []int32
- func (self Instance) GetFoldedLines() []int
- func (self Instance) GetTextForCodeCompletion() string
- func (self Instance) GetTextForSymbolLookup() string
- func (self Instance) GetTextWithCursorChar(line int, column int) string
- func (self Instance) GuttersDrawBookmarks() bool
- func (self Instance) GuttersDrawBreakpointsGutter() bool
- func (self Instance) GuttersDrawExecutingLines() bool
- func (self Instance) GuttersDrawFoldGutter() bool
- func (self Instance) GuttersDrawLineNumbers() bool
- func (self Instance) GuttersZeroPadLineNumbers() bool
- func (self Instance) HasAutoBraceCompletionCloseKey(close_key string) bool
- func (self Instance) HasAutoBraceCompletionOpenKey(open_key string) bool
- func (self Instance) HasCommentDelimiter(start_key string) bool
- func (self Instance) HasStringDelimiter(start_key string) bool
- func (self Instance) ID() ID
- func (self Instance) IndentAutomatic() bool
- func (self Instance) IndentAutomaticPrefixes() []string
- func (self Instance) IndentLines()
- func (self Instance) IndentSize() int
- func (self Instance) IndentUseSpaces() bool
- func (self Instance) IsInComment(line int) int
- func (self Instance) IsInString(line int) int
- func (self Instance) IsLineBookmarked(line int) bool
- func (self Instance) IsLineBreakpointed(line int) bool
- func (self Instance) IsLineCodeRegionEnd(line int) bool
- func (self Instance) IsLineCodeRegionStart(line int) bool
- func (self Instance) IsLineExecuting(line int) bool
- func (self Instance) IsLineFolded(line int) bool
- func (self Instance) LineFolding() bool
- func (self Instance) LineLengthGuidelines() []int
- func (self Instance) MoveLinesDown()
- func (self Instance) MoveLinesUp()
- func (self Instance) OnBreakpointToggled(cb func(line int), flags ...Signal.Flags)
- func (self Instance) OnCodeCompletionRequested(cb func(), flags ...Signal.Flags)
- func (self Instance) OnSymbolHovered(cb func(symbol string, line int, column int), flags ...Signal.Flags)
- func (self Instance) OnSymbolLookup(cb func(symbol string, line int, column int), flags ...Signal.Flags)
- func (self Instance) OnSymbolValidate(cb func(symbol string), flags ...Signal.Flags)
- func (self Instance) RemoveCommentDelimiter(start_key string)
- func (self Instance) RemoveStringDelimiter(start_key string)
- func (self Instance) RequestCodeCompletion()
- func (self Instance) SetAutoBraceCompletionEnabled(value bool)
- func (self Instance) SetAutoBraceCompletionHighlightMatching(value bool)
- func (self Instance) SetAutoBraceCompletionPairs(value map[any]any)
- func (self Instance) SetCodeCompletionEnabled(value bool)
- func (self Instance) SetCodeCompletionPrefixes(value []string)
- func (self Instance) SetCodeCompletionSelectedIndex(index int)
- func (self Instance) SetCodeHint(code_hint string)
- func (self Instance) SetCodeHintDrawBelow(draw_below bool)
- func (self Instance) SetCodeRegionTags()
- func (self Instance) SetDelimiterComments(value []string)
- func (self Instance) SetDelimiterStrings(value []string)
- func (self Instance) SetGuttersDrawBookmarks(value bool)
- func (self Instance) SetGuttersDrawBreakpointsGutter(value bool)
- func (self Instance) SetGuttersDrawExecutingLines(value bool)
- func (self Instance) SetGuttersDrawFoldGutter(value bool)
- func (self Instance) SetGuttersDrawLineNumbers(value bool)
- func (self Instance) SetGuttersZeroPadLineNumbers(value bool)
- func (self Instance) SetIndentAutomatic(value bool)
- func (self Instance) SetIndentAutomaticPrefixes(value []string)
- func (self Instance) SetIndentSize(value int)
- func (self Instance) SetIndentUseSpaces(value bool)
- func (self Instance) SetLineAsBookmarked(line int, bookmarked bool)
- func (self Instance) SetLineAsBreakpoint(line int, breakpointed bool)
- func (self Instance) SetLineAsExecuting(line int, executing bool)
- func (self Instance) SetLineFolding(value bool)
- func (self Instance) SetLineLengthGuidelines(value []int)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetSymbolLookupOnClick(value bool)
- func (self Instance) SetSymbolLookupWordAsValid(valid bool)
- func (self Instance) SetSymbolTooltipOnHover(value bool)
- func (self Instance) SymbolLookupOnClick() bool
- func (self Instance) SymbolTooltipOnHover() bool
- func (self Instance) ToggleFoldableLine(line int)
- func (self Instance) ToggleFoldableLinesAtCarets()
- func (self Instance) UnfoldAllLines()
- func (self Instance) UnfoldLine(line int)
- func (self Instance) UnindentLines()
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) UpdateCodeCompletionOptions(force bool)
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type CodeCompletionKind ¶
type CodeCompletionKind int //gd:CodeEdit.CodeCompletionKind
const ( /*Marks the option as a class.*/ KindClass CodeCompletionKind = 0 /*Marks the option as a function.*/ KindFunction CodeCompletionKind = 1 /*Marks the option as a Godot signal.*/ KindSignal CodeCompletionKind = 2 /*Marks the option as a variable.*/ KindVariable CodeCompletionKind = 3 /*Marks the option as a member.*/ KindMember CodeCompletionKind = 4 /*Marks the option as an enum entry.*/ KindEnum CodeCompletionKind = 5 /*Marks the option as a constant.*/ KindConstant CodeCompletionKind = 6 /*Marks the option as a Godot node path.*/ KindNodePath CodeCompletionKind = 7 /*Marks the option as a file path.*/ KindFilePath CodeCompletionKind = 8 /*Marks the option as unclassified or plain text.*/ KindPlainText CodeCompletionKind = 9 )
type CodeCompletionLocation ¶
type CodeCompletionLocation int //gd:CodeEdit.CodeCompletionLocation
const ( /*The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes).*/ LocationLocal CodeCompletionLocation = 0 /*The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. [code]0[/code] for the local class, [code]1[/code] for the parent, [code]2[/code] for the grandparent, etc.) to store the depth of an option in the class or a parent class.*/ LocationParentMask CodeCompletionLocation = 256 /*The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons).*/ LocationOtherUserCode CodeCompletionLocation = 512 /*The option is from other engine code, not covered by the other enum constants - e.g. built-in classes.*/ LocationOther CodeCompletionLocation = 1024 )
type CompletionInfo ¶
type Expanded ¶
func (Expanded) AddCodeCompletionOption ¶
func (self Expanded) AddCodeCompletionOption(atype CodeCompletionKind, display_text string, insert_text string, text_color Color.RGBA, icon Resource.Instance, value any, location int)
Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list. [param location] indicates location of the option relative to the location of the code completion query. See [enum CodeEdit.CodeCompletionLocation] for how to set this value. [b]Note:[/b] This list will replace all current candidates.
func (Expanded) AddCommentDelimiter ¶
Adds a comment delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters. If [param line_only] is [code]true[/code] or [param end_key] is an empty [String], the region does not carry over to the next line.
func (Expanded) AddStringDelimiter ¶
Defines a string delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters. If [param line_only] is [code]true[/code] or [param end_key] is an empty [String], the region does not carry over to the next line.
func (Expanded) ConfirmCodeCompletion ¶
Inserts the selected entry into the text. If [param replace] is [code]true[/code], any existing text is replaced rather than merged.
func (Expanded) ConvertIndent ¶
Converts the indents of lines between [param from_line] and [param to_line] to tabs or spaces as set by [member indent_use_spaces]. Values of [code]-1[/code] convert the entire text.
func (Expanded) IsInComment ¶
Returns delimiter index if [param line] [param column] is in a comment. If [param column] is not provided, will return delimiter index if the entire [param line] is a comment. Otherwise [code]-1[/code].
func (Expanded) IsInString ¶
Returns the delimiter index if [param line] [param column] is in a string. If [param column] is not provided, will return the delimiter index if the entire [param line] is a string. Otherwise [code]-1[/code].
func (Expanded) RequestCodeCompletion ¶
Emits [signal code_completion_requested], if [param force] is [code]true[/code] will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal.
func (Expanded) SetCodeRegionTags ¶
Sets the code region start and end tags (without comment delimiter).
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsCanvasItem ¶
func (self *Extension[T]) AsCanvasItem() CanvasItem.Instance
func (*Extension[T]) AsCodeEdit ¶
func (*Extension[T]) AsTextEdit ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
CodeEdit is a specialized [TextEdit] designed for editing plain text code files. It has many features commonly found in code editors such as line numbers, line folding, code completion, indent management, and string/comment management. [b]Note:[/b] Regardless of locale, [CodeEdit] will by default always use left-to-right text direction to correctly display source code.
See [Interface] for methods that can be overridden by a [Class] that extends it.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AddAutoBraceCompletionPair ¶
Adds a brace pair. Both the start and end keys must be symbols. Only the start key has to be unique.
func (Instance) AddCodeCompletionOption ¶
func (self Instance) AddCodeCompletionOption(atype CodeCompletionKind, display_text string, insert_text string)
Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list. [param location] indicates location of the option relative to the location of the code completion query. See [enum CodeEdit.CodeCompletionLocation] for how to set this value. [b]Note:[/b] This list will replace all current candidates.
func (Instance) AddCommentDelimiter ¶
Adds a comment delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters. If [param line_only] is [code]true[/code] or [param end_key] is an empty [String], the region does not carry over to the next line.
func (Instance) AddStringDelimiter ¶
Defines a string delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters. If [param line_only] is [code]true[/code] or [param end_key] is an empty [String], the region does not carry over to the next line.
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsCodeEdit ¶
func (Instance) AsTextEdit ¶
func (Instance) AutoBraceCompletionEnabled ¶
func (Instance) AutoBraceCompletionHighlightMatching ¶
func (Instance) AutoBraceCompletionPairs ¶
func (Instance) CanFoldLine ¶
Returns [code]true[/code] if the given line is foldable. A line is foldable if it is the start of a valid code region (see [method get_code_region_start_tag]), if it is the start of a comment or string block, or if the next non-empty line is more indented (see [method TextEdit.get_indent_level]).
func (Instance) CancelCodeCompletion ¶
func (self Instance) CancelCodeCompletion()
Cancels the autocomplete menu.
func (Instance) ClearBookmarkedLines ¶
func (self Instance) ClearBookmarkedLines()
Clears all bookmarked lines.
func (Instance) ClearBreakpointedLines ¶
func (self Instance) ClearBreakpointedLines()
Clears all breakpointed lines.
func (Instance) ClearCommentDelimiters ¶
func (self Instance) ClearCommentDelimiters()
Removes all comment delimiters.
func (Instance) ClearExecutingLines ¶
func (self Instance) ClearExecutingLines()
Clears all executed lines.
func (Instance) ClearStringDelimiters ¶
func (self Instance) ClearStringDelimiters()
Removes all string delimiters.
func (Instance) CodeCompletionEnabled ¶
func (Instance) CodeCompletionPrefixes ¶
func (Instance) ConfirmCodeCompletion ¶
func (self Instance) ConfirmCodeCompletion()
Inserts the selected entry into the text. If [param replace] is [code]true[/code], any existing text is replaced rather than merged.
func (Instance) ConvertIndent ¶
func (self Instance) ConvertIndent()
Converts the indents of lines between [param from_line] and [param to_line] to tabs or spaces as set by [member indent_use_spaces]. Values of [code]-1[/code] convert the entire text.
func (Instance) CreateCodeRegion ¶
func (self Instance) CreateCodeRegion()
Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see [method add_comment_delimiter]). A code region is a part of code that is highlighted when folded and can help organize your script. Code region start and end tags can be customized (see [method set_code_region_tags]). Code regions are delimited using start and end tags (respectively [code]region[/code] and [code]endregion[/code] by default) preceded by one line comment delimiter. (eg. [code]#region[/code] and [code]#endregion[/code])
func (Instance) DeleteLines ¶
func (self Instance) DeleteLines()
Deletes all lines that are selected or have a caret on them.
func (Instance) DelimiterComments ¶
func (Instance) DelimiterStrings ¶
func (Instance) DoIndent ¶
func (self Instance) DoIndent()
If there is no selection, indentation is inserted at the caret. Otherwise, the selected lines are indented like [method indent_lines]. Equivalent to the [member ProjectSettings.input/ui_text_indent] action. The indentation characters used depend on [member indent_use_spaces] and [member indent_size].
func (Instance) DuplicateLines ¶
func (self Instance) DuplicateLines()
Duplicates all lines currently selected with any caret. Duplicates the entire line beneath the current one no matter where the caret is within the line.
func (Instance) DuplicateSelection ¶
func (self Instance) DuplicateSelection()
Duplicates all selected text and duplicates all lines with a caret on them.
func (Instance) FoldAllLines ¶
func (self Instance) FoldAllLines()
Folds all lines that are possible to be folded (see [method can_fold_line]).
func (Instance) GetAutoBraceCompletionCloseKey ¶
Gets the matching auto brace close key for [param open_key].
func (Instance) GetBookmarkedLines ¶
Gets all bookmarked lines.
func (Instance) GetBreakpointedLines ¶
Gets all breakpointed lines.
func (Instance) GetCodeCompletionOption ¶
func (self Instance) GetCodeCompletionOption(index int) CompletionInfo
Gets the completion option at [param index]. The return [Dictionary] has the following key-values: [code]kind[/code]: [enum CodeCompletionKind] [code]display_text[/code]: Text that is shown on the autocomplete menu. [code]insert_text[/code]: Text that is to be inserted when this item is selected. [code]font_color[/code]: Color of the text on the autocomplete menu. [code]icon[/code]: Icon to draw on the autocomplete menu. [code]default_value[/code]: Value of the symbol.
func (Instance) GetCodeCompletionOptions ¶
func (self Instance) GetCodeCompletionOptions() []CompletionInfo
Gets all completion options, see [method get_code_completion_option] for return content.
func (Instance) GetCodeCompletionSelectedIndex ¶
Gets the index of the current selected completion option.
func (Instance) GetCodeRegionEndTag ¶
Returns the code region end tag (without comment delimiter).
func (Instance) GetCodeRegionStartTag ¶
Returns the code region start tag (without comment delimiter).
func (Instance) GetDelimiterEndKey ¶
Gets the end key for a string or comment region index.
func (Instance) GetDelimiterEndPosition ¶
If [param line] [param column] is in a string or comment, returns the end position of the region. If not or no end could be found, both [Vector2] values will be [code]-1[/code].
func (Instance) GetDelimiterStartKey ¶
Gets the start key for a string or comment region index.
func (Instance) GetDelimiterStartPosition ¶
If [param line] [param column] is in a string or comment, returns the start position of the region. If not or no start could be found, both [Vector2] values will be [code]-1[/code].
func (Instance) GetExecutingLines ¶
Gets all executing lines.
func (Instance) GetFoldedLines ¶
Returns all lines that are currently folded.
func (Instance) GetTextForCodeCompletion ¶
Returns the full text with char [code]0xFFFF[/code] at the caret location.
func (Instance) GetTextForSymbolLookup ¶
Returns the full text with char [code]0xFFFF[/code] at the cursor location.
func (Instance) GetTextWithCursorChar ¶
Returns the full text with char [code]0xFFFF[/code] at the specified location.
func (Instance) GuttersDrawBookmarks ¶
func (Instance) GuttersDrawBreakpointsGutter ¶
func (Instance) GuttersDrawExecutingLines ¶
func (Instance) GuttersDrawFoldGutter ¶
func (Instance) GuttersDrawLineNumbers ¶
func (Instance) GuttersZeroPadLineNumbers ¶
func (Instance) HasAutoBraceCompletionCloseKey ¶
Returns [code]true[/code] if close key [param close_key] exists.
func (Instance) HasAutoBraceCompletionOpenKey ¶
Returns [code]true[/code] if open key [param open_key] exists.
func (Instance) HasCommentDelimiter ¶
Returns [code]true[/code] if comment [param start_key] exists.
func (Instance) HasStringDelimiter ¶
Returns [code]true[/code] if string [param start_key] exists.
func (Instance) IndentAutomatic ¶
func (Instance) IndentAutomaticPrefixes ¶
func (Instance) IndentLines ¶
func (self Instance) IndentLines()
Indents all lines that are selected or have a caret on them. Uses spaces or a tab depending on [member indent_use_spaces]. See [method unindent_lines].
func (Instance) IndentSize ¶
func (Instance) IndentUseSpaces ¶
func (Instance) IsInComment ¶
Returns delimiter index if [param line] [param column] is in a comment. If [param column] is not provided, will return delimiter index if the entire [param line] is a comment. Otherwise [code]-1[/code].
func (Instance) IsInString ¶
Returns the delimiter index if [param line] [param column] is in a string. If [param column] is not provided, will return the delimiter index if the entire [param line] is a string. Otherwise [code]-1[/code].
func (Instance) IsLineBookmarked ¶
Returns [code]true[/code] if the given line is bookmarked. See [method set_line_as_bookmarked].
func (Instance) IsLineBreakpointed ¶
Returns [code]true[/code] if the given line is breakpointed. See [method set_line_as_breakpoint].
func (Instance) IsLineCodeRegionEnd ¶
Returns [code]true[/code] if the given line is a code region end. See [method set_code_region_tags].
func (Instance) IsLineCodeRegionStart ¶
Returns [code]true[/code] if the given line is a code region start. See [method set_code_region_tags].
func (Instance) IsLineExecuting ¶
Returns [code]true[/code] if the given line is marked as executing. See [method set_line_as_executing].
func (Instance) IsLineFolded ¶
Returns [code]true[/code] if the given line is folded. See [method fold_line].
func (Instance) LineFolding ¶
func (Instance) LineLengthGuidelines ¶
func (Instance) MoveLinesDown ¶
func (self Instance) MoveLinesDown()
Moves all lines down that are selected or have a caret on them.
func (Instance) MoveLinesUp ¶
func (self Instance) MoveLinesUp()
Moves all lines up that are selected or have a caret on them.
func (Instance) OnBreakpointToggled ¶
func (Instance) OnCodeCompletionRequested ¶
func (Instance) OnSymbolHovered ¶
func (Instance) OnSymbolLookup ¶
func (Instance) OnSymbolValidate ¶
func (Instance) RemoveCommentDelimiter ¶
Removes the comment delimiter with [param start_key].
func (Instance) RemoveStringDelimiter ¶
Removes the string delimiter with [param start_key].
func (Instance) RequestCodeCompletion ¶
func (self Instance) RequestCodeCompletion()
Emits [signal code_completion_requested], if [param force] is [code]true[/code] will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal.
func (Instance) SetAutoBraceCompletionEnabled ¶
func (Instance) SetAutoBraceCompletionHighlightMatching ¶
func (Instance) SetAutoBraceCompletionPairs ¶
func (Instance) SetCodeCompletionEnabled ¶
func (Instance) SetCodeCompletionPrefixes ¶
func (Instance) SetCodeCompletionSelectedIndex ¶
Sets the current selected completion option.
func (Instance) SetCodeHint ¶
Sets the code hint text. Pass an empty string to clear.
func (Instance) SetCodeHintDrawBelow ¶
If [code]true[/code], the code hint will draw below the main caret. If [code]false[/code], the code hint will draw above the main caret. See [method set_code_hint].
func (Instance) SetCodeRegionTags ¶
func (self Instance) SetCodeRegionTags()
Sets the code region start and end tags (without comment delimiter).
func (Instance) SetDelimiterComments ¶
func (Instance) SetDelimiterStrings ¶
func (Instance) SetGuttersDrawBookmarks ¶
func (Instance) SetGuttersDrawBreakpointsGutter ¶
func (Instance) SetGuttersDrawExecutingLines ¶
func (Instance) SetGuttersDrawFoldGutter ¶
func (Instance) SetGuttersDrawLineNumbers ¶
func (Instance) SetGuttersZeroPadLineNumbers ¶
func (Instance) SetIndentAutomatic ¶
func (Instance) SetIndentAutomaticPrefixes ¶
func (Instance) SetIndentSize ¶
func (Instance) SetIndentUseSpaces ¶
func (Instance) SetLineAsBookmarked ¶
Sets the given line as bookmarked. If [code]true[/code] and [member gutters_draw_bookmarks] is [code]true[/code], draws the [theme_item bookmark] icon in the gutter for this line. See [method get_bookmarked_lines] and [method is_line_bookmarked].
func (Instance) SetLineAsBreakpoint ¶
Sets the given line as a breakpoint. If [code]true[/code] and [member gutters_draw_breakpoints_gutter] is [code]true[/code], draws the [theme_item breakpoint] icon in the gutter for this line. See [method get_breakpointed_lines] and [method is_line_breakpointed].
func (Instance) SetLineAsExecuting ¶
Sets the given line as executing. If [code]true[/code] and [member gutters_draw_executing_lines] is [code]true[/code], draws the [theme_item executing_line] icon in the gutter for this line. See [method get_executing_lines] and [method is_line_executing].
func (Instance) SetLineFolding ¶
func (Instance) SetLineLengthGuidelines ¶
func (Instance) SetSymbolLookupOnClick ¶
func (Instance) SetSymbolLookupWordAsValid ¶
Sets the symbol emitted by [signal symbol_validate] as a valid lookup.
func (Instance) SetSymbolTooltipOnHover ¶
func (Instance) SymbolLookupOnClick ¶
func (Instance) SymbolTooltipOnHover ¶
func (Instance) ToggleFoldableLine ¶
Toggle the folding of the code block at the given line.
func (Instance) ToggleFoldableLinesAtCarets ¶
func (self Instance) ToggleFoldableLinesAtCarets()
Toggle the folding of the code block on all lines with a caret on them.
func (Instance) UnfoldAllLines ¶
func (self Instance) UnfoldAllLines()
Unfolds all lines that are folded.
func (Instance) UnfoldLine ¶
Unfolds the given line if it is folded or if it is hidden under a folded line.
func (Instance) UnindentLines ¶
func (self Instance) UnindentLines()
Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on [member indent_use_spaces]. Equivalent to the [member ProjectSettings.input/ui_text_dedent] action. See [method indent_lines].
func (*Instance) UnsafePointer ¶
func (Instance) UpdateCodeCompletionOptions ¶
Submits all completion options added with [method add_code_completion_option]. Will try to force the autocomplete menu to popup, if [param force] is [code]true[/code]. [b]Note:[/b] This will replace all current candidates.
type Interface ¶
type Interface interface { //Override this method to define how the selected entry should be inserted. If [param replace] is [code]true[/code], any existing text should be replaced. ConfirmCodeCompletion(replace bool) //Override this method to define what happens when the user requests code completion. If [param force] is [code]true[/code], any checks should be bypassed. RequestCodeCompletion(force bool) //Override this method to define what items in [param candidates] should be displayed. //Both [param candidates] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content. FilterCodeCompletionCandidates(candidates []map[any]any) []map[any]any }