Documentation
¶
Overview ¶
Package header is the top bar that contains the logo, buttons, and the playlist name.
Index ¶
- type AppControls
- type Container
- func (c *Container) PlaylistName() string
- func (c *Container) RenamePlaylist(newName string)
- func (c *Container) Reset()
- func (c *Container) SaveCurrentPlaylist()
- func (c *Container) SetBitrate(bits float64)
- func (c *Container) SetPlaylist(pl *state.Playlist)
- func (c *Container) SetUnsaved(pl *state.Playlist)
- type ParentController
- type ParentPlaylistController
- type PlaylistControls
- type PlaylistInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppControls ¶
type AppControls struct { *gtk.Box OpenPlaylistButton *gtk.Button }
func NewAppControls ¶
func NewAppControls(parent ParentController) *AppControls
type Container ¶
type Container struct { gtk.HeaderBar ParentController Left *AppControls Info *PlaylistInfo RightSide *gtk.Box Bitrate *gtk.Label Right *PlaylistControls // contains filtered or unexported fields }
func NewContainer ¶
func NewContainer(parent ParentController) *Container
func (*Container) PlaylistName ¶
PlaylistName returns the current playlist, or an empty string if none.
func (*Container) RenamePlaylist ¶
RenamePlaylist calls the parent's RenamePlaylist with the current name.
func (*Container) SaveCurrentPlaylist ¶
func (c *Container) SaveCurrentPlaylist()
func (*Container) SetBitrate ¶
SetBitrate sets the bitrate to display. The indicator is empty if bits is less than 0.
func (*Container) SetPlaylist ¶
func (*Container) SetUnsaved ¶
SetUnsaved sets the header info to display the name as unchanged if the given playlist is indeed being displayed. It does nothing otherwise.
type ParentController ¶
type ParentPlaylistController ¶
type ParentPlaylistController interface { // RenamePlaylist renames the current playlist. RenamePlaylist(newName string) // HasPlaylist returns true if the playlist already exists with the given // name. HasPlaylist(name string) bool // PlaylistName gets the playlist name. PlaylistName() string // GoBack navigates the body leaflet to the left panel. GoBack() // SaveCurrentPlaylist saves the current playlist and marks the playlist // name as saved. SaveCurrentPlaylist() // SortSelectedTracks sorts the selected songs. SortSelectedTracks() }
type PlaylistControls ¶
type PlaylistControls struct { gtk.Revealer Hamburger *actions.MenuButton HamMenu *actions.Menu }
func NewPlaylistControls ¶
func NewPlaylistControls(parent ParentPlaylistController) *PlaylistControls
type PlaylistInfo ¶
type PlaylistInfo struct { gtk.Label // name Playlist string }
func NewPlaylistInfo ¶
func NewPlaylistInfo() *PlaylistInfo
func (*PlaylistInfo) Reset ¶
func (info *PlaylistInfo) Reset()
func (*PlaylistInfo) SetPlaylist ¶
func (info *PlaylistInfo) SetPlaylist(pl *state.Playlist)
func (*PlaylistInfo) SetUnsaved ¶
func (info *PlaylistInfo) SetUnsaved(unsaved bool)
Click to show internal directories.
Click to hide internal directories.