Documentation ¶
Index ¶
- Constants
- func ColNumber(colName string) int
- func NewClearTextButton(onTapped func()) *clearTextButton
- func NewLabelMinSize(text string, minWidth float32) *labelMinSize
- func NewVolumeSlider(width float32) *volumeSlider
- type AlbumFilterButton
- type AlbumFilterPopup
- type AuxControls
- type BatchingIterator
- type CharAllowedFunc
- type CustomHyperlink
- func (c *CustomHyperlink) CreateRenderer() fyne.WidgetRenderer
- func (c *CustomHyperlink) MinSize() fyne.Size
- func (c *CustomHyperlink) Refresh()
- func (c *CustomHyperlink) Resize(size fyne.Size)
- func (c *CustomHyperlink) SetText(text string)
- func (c *CustomHyperlink) SetTextStyle(style fyne.TextStyle)
- type FavoriteButton
- type GenreFilterSubsection
- type GridView
- func (g *GridView) Clear()
- func (g *GridView) CreateRenderer() fyne.WidgetRenderer
- func (g *GridView) GetScrollOffset() float32
- func (g *GridView) Reset(iter GridViewIterator)
- func (g *GridView) ResetFixed(items []GridViewItemModel)
- func (g *GridView) ResetFromState(state *GridViewState)
- func (g *GridView) SaveToState() *GridViewState
- func (g *GridView) ScrollToOffset(offs float32)
- type GridViewItem
- type GridViewItemModel
- type GridViewIterator
- type GridViewState
- type ImageFetcher
- type ImagePlaceholder
- func (i *ImagePlaceholder) CreateRenderer() fyne.WidgetRenderer
- func (i *ImagePlaceholder) HaveImage() bool
- func (i *ImagePlaceholder) Image() image.Image
- func (i *ImagePlaceholder) MinSize() fyne.Size
- func (i *ImagePlaceholder) Refresh()
- func (i *ImagePlaceholder) SetImage(img image.Image, tappable bool)
- type ListColumn
- type ListHeader
- type ListHeaderSort
- type ListRowBase
- type NowPlayingCard
- func (n *NowPlayingCard) CreateRenderer() fyne.WidgetRenderer
- func (n *NowPlayingCard) OnAlbumNameTapped(f func())
- func (n *NowPlayingCard) OnArtistNameTapped(f func())
- func (n *NowPlayingCard) OnTrackNameTapped(f func())
- func (n *NowPlayingCard) Update(track, artist string, artistNavigable bool, album string, cover image.Image)
- type PlayerControls
- func (p *PlayerControls) CreateRenderer() fyne.WidgetRenderer
- func (pc *PlayerControls) OnPlayPause(f func())
- func (pc *PlayerControls) OnSeek(f func(float64))
- func (pc *PlayerControls) OnSeekNext(f func())
- func (pc *PlayerControls) OnSeekPrevious(f func())
- func (pc *PlayerControls) SetPlaying(playing bool)
- func (pc *PlayerControls) UpdatePlayTime(curTime, totalTime float64)
- type SearchEntry
- type SortType
- type StarRating
- func (s *StarRating) CreateRenderer() fyne.WidgetRenderer
- func (s *StarRating) MinSize() fyne.Size
- func (s *StarRating) MouseIn(e *desktop.MouseEvent)
- func (s *StarRating) MouseMoved(e *desktop.MouseEvent)
- func (s *StarRating) MouseOut()
- func (s *StarRating) Refresh()
- func (s *StarRating) Tapped(*fyne.PointEvent)
- type TappableIcon
- type TappableImage
- func (t *TappableImage) CreateRenderer() fyne.WidgetRenderer
- func (t *TappableImage) Cursor() desktop.Cursor
- func (t *TappableImage) Hide()
- func (t *TappableImage) MinSize() fyne.Size
- func (t *TappableImage) Move(pos fyne.Position)
- func (t *TappableImage) Refresh()
- func (t *TappableImage) Resize(size fyne.Size)
- func (t *TappableImage) Show()
- func (t *TappableImage) Tapped(e *fyne.PointEvent)
- func (t *TappableImage) TappedSecondary(e *fyne.PointEvent)
- type TextRestrictedEntry
- type ToggleButtonGroup
- type ToggleText
- type TrackPosSlider
- type TrackRow
- type Tracklist
- func (t *Tracklist) AppendTracks(trs []*mediaprovider.Track)
- func (t *Tracklist) Clear()
- func (t *Tracklist) CreateRenderer() fyne.WidgetRenderer
- func (t *Tracklist) GetTracks() []*mediaprovider.Track
- func (t *Tracklist) IncrementPlayCount(trackID string)
- func (t *Tracklist) Refresh()
- func (t *Tracklist) Reset()
- func (t *Tracklist) SelectAll()
- func (t *Tracklist) SelectAndScrollToTrack(trackID string)
- func (t *Tracklist) SelectedTrackIDs() []string
- func (t *Tracklist) SetNowPlaying(trackID string)
- func (t *Tracklist) SetSorting(sorting TracklistSort)
- func (t *Tracklist) SetTracks(trs []*mediaprovider.Track)
- func (t *Tracklist) SetVisibleColumns(cols []string)
- func (t *Tracklist) Sorting() TracklistSort
- func (t *Tracklist) Tapped(*fyne.PointEvent)
- func (t *Tracklist) TrackAt(idx int) *mediaprovider.Track
- func (t *Tracklist) UnselectAll()
- func (t *Tracklist) VisibleColumns() []string
- type TracklistLoader
- type TracklistOptions
- type TracklistSort
- type VolumeControl
Constants ¶
const ( ColumnNum = "Num" ColumnTitle = "Title" ColumnArtist = "Artist" ColumnAlbum = "Album" ColumnTime = "Time" ColumnYear = "Year" ColumnFavorite = "Favorite" ColumnRating = "Rating" ColumnPlays = "Plays" ColumnBitrate = "Bitrate" ColumnSize = "Size" ColumnPath = "Path" )
Variables ¶
This section is empty.
Functions ¶
func NewClearTextButton ¶
func NewClearTextButton(onTapped func()) *clearTextButton
func NewLabelMinSize ¶
func NewVolumeSlider ¶
func NewVolumeSlider(width float32) *volumeSlider
Types ¶
type AlbumFilterButton ¶
type AlbumFilterButton struct { widget.Button OnChanged func() GenreDisabled bool FavoriteDisabled bool // contains filtered or unexported fields }
func NewAlbumFilterButton ¶
func NewAlbumFilterButton(filter *mediaprovider.AlbumFilter, fetchGenresFunc func() ([]*mediaprovider.Genre, error)) *AlbumFilterButton
func (*AlbumFilterButton) Refresh ¶
func (a *AlbumFilterButton) Refresh()
type AlbumFilterPopup ¶
type AlbumFilterPopup struct { widget.BaseWidget OnChanged func() // contains filtered or unexported fields }
func NewAlbumFilterPopup ¶
func NewAlbumFilterPopup(filter *AlbumFilterButton) *AlbumFilterPopup
func (*AlbumFilterPopup) CreateRenderer ¶
func (a *AlbumFilterPopup) CreateRenderer() fyne.WidgetRenderer
func (*AlbumFilterPopup) Refresh ¶
func (a *AlbumFilterPopup) Refresh()
func (*AlbumFilterPopup) Tapped ¶
func (a *AlbumFilterPopup) Tapped(_ *fyne.PointEvent)
type AuxControls ¶
type AuxControls struct { widget.BaseWidget VolumeControl *VolumeControl // contains filtered or unexported fields }
The "aux" controls for playback, positioned to the right of the BottomPanel. Currently only volume control.
func NewAuxControls ¶
func NewAuxControls(initialVolume int) *AuxControls
func (*AuxControls) CreateRenderer ¶
func (a *AuxControls) CreateRenderer() fyne.WidgetRenderer
func (*AuxControls) OnChangeLoopMode ¶ added in v0.4.0
func (a *AuxControls) OnChangeLoopMode(f func())
func (*AuxControls) SetLoopMode ¶ added in v0.4.0
func (a *AuxControls) SetLoopMode(mode backend.LoopMode)
type BatchingIterator ¶
type BatchingIterator struct {
// contains filtered or unexported fields
}
func NewBatchingIterator ¶
func NewBatchingIterator(iter mediaprovider.AlbumIterator) BatchingIterator
func (*BatchingIterator) NextN ¶
func (b *BatchingIterator) NextN(n int) []*mediaprovider.Album
type CustomHyperlink ¶
type CustomHyperlink struct { widget.BaseWidget OnTapped func() NoTruncate bool Disabled bool // contains filtered or unexported fields }
func NewCustomHyperlink ¶
func NewCustomHyperlink() *CustomHyperlink
func (*CustomHyperlink) CreateRenderer ¶
func (c *CustomHyperlink) CreateRenderer() fyne.WidgetRenderer
func (*CustomHyperlink) MinSize ¶
func (c *CustomHyperlink) MinSize() fyne.Size
func (*CustomHyperlink) Refresh ¶
func (c *CustomHyperlink) Refresh()
func (*CustomHyperlink) Resize ¶
func (c *CustomHyperlink) Resize(size fyne.Size)
func (*CustomHyperlink) SetText ¶
func (c *CustomHyperlink) SetText(text string)
func (*CustomHyperlink) SetTextStyle ¶
func (c *CustomHyperlink) SetTextStyle(style fyne.TextStyle)
type FavoriteButton ¶
func NewFavoriteButton ¶
func NewFavoriteButton(onTapped func()) *FavoriteButton
func (*FavoriteButton) Refresh ¶
func (f *FavoriteButton) Refresh()
func (*FavoriteButton) Tapped ¶
func (f *FavoriteButton) Tapped(e *fyne.PointEvent)
type GenreFilterSubsection ¶
type GenreFilterSubsection struct { widget.BaseWidget // contains filtered or unexported fields }
func NewGenreFilterSubsection ¶
func NewGenreFilterSubsection(onChanged func([]string), initialSelectedGenres []string) *GenreFilterSubsection
func (*GenreFilterSubsection) CreateRenderer ¶
func (g *GenreFilterSubsection) CreateRenderer() fyne.WidgetRenderer
func (*GenreFilterSubsection) MinSize ¶
func (g *GenreFilterSubsection) MinSize() fyne.Size
func (*GenreFilterSubsection) SetGenreList ¶
func (g *GenreFilterSubsection) SetGenreList(genres []string)
type GridView ¶
type GridView struct { widget.BaseWidget GridViewState // contains filtered or unexported fields }
func NewFixedGridView ¶
func NewFixedGridView(items []GridViewItemModel, fetch ImageFetcher, placeholder fyne.Resource) *GridView
func NewGridView ¶
func NewGridView(iter GridViewIterator, fetch ImageFetcher, placeholder fyne.Resource) *GridView
func NewGridViewFromState ¶
func NewGridViewFromState(state *GridViewState) *GridView
func (*GridView) CreateRenderer ¶
func (g *GridView) CreateRenderer() fyne.WidgetRenderer
func (*GridView) GetScrollOffset ¶
func (*GridView) Reset ¶
func (g *GridView) Reset(iter GridViewIterator)
func (*GridView) ResetFixed ¶
func (g *GridView) ResetFixed(items []GridViewItemModel)
func (*GridView) ResetFromState ¶ added in v0.5.0
func (g *GridView) ResetFromState(state *GridViewState)
func (*GridView) SaveToState ¶
func (g *GridView) SaveToState() *GridViewState
func (*GridView) ScrollToOffset ¶
type GridViewItem ¶
type GridViewItem struct { widget.BaseWidget // updated by GridView Cover *coverImage // these fields are used by GridView to track async update tasks PrevID string ImgLoadCancel context.CancelFunc OnPlay func() OnShowContextMenu func(fyne.Position) OnShowItemPage func() OnShowSecondaryPage func() // contains filtered or unexported fields }
func NewGridViewItem ¶
func NewGridViewItem(placeholderResource fyne.Resource) *GridViewItem
func (*GridViewItem) CreateRenderer ¶
func (g *GridViewItem) CreateRenderer() fyne.WidgetRenderer
func (*GridViewItem) ItemID ¶
func (g *GridViewItem) ItemID() string
func (*GridViewItem) Refresh ¶ added in v0.5.0
func (g *GridViewItem) Refresh()
func (*GridViewItem) SecondaryID ¶
func (g *GridViewItem) SecondaryID() string
func (*GridViewItem) Update ¶
func (g *GridViewItem) Update(model GridViewItemModel)
type GridViewItemModel ¶
type GridViewIterator ¶
type GridViewIterator interface {
NextN(int) []GridViewItemModel
}
func NewGridViewAlbumIterator ¶
func NewGridViewAlbumIterator(iter mediaprovider.AlbumIterator) GridViewIterator
type GridViewState ¶
type ImageFetcher ¶
type ImagePlaceholder ¶
type ImagePlaceholder struct { ScaleMode canvas.ImageScale CenterIcon fyne.Resource widget.BaseWidget OnTapped func(*fyne.PointEvent) OnTappedSecondary func(*fyne.PointEvent) // contains filtered or unexported fields }
A widget that can display an image or else a placeholder with a rectangular border frame and an icon positioned in the center of the frame.
func NewImagePlaceholder ¶
func NewImagePlaceholder(centerIcon fyne.Resource, minSize float32) *ImagePlaceholder
func (*ImagePlaceholder) CreateRenderer ¶
func (i *ImagePlaceholder) CreateRenderer() fyne.WidgetRenderer
func (*ImagePlaceholder) HaveImage ¶
func (i *ImagePlaceholder) HaveImage() bool
func (*ImagePlaceholder) Image ¶
func (i *ImagePlaceholder) Image() image.Image
func (*ImagePlaceholder) MinSize ¶
func (i *ImagePlaceholder) MinSize() fyne.Size
func (*ImagePlaceholder) Refresh ¶
func (i *ImagePlaceholder) Refresh()
type ListColumn ¶
type ListHeader ¶
type ListHeader struct { widget.BaseWidget DisableSorting bool OnColumnSortChanged func(ListHeaderSort) OnColumnVisibilityChanged func(int, bool) OnColumnVisibilityMenuShown func(*widget.PopUp) // contains filtered or unexported fields }
func NewListHeader ¶
func NewListHeader(cols []ListColumn, layout *layouts.ColumnsLayout) *ListHeader
func (*ListHeader) CreateRenderer ¶
func (l *ListHeader) CreateRenderer() fyne.WidgetRenderer
func (*ListHeader) SetColumnVisible ¶
func (l *ListHeader) SetColumnVisible(colNum int, visible bool)
func (*ListHeader) SetSorting ¶
func (l *ListHeader) SetSorting(sort ListHeaderSort)
Sets the sorting for the ListHeader. Will invoke OnColumnSortChanged if set.
func (*ListHeader) TappedSecondary ¶
func (l *ListHeader) TappedSecondary(e *fyne.PointEvent)
type ListHeaderSort ¶
type ListRowBase ¶
type ListRowBase struct { widget.BaseWidget Content fyne.CanvasObject Selected bool Focused bool OnTapped func() OnDoubleTapped func() // contains filtered or unexported fields }
Base type used for all list rows in widgets such as Tracklist, etc.
func (*ListRowBase) CreateRenderer ¶
func (l *ListRowBase) CreateRenderer() fyne.WidgetRenderer
func (*ListRowBase) FocusGained ¶
func (l *ListRowBase) FocusGained()
func (*ListRowBase) FocusLost ¶
func (l *ListRowBase) FocusLost()
func (*ListRowBase) Refresh ¶
func (l *ListRowBase) Refresh()
func (*ListRowBase) Tapped ¶
func (l *ListRowBase) Tapped(*fyne.PointEvent)
We implement our own double tapping so that the Tapped behavior can be triggered instantly.
func (*ListRowBase) TypedKey ¶
func (l *ListRowBase) TypedKey(e *fyne.KeyEvent)
func (*ListRowBase) TypedRune ¶
func (l *ListRowBase) TypedRune(r rune)
type NowPlayingCard ¶
type NowPlayingCard struct { widget.BaseWidget OnShowCoverImage func() OnSetRating func(rating int) OnSetFavorite func(favorite bool) OnAddToPlaylist func() // contains filtered or unexported fields }
Shows the current album art, track name, artist name, and album name for the currently playing track. Placed into the left side of the BottomPanel.
func NewNowPlayingCard ¶
func NewNowPlayingCard() *NowPlayingCard
func (*NowPlayingCard) CreateRenderer ¶
func (n *NowPlayingCard) CreateRenderer() fyne.WidgetRenderer
func (*NowPlayingCard) OnAlbumNameTapped ¶
func (n *NowPlayingCard) OnAlbumNameTapped(f func())
func (*NowPlayingCard) OnArtistNameTapped ¶
func (n *NowPlayingCard) OnArtistNameTapped(f func())
func (*NowPlayingCard) OnTrackNameTapped ¶
func (n *NowPlayingCard) OnTrackNameTapped(f func())
type PlayerControls ¶
type PlayerControls struct { widget.BaseWidget // contains filtered or unexported fields }
func NewPlayerControls ¶
func NewPlayerControls() *PlayerControls
NewPlayerControls sets up the seek bar, and transport buttons.
func (*PlayerControls) CreateRenderer ¶
func (p *PlayerControls) CreateRenderer() fyne.WidgetRenderer
func (*PlayerControls) OnPlayPause ¶
func (pc *PlayerControls) OnPlayPause(f func())
func (*PlayerControls) OnSeek ¶
func (pc *PlayerControls) OnSeek(f func(float64))
func (*PlayerControls) OnSeekNext ¶
func (pc *PlayerControls) OnSeekNext(f func())
func (*PlayerControls) OnSeekPrevious ¶
func (pc *PlayerControls) OnSeekPrevious(f func())
func (*PlayerControls) SetPlaying ¶
func (pc *PlayerControls) SetPlaying(playing bool)
func (*PlayerControls) UpdatePlayTime ¶
func (pc *PlayerControls) UpdatePlayTime(curTime, totalTime float64)
type SearchEntry ¶
SearchEntry is a search entry widget that will issue a search command (aka call OnSearched) when a short span of time has elapsed since the user typed into the widget.
func NewSearchEntry ¶
func NewSearchEntry() *SearchEntry
func (*SearchEntry) MinSize ¶
func (s *SearchEntry) MinSize() fyne.Size
func (*SearchEntry) Refresh ¶
func (s *SearchEntry) Refresh()
type StarRating ¶
type StarRating struct { widget.BaseWidget Rating int StarSize float32 OnRatingChanged func(int) // contains filtered or unexported fields }
func NewStarRating ¶
func NewStarRating() *StarRating
func (*StarRating) CreateRenderer ¶
func (s *StarRating) CreateRenderer() fyne.WidgetRenderer
func (*StarRating) MinSize ¶
func (s *StarRating) MinSize() fyne.Size
func (*StarRating) MouseIn ¶
func (s *StarRating) MouseIn(e *desktop.MouseEvent)
func (*StarRating) MouseMoved ¶
func (s *StarRating) MouseMoved(e *desktop.MouseEvent)
func (*StarRating) MouseOut ¶
func (s *StarRating) MouseOut()
func (*StarRating) Refresh ¶
func (s *StarRating) Refresh()
func (*StarRating) Tapped ¶
func (s *StarRating) Tapped(*fyne.PointEvent)
type TappableIcon ¶
TappableIcon is a tappable wrapper of widget.Icon
func NewTappableIcon ¶ added in v0.4.0
func NewTappableIcon(res fyne.Resource) *TappableIcon
func (*TappableIcon) Cursor ¶
func (t *TappableIcon) Cursor() desktop.Cursor
func (*TappableIcon) MouseIn ¶
func (t *TappableIcon) MouseIn(*desktop.MouseEvent)
func (*TappableIcon) MouseMoved ¶
func (t *TappableIcon) MouseMoved(*desktop.MouseEvent)
func (*TappableIcon) MouseOut ¶
func (t *TappableIcon) MouseOut()
func (*TappableIcon) Tapped ¶
func (t *TappableIcon) Tapped(_ *fyne.PointEvent)
func (*TappableIcon) TappedSecondary ¶
func (t *TappableIcon) TappedSecondary(_ *fyne.PointEvent)
type TappableImage ¶
type TappableImage struct { widget.BaseWidget canvas.Image DisableTapping bool OnTapped func(*fyne.PointEvent) OnTappedSecondary func(*fyne.PointEvent) }
TappableImage is a tappable wrapper of canvas.Image
func NewTappableImage ¶
func NewTappableImage(onTapped func(*fyne.PointEvent)) *TappableImage
func (*TappableImage) CreateRenderer ¶
func (t *TappableImage) CreateRenderer() fyne.WidgetRenderer
func (*TappableImage) Cursor ¶
func (t *TappableImage) Cursor() desktop.Cursor
func (*TappableImage) Hide ¶
func (t *TappableImage) Hide()
func (*TappableImage) MinSize ¶ added in v0.5.0
func (t *TappableImage) MinSize() fyne.Size
func (*TappableImage) Move ¶
func (t *TappableImage) Move(pos fyne.Position)
func (*TappableImage) Refresh ¶
func (t *TappableImage) Refresh()
func (*TappableImage) Resize ¶
func (t *TappableImage) Resize(size fyne.Size)
func (*TappableImage) Show ¶
func (t *TappableImage) Show()
func (*TappableImage) Tapped ¶
func (t *TappableImage) Tapped(e *fyne.PointEvent)
func (*TappableImage) TappedSecondary ¶
func (t *TappableImage) TappedSecondary(e *fyne.PointEvent)
type TextRestrictedEntry ¶
A widget.Entry that allows restrictions on the text that can be typed into it, based on a charAllowed callback.
func NewTextRestrictedEntry ¶
func NewTextRestrictedEntry(charAllowed CharAllowedFunc) *TextRestrictedEntry
func (*TextRestrictedEntry) MinSize ¶
func (e *TextRestrictedEntry) MinSize() fyne.Size
func (*TextRestrictedEntry) SetMinCharWidth ¶
func (e *TextRestrictedEntry) SetMinCharWidth(numChars int)
func (*TextRestrictedEntry) TypedRune ¶
func (e *TextRestrictedEntry) TypedRune(r rune)
func (*TextRestrictedEntry) TypedShortcut ¶
func (e *TextRestrictedEntry) TypedShortcut(s fyne.Shortcut)
type ToggleButtonGroup ¶
type ToggleButtonGroup struct { widget.BaseWidget // contains filtered or unexported fields }
Lays out multiple buttons horizontally with no padding, and uses button.Importance to highlight exactly one which is "active". Similar to a segmented control in other UI toolkits.
func NewToggleButtonGroup ¶
func NewToggleButtonGroup(activatedBtnIdx int, buttons ...*widget.Button) *ToggleButtonGroup
func (*ToggleButtonGroup) ActivatedButtonIndex ¶
func (t *ToggleButtonGroup) ActivatedButtonIndex() int
func (*ToggleButtonGroup) CreateRenderer ¶
func (t *ToggleButtonGroup) CreateRenderer() fyne.WidgetRenderer
func (*ToggleButtonGroup) SetActivatedButton ¶
func (t *ToggleButtonGroup) SetActivatedButton(idx int)
type ToggleText ¶
type ToggleText struct { widget.BaseWidget OnChanged func(int) // contains filtered or unexported fields }
Similar to widgets.ToggleButtonGroup, but using text. The "active" label is bolded non-interactive text, while all the others are hyperlinks.
func NewToggleText ¶
func NewToggleText(activeLblIdx int, labels []string) *ToggleText
func (*ToggleText) CreateRenderer ¶
func (t *ToggleText) CreateRenderer() fyne.WidgetRenderer
func (*ToggleText) SetActivatedLabel ¶
func (t *ToggleText) SetActivatedLabel(idx int)
type TrackPosSlider ¶
type TrackPosSlider struct { widget.Slider OnDragEnd func(float64) // contains filtered or unexported fields }
TrackPosSlider is a custom slider that doesn't trigger the seek action until drag end.
func NewTrackPosSlider ¶
func NewTrackPosSlider() *TrackPosSlider
func (*TrackPosSlider) DragEnd ¶
func (t *TrackPosSlider) DragEnd()
func (*TrackPosSlider) Dragged ¶
func (t *TrackPosSlider) Dragged(e *fyne.DragEvent)
func (*TrackPosSlider) IsDragging ¶
func (t *TrackPosSlider) IsDragging() bool
func (*TrackPosSlider) Tapped ¶
func (t *TrackPosSlider) Tapped(e *fyne.PointEvent)
This code will be OBSOLETE in Fyne 2.4 which will natively add Tappable behavior to slider Tapped is called when a pointer tapped event is captured.
Since: 2.4
type TrackRow ¶
type TrackRow struct { ListRowBase OnTappedSecondary func(e *fyne.PointEvent, trackIdx int) // contains filtered or unexported fields }
func NewTrackRow ¶
func (*TrackRow) TappedSecondary ¶
func (t *TrackRow) TappedSecondary(e *fyne.PointEvent)
type Tracklist ¶
type Tracklist struct { widget.BaseWidget Options TracklistOptions // user action callbacks OnPlayTrackAt func(int) OnPlaySelection func(tracks []*mediaprovider.Track, shuffle bool) OnAddToQueue func(trackIDs []*mediaprovider.Track) OnAddToPlaylist func(trackIDs []string) OnSetFavorite func(trackIDs []string, fav bool) OnSetRating func(trackIDs []string, rating int) OnDownload func(tracks []*mediaprovider.Track, downloadName string) OnShowArtistPage func(artistID string) OnShowAlbumPage func(albumID string) OnColumnVisibilityMenuShown func(*widget.PopUp) OnVisibleColumnsChanged func([]string) OnTrackShown func(tracknum int) // contains filtered or unexported fields }
func NewTracklist ¶
func NewTracklist(tracks []*mediaprovider.Track) *Tracklist
func (*Tracklist) AppendTracks ¶
func (t *Tracklist) AppendTracks(trs []*mediaprovider.Track)
Append more tracks to the tracklist. Does not issue Refresh call. Thread-safe.
func (*Tracklist) Clear ¶
func (t *Tracklist) Clear()
Remove all tracks from the tracklist. Does not issue Refresh call. Thread-safe.
func (*Tracklist) CreateRenderer ¶
func (t *Tracklist) CreateRenderer() fyne.WidgetRenderer
func (*Tracklist) GetTracks ¶
func (t *Tracklist) GetTracks() []*mediaprovider.Track
Returns the tracks in the tracklist in the current display order.
func (*Tracklist) IncrementPlayCount ¶
func (*Tracklist) SelectAndScrollToTrack ¶
func (*Tracklist) SelectedTrackIDs ¶
func (*Tracklist) SetNowPlaying ¶
func (*Tracklist) SetSorting ¶
func (t *Tracklist) SetSorting(sorting TracklistSort)
func (*Tracklist) SetTracks ¶
func (t *Tracklist) SetTracks(trs []*mediaprovider.Track)
Sets the tracks in the tracklist. Does not issue Refresh call. Thread-safe.
func (*Tracklist) SetVisibleColumns ¶
func (*Tracklist) Sorting ¶
func (t *Tracklist) Sorting() TracklistSort
func (*Tracklist) Tapped ¶ added in v0.3.1
func (t *Tracklist) Tapped(*fyne.PointEvent)
do nothing Tapped handler so that tapping the separator between rows doesn't fall through to the page (which calls UnselectAll on tracklist)
func (*Tracklist) TrackAt ¶
func (t *Tracklist) TrackAt(idx int) *mediaprovider.Track
Gets the track at the given index. Thread-safe.
func (*Tracklist) UnselectAll ¶
func (t *Tracklist) UnselectAll()
func (*Tracklist) VisibleColumns ¶
type TracklistLoader ¶
type TracklistLoader struct {
// contains filtered or unexported fields
}
Component that manages lazily loading more tracks into a Tracklist as the user scrolls near the bottom.
func NewTracklistLoader ¶
func NewTracklistLoader(tracklist *Tracklist, iter mediaprovider.TrackIterator) TracklistLoader
func (*TracklistLoader) Dispose ¶ added in v0.5.0
func (t *TracklistLoader) Dispose()
Cancels all asynchronous loads so that they will no longer modify the tracklist.
type TracklistOptions ¶ added in v0.5.0
type TracklistOptions struct { // AutoNumber sets whether to auto-number the tracks 1..N in display order, // or to use the number from the track's metadata AutoNumber bool // ShowDiscNumber sets whether to display the disc number as part of the '#' column, // (with format %d.%02d). Only applies if AutoNumber==false. ShowDiscNumber bool // AuxiliaryMenuItems sets additional menu items appended to the context menu // must be set before the context menu is shown for the first time AuxiliaryMenuItems []*fyne.MenuItem // DisablePlaybackMenu sets whether to disable playback options in // the tracklist context menu. DisablePlaybackMenu bool // Disables sorting the tracklist by clicking individual columns. DisableSorting bool }
type TracklistSort ¶
type VolumeControl ¶
type VolumeControl struct { widget.BaseWidget OnSetVolume func(int) // contains filtered or unexported fields }
func NewVolumeControl ¶
func NewVolumeControl(initialVol int) *VolumeControl
func (*VolumeControl) CreateRenderer ¶
func (v *VolumeControl) CreateRenderer() fyne.WidgetRenderer
func (*VolumeControl) SetVolume ¶
func (v *VolumeControl) SetVolume(vol int)
Sets the volume that is displayed in the slider. Does not invoke OnSetVolume callback.
Source Files ¶
- albumfilterbutton.go
- auxcontrols.go
- customhyperlink.go
- favoritebutton.go
- gridview.go
- gridviewitem.go
- imageplaceholder.go
- listheader.go
- listrowbase.go
- nowplayingcard.go
- playercontrols.go
- searchentry.go
- starrating.go
- tappablewrappers.go
- textrestrictedentry.go
- togglebuttongroup.go
- toggletext.go
- tracklist.go
- tracklistloader.go