Documentation
¶
Index ¶
- Constants
- func DisableLog()
- func UseLogger(logger slog.Logger)
- type C
- type D
- type HomePage
- func (hp *HomePage) CalculateAssetsUSDBalance()
- func (hp *HomePage) HandleKeyPress(evt *key.Event)
- func (hp *HomePage) HandleUserInteractions()
- func (hp *HomePage) ID() string
- func (hp *HomePage) KeysToHandle() key.Set
- func (hp *HomePage) Layout(gtx C) D
- func (hp *HomePage) LayoutUSDBalance(gtx C) D
- func (hp *HomePage) OnCurrencyChanged()
- func (hp *HomePage) OnDarkModeChanged(isDarkModeOn bool)
- func (hp *HomePage) OnNavigatedFrom()
- func (hp *HomePage) OnNavigatedTo()
- type OverviewPage
- type WalletSelectorPage
Constants ¶
const (
HomePageID = "Home"
)
const (
OverviewPageID = "Overview"
)
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.
Types ¶
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 (*HomePage) CalculateAssetsUSDBalance ¶ added in v1.1.0
func (hp *HomePage) CalculateAssetsUSDBalance()
func (*HomePage) HandleKeyPress ¶ added in v1.1.0
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
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
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
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
TODO: use real values
func (*HomePage) OnCurrencyChanged ¶ added in v1.1.0
func (hp *HomePage) OnCurrencyChanged()
func (*HomePage) OnDarkModeChanged ¶ added in v1.1.0
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.