tableutil

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package tableutil contains user-interface functions and helpers for termshark's tables - in particular, helpers for vim key sequences like 5gg and G

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GotoHandler

func GotoHandler(t IGoToLineRequested) appkeys.KeyInputFn

GotoHander retrusn a function suitable for the appkeys widget - it will check to see if the key represents a supported action on the table and then runs the action if so.

Types

type GoToAdapter

type GoToAdapter struct {
	*table.BoundedWidget
	*termshark.KeyState
}

func (*GoToAdapter) GoToLineOrBottom

func (t *GoToAdapter) GoToLineOrBottom(evk *tcell.EventKey) (bool, int)

func (*GoToAdapter) GoToLineOrTop

func (t *GoToAdapter) GoToLineOrTop(evk *tcell.EventKey) (bool, int)

type IGoToLineRequested

type IGoToLineRequested interface {
	GoToLineOrTop(evk *tcell.EventKey) (bool, int)    // -1 means top
	GoToLineOrBottom(evk *tcell.EventKey) (bool, int) // -1 means bottom
	GoToFirst(gowid.IApp) bool
	GoToLast(gowid.IApp) bool
	GoToNth(gowid.IApp, int) bool
}

Jump to

Keyboard shortcuts

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