completion

package
v0.0.0-...-6513b37 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImageSmall   = 25
	ImageLarge   = 40
	ImagePadding = 6
)
View Source
const (
	MinPopoverWidth = 300
)

Variables

This section is empty.

Functions

func CursorRect

func CursorRect(i *gtk.TextView) gdk.Rectangle

func GetWordIters

func GetWordIters(buf *gtk.TextBuffer, offset int64) (start, end *gtk.TextIter)

func NewPopover

func NewPopover(relto gtk.IWidget) *gtk.Popover

func State

func State(buf *gtk.TextBuffer) (text string, offset int64, blank bool)

func SwapWord

func SwapWord(b *gtk.TextBuffer, word string, offset int64)

func WrapCompleter

func WrapCompleter(input *gtk.TextView)

Types

type Completer

type Completer struct {
	Input   *gtk.TextView
	Buffer  *gtk.TextBuffer
	List    *gtk.ListBox
	Popover *gtk.Popover

	Splitter split.SplitFunc
	// contains filtered or unexported fields
}

func NewCompleter

func NewCompleter(input *gtk.TextView) *Completer

func (*Completer) Clear

func (c *Completer) Clear()

func (*Completer) Content

func (c *Completer) Content() []string

Words returns the buffer content split into words.

func (*Completer) Popdown

func (c *Completer) Popdown()

func (*Completer) Popup

func (c *Completer) Popup()

func (*Completer) Reset

func (c *Completer) Reset()

func (*Completer) SetCompleter

func (c *Completer) SetCompleter(completer cchat.Completer)

SetCompleter sets the current completer. If completer is nil, then the completer is disabled.

type KeyDownHandlerFn

type KeyDownHandlerFn = func(gtk.IWidget, *gdk.Event) bool

func KeyDownHandler

func KeyDownHandler(l *gtk.ListBox, focus func()) KeyDownHandlerFn

Jump to

Keyboard shortcuts

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