widget

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EditorStyle

type EditorStyle struct {
	Font font.Font
	// LineHeight controls the distance between the baselines of lines of text.
	// If zero, a sensible default will be used.
	LineHeight unit.Sp
	// LineHeightScale applies a scaling factor to the LineHeight. If zero, a
	// sensible default will be used.
	LineHeightScale float32
	// TabWidth set how many spaces to represent a tab character.
	TabWidth int
	// TextSize set the text size.
	TextSize unit.Sp
	// Color is the text color.
	Color color.NRGBA
	// SelectionColor is the color of the background for selected text.
	SelectionColor color.NRGBA
	//LineHighlightColor is the color used to highlight the clicked logical line.
	// If not set, line will not be highlighted.
	LineHighlightColor color.NRGBA
	// TextHighlightColor use the color used to highlight the interested substring.
	TextHighlightColor color.NRGBA
	// Gap size between the line number bar and the main text area.
	LineNumberGutter unit.Dp
	LineNumberColor  color.NRGBA

	Editor *gvcode.Editor
	// contains filtered or unexported fields
}

func NewEditor

func NewEditor(th *material.Theme, editor *gvcode.Editor) EditorStyle

func (EditorStyle) Layout

func (e EditorStyle) Layout(gtx layout.Context) layout.Dimensions

Jump to

Keyboard shortcuts

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