views

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeybindingView

type KeybindingView struct {
	*tview.Box
	Bindings []UIKeybinding
}

KeybindingView is a custom view for dispalying the keyboard bindings available to users

func (*KeybindingView) Draw

func (k *KeybindingView) Draw(screen tcell.Screen)

Draw draws the key bindings view on to the screen

type NowPlayingView

type NowPlayingView struct {
	*tview.Box
	Art     string
	Channel *components.ChannelItem
	Elapsed float64
	Track   components.Track
}

NowPlayingView is a custom view for dispalying the currently playing channel

func (*NowPlayingView) Draw

func (n *NowPlayingView) Draw(screen tcell.Screen)

Draw draws a NowPlayingView onto the scren

type StatusView

type StatusView struct {
	*tview.Box
	Message string
}

StatusView shows temporary status messages in the application

func (*StatusView) Draw

func (s *StatusView) Draw(screen tcell.Screen)

Draw draws a NowPlayingView onto the scren

type UIKeybinding

type UIKeybinding struct {
	Description string // a description of what the keybinding does
	Func        func() // the funcion to execute when the binding is pressed
	Shortcut    string // a keybinding to bind to this control
}

UIKeybinding is a helper struct for building a ControlsView

func GetKeybindings added in v1.3.16

func GetKeybindings() (bindings []UIKeybinding)

type ViewContext

type ViewContext struct {
	App          *tview.Application
	ChannelList  *tview.List
	FavoriteList *tview.List
	Keybindings  *KeybindingView
	NowPlaying   *NowPlayingView
	Status       *StatusView
}

ViewContext holds references to all the top-level UI elements in the application

func CreateViewContext

func CreateViewContext() *ViewContext

CreateViewContext creates the primary application view of di-tui

Jump to

Keyboard shortcuts

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