bridge

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package bridge serves as a bridge between the transport backend and the Fyne ui

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RecvItem

type RecvItem struct {
	URI    fyne.URI
	Status string
	Name   string
}

RecvItem is the item that is being received

type RecvList

type RecvList struct {
	widget.List

	Items []*RecvItem
	// contains filtered or unexported fields
}

RecvList is a list of progress bars that track send progress.

func NewRecvList

func NewRecvList(client *transport.Client) *RecvList

NewRecvList greates a list of progress bars.

func (*RecvList) CreateItem

func (p *RecvList) CreateItem() fyne.CanvasObject

CreateItem creates a new item in the list.

func (*RecvList) Length

func (p *RecvList) Length() int

Length returns the length of the data.

func (*RecvList) NewReceive

func (p *RecvList) NewReceive(code string)

NewReceive adds data about a new send to the list and then returns the channel to update the code.

func (*RecvList) OnSelected

func (p *RecvList) OnSelected(i int)

OnSelected handles removing items and stopping send (in the future)

func (*RecvList) RemoveItem

func (p *RecvList) RemoveItem(i int)

RemoveItem removes the item at the specified index.

func (*RecvList) UpdateItem

func (p *RecvList) UpdateItem(i int, item fyne.CanvasObject)

UpdateItem updates the data in the list.

type SendItem

type SendItem struct {
	URI      fyne.URI
	Progress *sendProgress
	Code     string
	Name     string
}

SendItem is the item that is being sent.

type SendList

type SendList struct {
	widget.List

	Items []*SendItem
	// contains filtered or unexported fields
}

SendList is a list of progress bars that track send progress.

func NewSendList

func NewSendList(client *transport.Client) *SendList

NewSendList greates a list of progress bars.

func (*SendList) CreateItem

func (p *SendList) CreateItem() fyne.CanvasObject

CreateItem creates a new item in the list.

func (*SendList) Length

func (p *SendList) Length() int

Length returns the length of the data.

func (*SendList) NewSendItem

func (p *SendList) NewSendItem(name string, uri fyne.URI)

NewSendItem adds data about a new send to the list and then returns the channel to update the code.

func (*SendList) OnDirSelect

func (p *SendList) OnDirSelect(dir fyne.ListableURI, err error)

OnDirSelect is intended to be passed as callback to a FolderOpen dialog.

func (*SendList) OnFileSelect

func (p *SendList) OnFileSelect(file fyne.URIReadCloser, err error)

OnFileSelect is intended to be passed as callback to a FileOpen dialog.

func (*SendList) OnSelected

func (p *SendList) OnSelected(i int)

OnSelected handles removing items and stopping send (in the future)

func (*SendList) RemoveItem

func (p *SendList) RemoveItem(i int)

RemoveItem removes the item at the specified index.

func (*SendList) SendText

func (p *SendList) SendText()

SendText sends new text.

func (*SendList) UpdateItem

func (p *SendList) UpdateItem(i int, item fyne.CanvasObject)

UpdateItem updates the data in the list.

Jump to

Keyboard shortcuts

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