tui

package
v0.0.0-...-645b8d8 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

Application is the entry point of TUI application.

func NewApplication

func NewApplication(store *task.Store) *Application

NewApplication initializes and returns a new Application.

func (*Application) SetOpenHandler

func (app *Application) SetOpenHandler(handler func(string))

SetOpenHandler sets a function to handle open event with file path.

func (*Application) Start

func (app *Application) Start() error

Start starts a TUI application.

func (*Application) StartAutoReload

func (app *Application) StartAutoReload(eventStream <-chan task.Event)

StartAutoReload starts a goroutine to reload TUI with tasks received from passed channel.

type Note

type Note struct {
	*tview.TextView
}

Note is the text view for note of task.

func NewNote

func NewNote() *Note

NewNote initializes and returns a new Note.

func (*Note) SetText

func (n *Note) SetText(text string)

SetText sets passed text into view.

type Table

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

Table is the table view to show tasks.

func NewTable

func NewTable() *Table

NewTable initializes and returns a new Table.

func (*Table) DrawTasks

func (t *Table) DrawTasks()

DrawTasks sets the content of tasks to cells and removes unused rows.

func (*Table) SetSelectedFunc

func (t *Table) SetSelectedFunc(f func(t task.Task))

SetSelectedFunc sets a function invoked with selected task when selection.

func (*Table) SetSelectionChangedFunc

func (t *Table) SetSelectionChangedFunc(f func(t task.Task))

SetSelectionChangedFunc sets a function invoked with selected task when selection is changed.

func (*Table) SetTask

func (t *Table) SetTask(newTask task.Task)

SetTask append passed task to internal tasks.

func (*Table) SortTasks

func (t *Table) SortTasks()

SortTasks sort tasks.

Jump to

Keyboard shortcuts

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