tui

package
v0.0.0-...-35efee3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(stor *storage.Storage)

Start запускає інтерфейс.

Types

type Content

type Content interface {
	GetName() string                          // ідентефікатор
	GetMenuName() string                      // пункт меню
	GetTitle() string                         // заголовок таблиці
	GetTable() *tview.Table                   // таблиця з даними
	GetCell(row, column int) *tview.TableCell // вміст комірки
	GetRowCount() int                         // кількість рядків
	GetColumnCount() int                      // кількість колонок
	GetKeybindingString() string              // опис клавіш дій
	NeedToSave() bool                         // потрібно збереження
	RereadTable()                             // оновлює таблицю
}

type Dialog

type Dialog interface {
	GetTitle() string              // заголовок
	GetPrimitive() tview.Primitive // контент
	GetBox() *tview.Box            // бокс
	SetOkFunc(func())              // натиснуто ОК
	SetCancelFunc(func())          // натиснуто відміна
}

type Tui

type Tui struct {
	// contains filtered or unexported fields
}

func (*Tui) Confirm

func (t *Tui) Confirm(text string, okFunc func())

Confirm запитує підтвердження і оновлює таблицю.

func (*Tui) ErrorShow

func (t *Tui) ErrorShow(err error)

ErrorShow виводе помилку.

func (*Tui) Message

func (t *Tui) Message(text string)

message виводе повідомлення.

func (*Tui) Stop

func (t *Tui) Stop()

Stop зупиняє інтерфейс.

Jump to

Keyboard shortcuts

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