Documentation ¶
Index ¶
- func KeyBindingName(key tcell.Key) string
- func PackKeyBindingName(key tcell.Key, maxLength int) string
- func SecToString(sec int) string
- func SecToStringApproximate(sec int) string
- type Browser
- func (b *Browser) AddModal(modal Modal, height, width uint, lockSize bool)
- func (b *Browser) Blur()
- func (b *Browser) Draw(screen tcell.Screen)
- func (b *Browser) Focus(delegate func(p tview.Primitive))
- func (b *Browser) GetFocusable() tview.Focusable
- func (b *Browser) GetRect() (int, int, int, int)
- func (b *Browser) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (b *Browser) RemoveModal(modal Modal)
- func (b *Browser) SetRect(x, y, width, height int)
- type Help
- func (h *Help) Blur()
- func (h *Help) Draw(screen tcell.Screen)
- func (h *Help) Focus(delegate func(p tview.Primitive))
- func (h *Help) GetFocusable() tview.Focusable
- func (h *Help) GetRect() (int, int, int, int)
- func (h *Help) InputHandler() func(event *tcell.EventKey, setfocus func(p tview.Primitive))
- func (h *Help) SetDoneFunc(doneFunc func())
- func (h *Help) SetRect(x, y, width, height int)
- func (h *Help) SetVisible(visible bool)
- func (h *Help) View() tview.Primitive
- type List
- func (l *List) Blur()
- func (l *List) Clear()
- func (l *List) Draw(screen tcell.Screen)
- func (l *List) Focus(delegate func(p tview.Primitive))
- func (l *List) GetFocusable() tview.Focusable
- func (l *List) GetRect() (int, int, int, int)
- func (l *List) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (l *List) SelectedIndex() int
- func (l *List) SetData(items []models.Item)
- func (l *List) SetRect(x, y, width, height int)
- type Modal
- type NavBar
- func (n *NavBar) Blur()
- func (n *NavBar) Draw(screen tcell.Screen)
- func (n *NavBar) Focus(delegate func(p tview.Primitive))
- func (n *NavBar) GetFocusable() tview.Focusable
- func (n *NavBar) GetRect() (int, int, int, int)
- func (n *NavBar) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (n *NavBar) SetRect(x, y, width, height int)
- type ProgressBar
- type Queue
- func (q *Queue) Blur()
- func (q *Queue) Draw(screen tcell.Screen)
- func (q *Queue) Focus(delegate func(p tview.Primitive))
- func (q *Queue) GetFocusable() tview.Focusable
- func (q *Queue) GetRect() (int, int, int, int)
- func (q *Queue) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (q *Queue) SetDoneFunc(doneFunc func())
- func (q *Queue) SetRect(x, y, width, height int)
- func (q *Queue) SetVisible(visible bool)
- func (q *Queue) View() tview.Primitive
- type QueueMode
- type Search
- func (s *Search) Blur()
- func (s *Search) Draw(screen tcell.Screen)
- func (s *Search) Focus(delegate func(p tview.Primitive))
- func (s *Search) GetFocusable() tview.Focusable
- func (s *Search) GetRect() (int, int, int, int)
- func (s *Search) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (s *Search) SetDoneFunc(doneFunc func())
- func (s *Search) SetRect(x, y, width, height int)
- func (s *Search) SetVisible(visible bool)
- func (s *Search) View() tview.Primitive
- type Status
- func (s *Status) Blur()
- func (s *Status) Draw(screen tcell.Screen)
- func (s *Status) DrawButtons()
- func (s *Status) Focus(delegate func(p tview.Primitive))
- func (s *Status) GetFocusable() tview.Focusable
- func (s *Status) GetRect() (int, int, int, int)
- func (s *Status) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (s *Status) SetRect(x, y, width, height int)
- func (s *Status) UpdateState(state player.PlayingState, song *models.SongInfo)
- func (s *Status) WriteStatus(screen tcell.Screen, x, y int)
- type ViewModal
- func (v *ViewModal) Blur()
- func (v *ViewModal) Draw(screen tcell.Screen)
- func (v *ViewModal) Focus(delegate func(p tview.Primitive))
- func (v *ViewModal) GetFocusable() tview.Focusable
- func (v *ViewModal) GetRect() (int, int, int, int)
- func (v *ViewModal) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (v *ViewModal) SetDoneFunc(doneFunc func())
- func (v *ViewModal) SetRect(x, y, width, height int)
- func (v *ViewModal) SetViewFunc(viewFunc func(view controller.View))
- func (v *ViewModal) SetVisible(visible bool)
- func (v *ViewModal) View() tview.Primitive
- type Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyBindingName ¶
ShortCutName returns name for given key
func PackKeyBindingName ¶
PackKeyBindingName returns shorter for given key Maxlength controls maximum length for text. If 0, disable limiting 'F6' -> F6 'Ctrl+Space' -> 'C-sp'
func SecToString ¶
Print seconds as formatted time: 50, 1:50, 0:05, 1.05, 1:05:05
Types ¶
type Browser ¶
type Browser struct {
// contains filtered or unexported fields
}
Browser is a listR-like viewer user can navigate content with
func NewBrowser ¶
func NewBrowser(controller controller.MediaController) *Browser
func (*Browser) AddModal ¶
AddModal adds modal to center of browser
func (*Browser) InputHandler ¶
type Help ¶
type Help struct {
// contains filtered or unexported fields
}
func (*Help) InputHandler ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
func (*List) InputHandler ¶
func (*List) SelectedIndex ¶
SelectedIndex returns currently selected index
type Modal ¶
type Modal interface { SetDoneFunc(doneFunc func()) tview.Primitive View() tview.Primitive SetVisible(visible bool) }
Modal creates a modal that overlaps other views and get's destroyed when it's ready
type NavBar ¶
type NavBar struct {
// contains filtered or unexported fields
}
func (*NavBar) InputHandler ¶
type ProgressBar ¶
func NewProgressBar ¶
func NewProgressBar(width int, maxValue int) ProgressBar
NewProgressBar creates new progress bar with given character width
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue show list of songs played or songs to be played
func (*Queue) InputHandler ¶
type Search ¶
type Search struct {
// contains filtered or unexported fields
}
func (*Search) InputHandler ¶
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
func (*Status) InputHandler ¶
type ViewModal ¶
type ViewModal struct {
// contains filtered or unexported fields
}
func (*ViewModal) InputHandler ¶
func (*ViewModal) SetViewFunc ¶
func (v *ViewModal) SetViewFunc(viewFunc func(view controller.View))
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
func NewWindow ¶
func NewWindow(mc controller.MediaController) Window
Click to show internal directories.
Click to hide internal directories.