Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bar ¶
type Bar struct {
// contains filtered or unexported fields
}
A Bar represents a bottom bar that holds containers such as SearchBar or StatusBar.
func New ¶
New returns a new Bar given its dependencies app, library and spinner instances and a read-only channel that delivers player's updates like play, stream, stop etc.
Returned Bar is suitable to be used for getting tview.Primitive that can be sent to tview's components for drawing to the screen. It is also used for switching between StatusBar and SearchBar.
func (*Bar) CurrentContainer ¶
CurrentContainer returns the name of a currently shown container.
func (*Bar) SearchContainer ¶
SearchContainer returns tview.Primitive for the Search Bar. It is a pointer to the tview InputField component that implements tview.Primitive.
func (*Bar) Show ¶
Show switches to a Bar component given its name as the input. It handles keyboard focus automatically based on Bar component type.
func (*Bar) StatusContainer ¶
StatusContainer returns tview.Primitive for the Status Bar. It is a pointer to the tview Grid component that implements tview.Primitive.
type SearchBar ¶
type SearchBar struct {
// contains filtered or unexported fields
}
A SearchBar is a Bar component that provides fuzzy search capability for artists. It is shown on Bar when called via the forward-slash keyboard key by default.
type StatusBar ¶
type StatusBar struct {
// contains filtered or unexported fields
}
A StatusBar is a Bar component that provides important player information such as network activity (net i/o), current volume, state of playback, artist and song names and currently shown page, such as library. StatusBar is permanently shown on Bar, meaning, all other components fall back to it after they are done with their work.