CodeHighlighter

package
v0.0.0-...-ad02d68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

By adjusting various properties of this resource, you can change the colors of strings, comments, numbers, and other text patterns inside a [TextEdit] control.

Index

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 Any

type Any interface {
	gd.IsClass
	AsCodeHighlighter() Instance
}

type Expanded

type Expanded [1]gdclass.CodeHighlighter

func (Expanded) AddColorRegion

func (self Expanded) AddColorRegion(start_key string, end_key string, color Color.RGBA, line_only bool)

Adds a color region (such as for comments or strings) from 'start_key' to 'end_key'. Both keys should be symbols, and 'start_key' must not be shared with other delimiters. If 'line_only' is true or 'end_key' is an empty [String], the region does not carry over to the next line.

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

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]) AsCodeHighlighter

func (self *Extension[T]) AsCodeHighlighter() Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

func (*Extension[T]) AsSyntaxHighlighter

func (self *Extension[T]) AsSyntaxHighlighter() SyntaxHighlighter.Instance

type ID

type ID Object.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.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.CodeHighlighter

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AddColorRegion

func (self Instance) AddColorRegion(start_key string, end_key string, color Color.RGBA)

Adds a color region (such as for comments or strings) from 'start_key' to 'end_key'. Both keys should be symbols, and 'start_key' must not be shared with other delimiters. If 'line_only' is true or 'end_key' is an empty [String], the region does not carry over to the next line.

func (Instance) AddKeywordColor

func (self Instance) AddKeywordColor(keyword string, color Color.RGBA)

Sets the color for a keyword. The keyword cannot contain any symbols except '_'.

func (Instance) AddMemberKeywordColor

func (self Instance) AddMemberKeywordColor(member_keyword string, color Color.RGBA)

Sets the color for a member keyword. The member keyword cannot contain any symbols except '_'. It will not be highlighted if preceded by a '.'.

func (Instance) AsCodeHighlighter

func (self Instance) AsCodeHighlighter() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsSyntaxHighlighter

func (self Instance) AsSyntaxHighlighter() SyntaxHighlighter.Instance

func (Instance) ClearColorRegions

func (self Instance) ClearColorRegions()

Removes all color regions.

func (Instance) ClearKeywordColors

func (self Instance) ClearKeywordColors()

Removes all keywords.

func (Instance) ClearMemberKeywordColors

func (self Instance) ClearMemberKeywordColors()

Removes all member keywords.

func (Instance) ColorRegions

func (self Instance) ColorRegions() map[any]any

func (Instance) FunctionColor

func (self Instance) FunctionColor() Color.RGBA

func (Instance) GetKeywordColor

func (self Instance) GetKeywordColor(keyword string) Color.RGBA

Returns the color for a keyword.

func (Instance) GetMemberKeywordColor

func (self Instance) GetMemberKeywordColor(member_keyword string) Color.RGBA

Returns the color for a member keyword.

func (Instance) HasColorRegion

func (self Instance) HasColorRegion(start_key string) bool

Returns true if the start key exists, else false.

func (Instance) HasKeywordColor

func (self Instance) HasKeywordColor(keyword string) bool

Returns true if the keyword exists, else false.

func (Instance) HasMemberKeywordColor

func (self Instance) HasMemberKeywordColor(member_keyword string) bool

Returns true if the member keyword exists, else false.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) KeywordColors

func (self Instance) KeywordColors() map[any]any

func (Instance) MemberKeywordColors

func (self Instance) MemberKeywordColors() map[any]any

func (Instance) MemberVariableColor

func (self Instance) MemberVariableColor() Color.RGBA

func (Instance) NumberColor

func (self Instance) NumberColor() Color.RGBA

func (Instance) RemoveColorRegion

func (self Instance) RemoveColorRegion(start_key string)

Removes the color region that uses that start key.

func (Instance) RemoveKeywordColor

func (self Instance) RemoveKeywordColor(keyword string)

Removes the keyword.

func (Instance) RemoveMemberKeywordColor

func (self Instance) RemoveMemberKeywordColor(member_keyword string)

Removes the member keyword.

func (Instance) SetColorRegions

func (self Instance) SetColorRegions(value map[any]any)

func (Instance) SetFunctionColor

func (self Instance) SetFunctionColor(value Color.RGBA)

func (Instance) SetKeywordColors

func (self Instance) SetKeywordColors(value map[any]any)

func (Instance) SetMemberKeywordColors

func (self Instance) SetMemberKeywordColors(value map[any]any)

func (Instance) SetMemberVariableColor

func (self Instance) SetMemberVariableColor(value Color.RGBA)

func (Instance) SetNumberColor

func (self Instance) SetNumberColor(value Color.RGBA)

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetSymbolColor

func (self Instance) SetSymbolColor(value Color.RGBA)

func (Instance) SymbolColor

func (self Instance) SymbolColor() Color.RGBA

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL