util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToSizeString

func BytesToSizeString(bytes int64) string

func ImageAspect

func ImageAspect(im image.Image) float32

func NewDebouncer

func NewDebouncer(dur time.Duration, callOnDone func()) func()

Debouncer returns a function that will call callOnDone when it has not been invoked since the last dur interval.

func NewRatingSubmenu

func NewRatingSubmenu(onSetRating func(int)) *fyne.MenuItem

func RichTextSegsFromHTMLString

func RichTextSegsFromHTMLString(s string) []widget.RichTextSegment

func SecondsToTimeString

func SecondsToTimeString(s float64) string

Types

type BitSet

type BitSet []uint64

BitSet is a set of bits that can be set, cleared and queried.

func (*BitSet) IsSet

func (s *BitSet) IsSet(i uint) bool

IsSet returns true if the given bit is set, false if it is cleared.

func (*BitSet) Set

func (s *BitSet) Set(i uint)

Set ensures that the given bit is set in the BitSet.

func (*BitSet) Unset

func (s *BitSet) Unset(i uint)

Unset ensures that the given bit is cleared (not set) in the BitSet.

type HSpace

type HSpace struct {
	widget.BaseWidget

	Width float32
}

func NewHSpace

func NewHSpace(w float32) *HSpace

func (*HSpace) CreateRenderer

func (h *HSpace) CreateRenderer() fyne.WidgetRenderer

func (*HSpace) MinSize

func (h *HSpace) MinSize() fyne.Size

type ListSelectionManager

type ListSelectionManager struct {
	// contains filtered or unexported fields
}

func NewListSelectionManager

func NewListSelectionManager(lenFn func() int) ListSelectionManager

func (*ListSelectionManager) AreAllSelected

func (l *ListSelectionManager) AreAllSelected() bool

func (*ListSelectionManager) GetSelection

func (l *ListSelectionManager) GetSelection() []int

func (*ListSelectionManager) IsSelected

func (l *ListSelectionManager) IsSelected(row int) bool

func (*ListSelectionManager) Select

func (l *ListSelectionManager) Select(row int)

If the given row is not selected, reset the selection and select only the given row.

func (*ListSelectionManager) SelectAddOrRemove

func (l *ListSelectionManager) SelectAddOrRemove(row int)

If it is not selected, add the given row to the selection. If it is selected, unselet it.

func (*ListSelectionManager) SelectAll

func (l *ListSelectionManager) SelectAll()

func (*ListSelectionManager) SelectRange

func (l *ListSelectionManager) SelectRange(row int)

Select a range between the given row and the furthest-down row that is currently selected (which may be above the given row) Note: this is modeled after what, as far as I can tell, is Gmail's selection behavior

func (*ListSelectionManager) UnselectAll

func (l *ListSelectionManager) UnselectAll()

Jump to

Keyboard shortcuts

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