wallet

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: ISC Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainPageID = "Main"
)
View Source
const WalletSettingsPageID = "WalletSettings"

Variables

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func UseLogger

func UseLogger(logger slog.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type C

type C = layout.Context

type D

type D = layout.Dimensions

type SettingsPage

type SettingsPage struct {
	*load.Load
	// GenericPageModal defines methods such as ID() and OnAttachedToNavigator()
	// that helps this Page satisfy the app.Page interface. It also defines
	// helper methods for accessing the PageNavigator that displayed this page
	// and the root WindowNavigator.
	*app.GenericPageModal
	// contains filtered or unexported fields
}

func NewSettingsPage

func NewSettingsPage(l *load.Load, wallet sharedW.Asset, walletCallbackFunc func()) *SettingsPage

func (*SettingsPage) HandleUserInteractions

func (pg *SettingsPage) HandleUserInteractions()

HandleUserInteractions is called just before Layout() to determine if any user interaction recently occurred on the page and may be used to update the page's UI components shortly before they are displayed. Part of the load.Page interface.

func (*SettingsPage) Layout

func (pg *SettingsPage) Layout(gtx C) D

Layout draws the page UI components into the provided layout context to be eventually drawn on screen. Part of the load.Page interface.

func (*SettingsPage) OnNavigatedFrom

func (pg *SettingsPage) OnNavigatedFrom()

OnNavigatedFrom is called when the page is about to be removed from the displayed window. This method should ideally be used to disable features that are irrelevant when the page is NOT displayed. NOTE: The page may be re-displayed on the app's window, in which case OnNavigatedTo() will be called again. This method should not destroy UI components unless they'll be recreated in the OnNavigatedTo() method. Part of the load.Page interface.

func (*SettingsPage) OnNavigatedTo

func (pg *SettingsPage) OnNavigatedTo()

OnNavigatedTo is called when the page is about to be displayed and may be used to initialize page features that are only relevant when the page is displayed. Part of the load.Page interface.

type SingleWalletMasterPage

type SingleWalletMasterPage struct {
	*app.MasterPage
	*load.Load

	PageNavigationTab *cryptomaterial.SegmentedControl

	PageNavigationMap map[string]string
	// contains filtered or unexported fields
}

SingleWalletMasterPage is a master page for interacting with a single wallet. It has sub pages for viewing a wallet's info, sending and receiving funds for a wallet, viewing a wallet's transactions, etc.

func NewSingleWalletMasterPage

func NewSingleWalletMasterPage(l *load.Load, wallet sharedW.Asset, showNavigationFunc func()) *SingleWalletMasterPage

func (*SingleWalletMasterPage) HandleKeyPress

func (swmp *SingleWalletMasterPage) HandleKeyPress(evt *key.Event)

HandleKeyPress is called when one or more keys are pressed on the current window that match any of the key combinations returned by KeysToHandle(). Satisfies the load.KeyEventHandler interface for receiving key events.

func (*SingleWalletMasterPage) HandleUserInteractions

func (swmp *SingleWalletMasterPage) HandleUserInteractions()

HandleUserInteractions is called just before Layout() to determine if any user interaction recently occurred on the page and may be used to update the page's UI components shortly before they are displayed. Part of the load.Page interface.

func (*SingleWalletMasterPage) ID

func (swmp *SingleWalletMasterPage) ID() string

ID is a unique string that identifies the page and may be used to differentiate this page from other pages. Part of the load.Page interface.

func (*SingleWalletMasterPage) KeysToHandle

func (swmp *SingleWalletMasterPage) KeysToHandle() key.Set

KeysToHandle returns an expression that describes a set of key combinations that this page wishes to capture. The HandleKeyPress() method will only be called when any of these key combinations is pressed. Satisfies the load.KeyEventHandler interface for receiving key events.

func (*SingleWalletMasterPage) Layout

func (swmp *SingleWalletMasterPage) Layout(gtx C) D

Layout draws the page UI components into the provided layout context to be eventually drawn on screen. Part of the load.Page interface.

func (*SingleWalletMasterPage) LayoutTopBar

func (swmp *SingleWalletMasterPage) LayoutTopBar(gtx C) D

func (*SingleWalletMasterPage) LayoutUSDBalance

func (swmp *SingleWalletMasterPage) LayoutUSDBalance(gtx C) D

func (*SingleWalletMasterPage) OnCurrencyChanged

func (swmp *SingleWalletMasterPage) OnCurrencyChanged()

func (*SingleWalletMasterPage) OnDarkModeChanged

func (swmp *SingleWalletMasterPage) OnDarkModeChanged(isDarkModeOn bool)

OnDarkModeChanged is triggered whenever the dark mode setting is changed to enable restyling UI elements where necessary. Satisfies the load.AppSettingsChangeHandler interface.

func (*SingleWalletMasterPage) OnNavigatedFrom

func (swmp *SingleWalletMasterPage) OnNavigatedFrom()

OnNavigatedFrom is called when the page is about to be removed from the displayed window. This method should ideally be used to disable features that are irrelevant when the page is NOT displayed. NOTE: The page may be re-displayed on the app's window, in which case OnNavigatedTo() will be called again. This method should not destroy UI components unless they'll be recreated in the OnNavigatedTo() method. Part of the load.Page interface.

func (*SingleWalletMasterPage) OnNavigatedTo

func (swmp *SingleWalletMasterPage) OnNavigatedTo()

OnNavigatedTo is called when the page is about to be displayed and may be used to initialize page features that are only relevant when the page is displayed. Part of the load.Page interface.

Jump to

Keyboard shortcuts

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