completer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const MaxCompletionEntries = 10

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	*gtk.ListBoxRow

	Child gtkutils.ExtendedWidget
	Text  string
}

type MessageContainer

type MessageContainer interface {
	GetChannelID() discord.Snowflake
	GetGuildID() discord.Snowflake
	GetRecentAuthors(limit int) []discord.Snowflake
}

type State

type State struct {
	*gtk.Revealer

	Scroll  *gtk.ScrolledWindow
	ListBox *gtk.ListBox
	Entries []*Entry

	// RequestGuildMember func(prefix string)
	GetRecentAuthors func(limit int) []discord.Snowflake
	InputBuf         *gtk.TextBuffer
	// contains filtered or unexported fields
}

func New

func New(state *ningen.State, textbuf *gtk.TextBuffer, msgC MessageContainer) *State

func (*State) ClearCompletion

func (c *State) ClearCompletion()

func (*State) Down

func (c *State) Down()

func (*State) GetIndex

func (c *State) GetIndex() int

func (*State) IsEmpty

func (c *State) IsEmpty() bool

func (*State) KeyDown

func (c *State) KeyDown(state, key uint) bool

func (*State) Run

func (c *State) Run()

func (*State) Select

func (c *State) Select(index int)

func (*State) Up

func (c *State) Up()

Jump to

Keyboard shortcuts

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