ui

package
v0.0.0-...-439fad6 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Menu struct {
	*tview.Box
	Items []menuItem
}

func NewMenu

func NewMenu() *Menu
func (m *Menu) AddItem(text string, shortcut tcell.Key, selected func()) *Menu
func (m *Menu) Clear() *Menu
func (m *Menu) Draw(screen tcell.Screen)

type UI

type UI struct {
	App            *tview.Application
	Manager        *manager.Manager
	OverviewLayout *tview.Grid
	Pages          *tview.Pages
	TaskLayout     *tview.Flex
	TaskList       *tview.List
	TaskInfo       *tview.TextView
	TaskFiles      *tview.TreeView
	CreateForm     *tview.Form
	DeleteModal    *tview.Modal
	ErrorModal     *tview.Modal
	Menu           *Menu
}

UI holds pointers to all relevant UI elements.

func NewUI

func NewUI() (ui *UI, err error)

NewUI creates a new UI object.

func (*UI) RunUI

func (ui *UI) RunUI() (err error)

RunUI is a wrapper that handles all the initialization tasks for the UI.

func (*UI) ShowError

func (ui *UI) ShowError(err error)

ShowError displays an error in the ErrorModal.

Jump to

Keyboard shortcuts

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