tui

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppWidgets

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

AppWidgets struct holds the widgets needed to run the app and manage the multiple behaviors supported. This is done this way, because some widgets make refernce to others when they get focused, clicked, etc. Besides, tview always returns pointers from its constructor functions.

type Tui

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

Tui struct is the main struct when it comes to manage the UI. It is composed by a pointer to a tview application and the database client responsible for making queries to the database. Tha last field is a AppWidgets instance, so every widget can be accessed through the Tui's reference.

func New

func New(c *client.Client) (*Tui, error)

New is a constructor that returns a pointer to a Tui struct. The functions starts the app, initializes an AppWidgets and runs the prepare function, responsible for setting up the whole app and its multiple behaviors.

func (*Tui) Run

func (t *Tui) Run() error

Jump to

Keyboard shortcuts

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