root

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: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HomePageID = "Home"
)
View Source
const (
	OverviewPageID = "Overview"
)
View Source
const WalletSelectorPageID = "wallet_selector"

Variables

This section is empty.

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 HomePage added in v1.1.0

type HomePage struct {
	*app.MasterPage

	*load.Load
	// contains filtered or unexported fields
}

func NewHomePage added in v1.1.0

func NewHomePage(dexCtx context.Context, l *load.Load) *HomePage

func (*HomePage) CalculateAssetsUSDBalance added in v1.1.0

func (hp *HomePage) CalculateAssetsUSDBalance()

func (*HomePage) HandleKeyPress added in v1.1.0

func (hp *HomePage) 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 (*HomePage) HandleUserInteractions added in v1.1.0

func (hp *HomePage) 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 (*HomePage) ID added in v1.1.0

func (hp *HomePage) 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 (*HomePage) KeysToHandle added in v1.1.0

func (hp *HomePage) 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 (*HomePage) Layout added in v1.1.0

func (hp *HomePage) 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 (*HomePage) LayoutUSDBalance added in v1.1.0

func (hp *HomePage) LayoutUSDBalance(gtx C) D

TODO: use real values

func (*HomePage) OnCurrencyChanged added in v1.1.0

func (hp *HomePage) OnCurrencyChanged()

func (*HomePage) OnDarkModeChanged added in v1.1.0

func (hp *HomePage) 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 (*HomePage) OnNavigatedFrom added in v1.1.0

func (hp *HomePage) 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 (*HomePage) OnNavigatedTo added in v1.1.0

func (hp *HomePage) 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 OverviewPage added in v1.1.0

type OverviewPage struct {
	*app.GenericPageModal
	*load.Load
	// contains filtered or unexported fields
}

func NewOverviewPage added in v1.1.0

func NewOverviewPage(l *load.Load, showNavigationFunc showNavigationFunc) *OverviewPage

func (*OverviewPage) HandleUserInteractions added in v1.1.0

func (pg *OverviewPage) 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 (*OverviewPage) ID added in v1.1.0

func (pg *OverviewPage) 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 (*OverviewPage) Layout added in v1.1.0

func (pg *OverviewPage) 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 (*OverviewPage) OnCurrencyChanged added in v1.1.0

func (pg *OverviewPage) OnCurrencyChanged()

func (*OverviewPage) OnNavigatedFrom added in v1.1.0

func (pg *OverviewPage) 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 (*OverviewPage) OnNavigatedTo added in v1.1.0

func (pg *OverviewPage) 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 WalletSelectorPage added in v1.1.0

type WalletSelectorPage 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 NewWalletSelectorPage added in v1.1.0

func NewWalletSelectorPage(l *load.Load) *WalletSelectorPage

func (*WalletSelectorPage) HandleUserInteractions added in v1.1.0

func (pg *WalletSelectorPage) 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 (*WalletSelectorPage) Layout added in v1.1.0

func (pg *WalletSelectorPage) 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 (*WalletSelectorPage) OnNavigatedFrom added in v1.1.0

func (pg *WalletSelectorPage) 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 (*WalletSelectorPage) OnNavigatedTo added in v1.1.0

func (pg *WalletSelectorPage) 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