widget

package
v0.0.0-...-cb07457 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewColor

func NewColor(c int) color.Color

Types

type Cell

type Cell struct {
	Text        rune
	HighlightID int
	Repeat      int
}

type CmdlineContent

type CmdlineContent struct {
	// contains filtered or unexported fields
}

type CmdlineShow

type CmdlineShow struct {
	// contains filtered or unexported fields
}

func NewCmlineShow

func NewCmlineShow(eventData any) (c CmdlineShow)

["cmdline_show", content, pos, firstc, prompt, indent, level] content: List of [attrs, string] [[{}, "t"], [attrs, "est"], ...]

type Editor

type Editor struct {
	widget.BaseWidget

	Nvim *nvim.Nvim
	// contains filtered or unexported fields
}

func NewEditor

func NewEditor(log logger, nvimProcessOptions []nvim.ChildProcessOption) *Editor

func (*Editor) CreateRenderer

func (e *Editor) CreateRenderer() fyne.WidgetRenderer

func (*Editor) FocusGained

func (e *Editor) FocusGained()

Focusable interface

func (*Editor) FocusLost

func (e *Editor) FocusLost()

Focusable interface

func (*Editor) PreviewMode

func (e *Editor) PreviewMode() error

PreviewMode Renders the current buffer as markdown richtext

func (*Editor) Tapped

func (e *Editor) Tapped(pe *fyne.PointEvent)

Tappable interface

func (*Editor) TypedKey

func (e *Editor) TypedKey(fke *fyne.KeyEvent)

handle special key input Focusable interface

func (*Editor) TypedRune

func (e *Editor) TypedRune(r rune)

handle normal key input Focusable interface

type FyneStyleTable

type FyneStyleTable map[int]widget.TextGridStyle

type GridCursorGoto

type GridCursorGoto struct {
	Grid   int
	Row    int
	Column int
}

func NewGridCursorGoto

func NewGridCursorGoto(eventArgs any) *GridCursorGoto

type GridLine

type GridLine struct {
	Grid     int
	Row      int
	ColStart int
	Cells    []Cell
	Wrap     bool
}

type GridResize

type GridResize struct {
	Grid   int
	Width  int
	Height int
}

type GridScroll

type GridScroll struct {
	Grid  int
	Top   int
	Bot   int
	Left  int
	Right int
	Rows  int
	Cols  int
}

type HLAttribute

type HLAttribute struct {
	Foreground    color.Color
	Background    color.Color
	Special       color.Color
	Reverse       bool
	Italic        bool
	Bold          bool
	Strikethrough bool
	Underline     bool
	Undercurl     bool
	Underdouble   bool
	Underdotted   bool
	Underdashed   bool
	Blend         int
}

func NewHLAttribute

func NewHLAttribute(eventData any) (int, HLAttribute)

func (*HLAttribute) String

func (attr *HLAttribute) String() string

type HightlightTable

type HightlightTable map[int]HLAttribute

HightlightTable is used to keep track of nvims highlight ids.

func (HightlightTable) GetTextGridStyle

func (hlt HightlightTable) GetTextGridStyle(hlID int) *widget.CustomTextGridStyle

type ModeChange

type ModeChange struct {
	Mode    string
	ModeIdx int
}

type ModeInfo

type ModeInfo struct {
	CursorShape    string
	CellPercentage int
	BlinkWait      int
	BlinkOn        int
	BlinkOff       int
	AttrId         int
	AttrIdLm       int
	ShortName      string
	Name           string
	MouseShape     int
}

type ModeInfoSet

type ModeInfoSet struct {
	// contains filtered or unexported fields
}

type WinViewport

type WinViewport struct {
	Grid    int
	Win     nvim.Window
	Topline int
	Botline int
	Curline int
	Curcol  int
}

Jump to

Keyboard shortcuts

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