Documentation ¶
Overview ¶
Package util contains various small helper functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeValidator ¶
CodeValidator provides a validator for wormhole codes.
func TeeReader ¶
func TeeReader(r io.Reader, p *ProgressBar) io.Reader
TeeReader returns a wrapped Reader that updates the progress bar.
func TeeReaderAt ¶
func TeeReaderAt(r io.ReaderAt, p *ProgressBar) io.ReaderAt
TeeReaderAt returns a wrapped ReaderAt that updates the progress bar.
func UserDownloadsFolder ¶
func UserDownloadsFolder() string
UserDownloadsFolder returns the downloads folder corresponding to the current user.
func WindowSizeToDialog ¶
func WindowSizeToDialog(s fyne.Size) fyne.Size
WindowSizeToDialog scales the window size to a suitable dialog size.
Types ¶
type ProgressBar ¶
type ProgressBar struct {
widget.ProgressBar
}
ProgressBar is contains a widget for displaying wormhole send progress.
func NewProgressBar ¶
func NewProgressBar() *ProgressBar
NewProgressBar creates a new fyne progress bar and update function for wormhole send.
func (*ProgressBar) Done ¶
func (p *ProgressBar) Done()
Done sets the value to max to indicate that it is finished.
func (*ProgressBar) Failed ¶
func (p *ProgressBar) Failed()
Failed sets the text to indicate a failure.
func (*ProgressBar) WithProgress ¶
func (p *ProgressBar) WithProgress() wormhole.SendOption
WithProgress returns a send option to update the progress.