bridge

package
v3.3.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 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
	Progress *util.ProgressBar
	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(window fyne.Window, 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) NewRecvItem

func (p *RecvList) NewRecvItem() *RecvItem

NewRecvItem creates a new send item and adds it to the items.

func (*RecvList) OnSelected

func (p *RecvList) OnSelected(i int)

OnSelected currently just makes sure that we don't persist selection.

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 *util.ProgressBar
	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(window fyne.Window, 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) *SendItem

NewSendItem adds data about a new send to the list and then returns the item.

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 currently just makes sure that we don't persist selection.

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