appkeys

package
v0.0.2-0...-9a6aa9e Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package appkeys provides a widget which responds to keyboard input.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(w IWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas

func RenderSize

func RenderSize(w IWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox

func UserInput

func UserInput(w IAppInput, ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool

Types

type IAppInput

type IAppInput interface {
	gowid.IComposite
	ApplyBefore() bool
}

type IAppKeys

type IAppKeys interface {
	KeyInput(ev *tcell.EventKey, app gowid.IApp) bool
}

type IAppMouse

type IAppMouse interface {
	MouseInput(ev *tcell.EventMouse, app gowid.IApp) bool
}

type IWidget

type IWidget interface {
	gowid.ICompositeWidget
}

type KeyInputFn

type KeyInputFn func(ev *tcell.EventKey, app gowid.IApp) bool

type KeyWidget

type KeyWidget struct {
	*Widget
	// contains filtered or unexported fields
}

func New

func New(inner gowid.IWidget, fn KeyInputFn, opts ...Options) *KeyWidget

func (*KeyWidget) KeyInput

func (w *KeyWidget) KeyInput(k *tcell.EventKey, app gowid.IApp) bool

func (*KeyWidget) UserInput

func (w *KeyWidget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool

type MouseInputFn

type MouseInputFn func(ev *tcell.EventMouse, app gowid.IApp) bool

type MouseWidget

type MouseWidget struct {
	*Widget
	// contains filtered or unexported fields
}

func NewMouse

func NewMouse(inner gowid.IWidget, fn MouseInputFn, opts ...Options) *MouseWidget

func (*MouseWidget) MouseInput

func (w *MouseWidget) MouseInput(k *tcell.EventMouse, app gowid.IApp) bool

func (*MouseWidget) UserInput

func (w *MouseWidget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool

type Options

type Options struct {
	ApplyBefore bool
}

type Widget

type Widget struct {
	gowid.IWidget
	// contains filtered or unexported fields
}

func (*Widget) ApplyBefore

func (w *Widget) ApplyBefore() bool

func (*Widget) SetSubWidget

func (w *Widget) SetSubWidget(wi gowid.IWidget, app gowid.IApp)

func (*Widget) String

func (w *Widget) String() string

func (*Widget) SubWidget

func (w *Widget) SubWidget() gowid.IWidget

func (*Widget) SubWidgetSize

func (w *Widget) SubWidgetSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderSize

Jump to

Keyboard shortcuts

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