widgets

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCenter added in v1.0.4

func NewCenter(width, height int, p tview.Primitive) tview.Primitive

NewCenter returns a new primitive which shows the provided primitive in its center, given the provided primitive's size.

Types

type ButtonBar added in v1.0.1

type ButtonBar struct {
	*tview.Grid
	// contains filtered or unexported fields
}

ButtonBar provides a horizontal bar to which buttons with actions can be added.

func NewButtonBar added in v1.0.1

func NewButtonBar() *ButtonBar

NewButtonBar factory function to create a new ButtonBar.

func (*ButtonBar) AddButton added in v1.0.1

func (bb *ButtonBar) AddButton(label string, action func()) *ButtonBar

AddButton a button with it's action to the ButtonBar.

func (*ButtonBar) ItemCount added in v1.0.1

func (bb *ButtonBar) ItemCount() int

ItemCount return the count of buttons in the ButtonBar.

type Editor

type Editor struct {
	*femto.View
	// contains filtered or unexported fields
}

Editor is a femto.View biased away from files a bit.

func NewEditor

func NewEditor() *Editor

NewEditor is factory function for Editor.

func (*Editor) String

func (editor *Editor) String() string

Implement fmt.Stringer

func (*Editor) Text

func (editor *Editor) Text(text string)

Text sets the text of the Editor as a string.

Jump to

Keyboard shortcuts

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