tracks

package
v0.0.0-...-e62810a Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlbumIconSize = gtk.IconSizeLarge
	PixelIconSize = 96
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	gtk.Stack

	Lists map[string]*TrackList // tree model
	// contains filtered or unexported fields
}

func NewContainer

func NewContainer(parent ParentController) *Container

func (*Container) DeletePlaylist

func (c *Container) DeletePlaylist(name string)

func (*Container) SelectPlaylist

func (c *Container) SelectPlaylist(playlist *state.Playlist) *TrackList

type ParentController

type ParentController interface {
	PlayTrack(p *state.Playlist, index int)
	SavePlaylist(p *state.Playlist)
	UpdateTracks(p *state.Playlist)
}

type TrackList

type TrackList struct {
	gtk.ScrolledWindow

	Tree   *gtk.TreeView
	Store  *gtk.ListStore
	Select *gtk.TreeSelection

	Playlist  *state.Playlist
	TrackRows map[*state.Track]*TrackRow
	// contains filtered or unexported fields
}

func NewTrackList

func NewTrackList(parent ParentController, pl *state.Playlist) *TrackList

func (*TrackList) SelectPlaying

func (list *TrackList) SelectPlaying()

func (*TrackList) SetPlaying

func (list *TrackList) SetPlaying(playing *state.Track)

SetPlaying unbolds the last track (if any) and bolds the given track. It does not trigger any callback.

func (*TrackList) SortSelected

func (list *TrackList) SortSelected()

SortSelected sorts the selected tracks.

type TrackPath

type TrackPath = string

type TrackRow

type TrackRow struct {
	Bold bool
	// contains filtered or unexported fields
}

func (*TrackRow) Iter

func (row *TrackRow) Iter() (*gtk.TreeIter, bool)

func (*TrackRow) Path

func (row *TrackRow) Path() *gtk.TreePath

func (*TrackRow) Remove

func (row *TrackRow) Remove() bool

func (*TrackRow) SetBold

func (row *TrackRow) SetBold(store *gtk.ListStore, bold bool)

Jump to

Keyboard shortcuts

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