dwidget

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 14 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelColor

func LabelColor(c *fyne.Container) *fyne.Container

Top label background used on dApp tabs

func NewCanvasText added in v0.10.1

func NewCanvasText(text string, size float32, align fyne.TextAlign) (canv *canvas.Text)

Create a new *canvas.Text with size and alignment

func NewCenterLabel added in v0.10.1

func NewCenterLabel(text string) *widget.Label

Create a new *widget.Label with center alignment

func NewLine added in v0.11.0

func NewLine(w, h float32, c color.Color) fyne.CanvasObject

Create a new line with min size

func NewSpacer added in v0.11.0

func NewSpacer(w, h float32) *canvas.Rectangle

Create a new transparent *canvas.Rectangle to use as object spacer

func NewTrailingLabel added in v0.10.1

func NewTrailingLabel(text string) *widget.Label

Create a new *widget.Label with trailing alignment

Types

type DeroAmts

type DeroAmts struct {
	xwidget.NumericalEntry
	Prefix    string
	Increment float64
	Decimal   uint
}

func NewDeroEntry

func NewDeroEntry(prefix string, increm float64, decim uint) *DeroAmts

Create new numerical entry with increment change on up or down key stroke

  • If entry does not require prefix, pass ""
  • Increment and Decimal for entry input control

func (*DeroAmts) TypedKey

func (e *DeroAmts) TypedKey(k *fyne.KeyEvent)

Increase or decrease of Increment on TypedKey

func (*DeroAmts) TypedRune

func (e *DeroAmts) TypedRune(r rune)

Accepts whole number or '.'

type DeroRpcEntries

type DeroRpcEntries struct {
	Container  *fyne.Container
	Daemon     *widget.SelectEntry
	Wallet     *widget.SelectEntry
	Auth       *widget.Entry
	Balance    *canvas.Text
	Button     *widget.Button
	Disconnect *widget.Check
	Offset     int
	// contains filtered or unexported fields
}

func NewHorizontalEntries

func NewHorizontalEntries(tag string, offset int) *DeroRpcEntries

Create a horizontal layout container with entries for daemon, wallet and user:pass

  • Objects bound to dReams rpc Daemon and Wallet vars with disconnect control
  • Balance canvas to display wallet balance
  • Button for OnTapped func()
  • Offset of 1 puts entries on trailing edge

func NewVerticalEntries

func NewVerticalEntries(tag string, offset int) *DeroRpcEntries

Create a vertical layout container with entries for daemon, wallet and user:pass

  • Objects bound to dReams rpc Daemon and Wallet vars with disconnect control
  • Balance canvas to display wallet balance
  • Button for OnTapped func()
  • Offset of 1 puts entries on top edge

func (*DeroRpcEntries) AddDaemonOptions

func (d *DeroRpcEntries) AddDaemonOptions(new_opts []string)

Add new options to default daemon rpc entry

func (*DeroRpcEntries) AddIndicator added in v0.11.0

func (d *DeroRpcEntries) AddIndicator(ind fyne.CanvasObject)

Add canvas object indicators to DeroRpcEntries, switching for layout and Offset

func (*DeroRpcEntries) RefreshBalance

func (d *DeroRpcEntries) RefreshBalance()

Refresh Balance of DeroRpcEntries

  • Gets balance from rpc.Wallet.Balance

type Lists added in v0.10.1

type Lists struct {
	List  *widget.List
	All   []uint64
	SCIDs []string
}

Fyne List widget, arrays for string or uint64 content

func (*Lists) ExistsIndex added in v0.10.1

func (l *Lists) ExistsIndex(u uint64) bool

Check if u exists in All

func (*Lists) ExistsSCID added in v0.10.1

func (l *Lists) ExistsSCID(scid string) bool

Check if scid exists in SCIDs

func (*Lists) RemoveIndex added in v0.10.1

func (l *Lists) RemoveIndex(u uint64)

Remove u from All

func (*Lists) RemoveSCID added in v0.10.1

func (l *Lists) RemoveSCID(scid string)

Remove scid from SCIDs

func (*Lists) SortIndex added in v0.10.1

func (l *Lists) SortIndex(reverse bool)

Sort All index

  • Pass reverse true to sort in reverse order

func (*Lists) SortSCIDs added in v0.10.1

func (l *Lists) SortSCIDs(reverse bool)

Sort SCIDs array

  • Pass reverse true to sort in reverse order

Jump to

Keyboard shortcuts

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