Documentation
¶
Index ¶
- Constants
- func DisableLog()
- func UseLogger(logger slog.Logger)
- type ButtonType
- type C
- type ClickFunc
- type CreatePasswordModal
- func (cm *CreatePasswordModal) ConfirmPasswordHint(hint string) *CreatePasswordModal
- func (cm *CreatePasswordModal) EnableConfirmPassword(enable bool) *CreatePasswordModal
- func (cm *CreatePasswordModal) EnableName(enable bool) *CreatePasswordModal
- func (cm *CreatePasswordModal) Handle()
- func (cm *CreatePasswordModal) HandleKeyPress(evt *key.Event)
- func (cm *CreatePasswordModal) KeysToHandle() key.Set
- func (cm *CreatePasswordModal) Layout(gtx C) D
- func (cm *CreatePasswordModal) LayoutComponents() []layout.Widget
- func (cm *CreatePasswordModal) NameHint(hint string) *CreatePasswordModal
- func (cm *CreatePasswordModal) OnDismiss()
- func (cm *CreatePasswordModal) OnResume()
- func (cm *CreatePasswordModal) PasswordHint(hint string) *CreatePasswordModal
- func (cm *CreatePasswordModal) SetCancelable(min bool) *CreatePasswordModal
- func (cm *CreatePasswordModal) SetDescription(description string) *CreatePasswordModal
- func (cm *CreatePasswordModal) SetError(err string)
- func (cm *CreatePasswordModal) SetNegativeButtonCallback(callback func()) *CreatePasswordModal
- func (cm *CreatePasswordModal) SetNegativeButtonText(text string) *CreatePasswordModal
- func (cm *CreatePasswordModal) SetParent(parent app.Page) *CreatePasswordModal
- func (cm *CreatePasswordModal) SetPasswordTitleVisibility(show bool)
- func (cm *CreatePasswordModal) SetPositiveButtonCallback(callback func(walletName, password string, m *CreatePasswordModal) bool) *CreatePasswordModal
- func (cm *CreatePasswordModal) SetPositiveButtonText(text string) *CreatePasswordModal
- func (cm *CreatePasswordModal) ShowWalletInfoTip(show bool) *CreatePasswordModal
- func (cm *CreatePasswordModal) Title(title string) *CreatePasswordModal
- func (cm *CreatePasswordModal) UseCustomWidget(layout layout.Widget) *CreatePasswordModal
- type CreateWatchOnlyModal
- func (cm *CreateWatchOnlyModal) EnableName(enable bool) *CreateWatchOnlyModal
- func (cm *CreateWatchOnlyModal) Handle()
- func (cm *CreateWatchOnlyModal) HandleKeyPress(evt *key.Event)
- func (cm *CreateWatchOnlyModal) KeysToHandle() key.Set
- func (cm *CreateWatchOnlyModal) Layout(gtx layout.Context) D
- func (cm *CreateWatchOnlyModal) OnDismiss()
- func (cm *CreateWatchOnlyModal) OnResume()
- func (cm *CreateWatchOnlyModal) SetCancelable(min bool) *CreateWatchOnlyModal
- func (cm *CreateWatchOnlyModal) SetError(err string)
- func (cm *CreateWatchOnlyModal) WatchOnlyCreated(callback func(walletName, extPubKey string, m *CreateWatchOnlyModal) bool) *CreateWatchOnlyModal
- type D
- type InfoModal
- func (in *InfoModal) Body(subtitle string) *InfoModal
- func (in *InfoModal) CheckBox(checkbox cryptomaterial.CheckBoxStyle, mustBeChecked bool) *InfoModal
- func (in *InfoModal) Handle()
- func (in *InfoModal) HandleKeyPress(_ *key.Event)
- func (in *InfoModal) Icon(icon *cryptomaterial.Image) *InfoModal
- func (in *InfoModal) KeysToHandle() key.Set
- func (in *InfoModal) Layout(gtx layout.Context) D
- func (in *InfoModal) NegativeButtonStyle(background, text color.NRGBA) *InfoModal
- func (in *InfoModal) OnDismiss()
- func (in *InfoModal) OnResume()
- func (in *InfoModal) PositiveButtonStyle(background, text color.NRGBA) *InfoModal
- func (in *InfoModal) PositiveButtonWidth(width unit.Dp) *InfoModal
- func (in *InfoModal) SetCancelable(min bool) *InfoModal
- func (in *InfoModal) SetContentAlignment(title, subTitle, btn layout.Direction) *InfoModal
- func (in *InfoModal) SetNegativeButtonCallback(clicked func()) *InfoModal
- func (in *InfoModal) SetNegativeButtonText(text string) *InfoModal
- func (in *InfoModal) SetPositiveButtonCallback(clicked ClickFunc) *InfoModal
- func (in *InfoModal) SetPositiveButtonText(text string) *InfoModal
- func (in *InfoModal) SetupWithTemplate(template string) *InfoModal
- func (in *InfoModal) Title(title string) *InfoModal
- func (in *InfoModal) UseCustomWidget(layout layout.Widget) *InfoModal
- type PasswordModal
- func (pm *PasswordModal) Description(description string) *PasswordModal
- func (pm *PasswordModal) Handle()
- func (pm *PasswordModal) Hint(hint string) *PasswordModal
- func (pm *PasswordModal) Layout(gtx layout.Context) D
- func (pm *PasswordModal) NegativeButton(text string, clicked func()) *PasswordModal
- func (pm *PasswordModal) OnDismiss()
- func (pm *PasswordModal) OnResume()
- func (pm *PasswordModal) PositiveButton(text string, clicked func(password string, m *PasswordModal) bool) *PasswordModal
- func (pm *PasswordModal) SetCancelable(min bool) *PasswordModal
- func (pm *PasswordModal) SetError(err string)
- func (pm *PasswordModal) SetLoading(loading bool)
- func (pm *PasswordModal) Title(title string) *PasswordModal
- func (pm *PasswordModal) UseCustomWidget(layout layout.Widget) *PasswordModal
- type TextInputModal
- func (tm *TextInputModal) Handle()
- func (tm *TextInputModal) Hint(hint string) *TextInputModal
- func (tm *TextInputModal) Layout(gtx layout.Context) D
- func (tm *TextInputModal) OnResume()
- func (tm *TextInputModal) PositiveButtonStyle(background, text color.NRGBA) *TextInputModal
- func (tm *TextInputModal) SetCancelable(min bool) *TextInputModal
- func (tm *TextInputModal) SetError(err string)
- func (tm *TextInputModal) SetPositiveButtonCallback(callback func(string, *TextInputModal) bool) *TextInputModal
- func (tm *TextInputModal) SetText(text string) *TextInputModal
- func (tm *TextInputModal) SetTextWithTemplate(template string, walletName ...string) *TextInputModal
- func (tm *TextInputModal) ShowAccountInfoTip(show bool) *TextInputModal
Constants ¶
const ( VerifyMessageInfoTemplate = "VerifyMessageInfo" SignMessageInfoTemplate = "SignMessageInfo" PrivacyInfoTemplate = "PrivacyInfo" SetupMixerInfoTemplate = "ConfirmSetupMixer" TransactionDetailsInfoTemplate = "TransactionDetailsInfoInfo" WalletBackupInfoTemplate = "WalletBackupInfo" AllowUnmixedSpendingTemplate = "AllowUnmixedSpending" TicketPriceErrorTemplate = "TicketPriceError" SecurityToolsInfoTemplate = "SecurityToolsInfo" RemoveWalletInfoTemplate = "RemoveWalletInfo" SetGapLimitTemplate = "SetGapLimit" SourceModalInfoTemplate = "SourceModalInfo" TotalValueInfoTemplate = "TotalValueInfo" BondStrengthInfoTemplate = "BondStrengthInfo" )
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 ButtonType ¶
type ButtonType uint8
ButtonType is the type of button in modal.
const ( // CustomBtn defines the bare metal custom modal button type. CustomBtn ButtonType = iota // DangerBtn defines the default danger modal button type DangerBtn // InfoBtn defines the default info modal button type InfoBtn )
type ClickFunc ¶
ClickFunc defines the positive button click method signature. Adding the InfoModal parameter allow reference of the parent info modal qualities inside the positive button function call.
func DefaultClickFunc ¶
func DefaultClickFunc() ClickFunc
DefaultClickFunc returns the default click function satisfying the positive btn click function.
type CreatePasswordModal ¶
type CreatePasswordModal struct { *load.Load *cryptomaterial.Modal // contains filtered or unexported fields }
func NewCreatePasswordModal ¶
func NewCreatePasswordModal(l *load.Load) *CreatePasswordModal
func (*CreatePasswordModal) ConfirmPasswordHint ¶
func (cm *CreatePasswordModal) ConfirmPasswordHint(hint string) *CreatePasswordModal
func (*CreatePasswordModal) EnableConfirmPassword ¶
func (cm *CreatePasswordModal) EnableConfirmPassword(enable bool) *CreatePasswordModal
func (*CreatePasswordModal) EnableName ¶
func (cm *CreatePasswordModal) EnableName(enable bool) *CreatePasswordModal
func (*CreatePasswordModal) Handle ¶
func (cm *CreatePasswordModal) Handle()
func (*CreatePasswordModal) HandleKeyPress ¶
func (cm *CreatePasswordModal) 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 (*CreatePasswordModal) KeysToHandle ¶
func (cm *CreatePasswordModal) KeysToHandle() key.Set
KeysToHandle returns an expression that describes a set of key combinations that this modal 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 (*CreatePasswordModal) Layout ¶
func (cm *CreatePasswordModal) Layout(gtx C) D
func (*CreatePasswordModal) LayoutComponents ¶
func (cm *CreatePasswordModal) LayoutComponents() []layout.Widget
func (*CreatePasswordModal) NameHint ¶
func (cm *CreatePasswordModal) NameHint(hint string) *CreatePasswordModal
func (*CreatePasswordModal) OnDismiss ¶
func (cm *CreatePasswordModal) OnDismiss()
func (*CreatePasswordModal) OnResume ¶
func (cm *CreatePasswordModal) OnResume()
func (*CreatePasswordModal) PasswordHint ¶
func (cm *CreatePasswordModal) PasswordHint(hint string) *CreatePasswordModal
func (*CreatePasswordModal) SetCancelable ¶
func (cm *CreatePasswordModal) SetCancelable(min bool) *CreatePasswordModal
func (*CreatePasswordModal) SetDescription ¶
func (cm *CreatePasswordModal) SetDescription(description string) *CreatePasswordModal
func (*CreatePasswordModal) SetError ¶
func (cm *CreatePasswordModal) SetError(err string)
func (*CreatePasswordModal) SetNegativeButtonCallback ¶
func (cm *CreatePasswordModal) SetNegativeButtonCallback(callback func()) *CreatePasswordModal
func (*CreatePasswordModal) SetNegativeButtonText ¶
func (cm *CreatePasswordModal) SetNegativeButtonText(text string) *CreatePasswordModal
func (*CreatePasswordModal) SetParent ¶
func (cm *CreatePasswordModal) SetParent(parent app.Page) *CreatePasswordModal
SetParent sets the page that created PasswordModal as it's parent.
func (*CreatePasswordModal) SetPasswordTitleVisibility ¶ added in v1.1.0
func (cm *CreatePasswordModal) SetPasswordTitleVisibility(show bool)
func (*CreatePasswordModal) SetPositiveButtonCallback ¶
func (cm *CreatePasswordModal) SetPositiveButtonCallback(callback func(walletName, password string, m *CreatePasswordModal) bool) *CreatePasswordModal
func (*CreatePasswordModal) SetPositiveButtonText ¶
func (cm *CreatePasswordModal) SetPositiveButtonText(text string) *CreatePasswordModal
func (*CreatePasswordModal) ShowWalletInfoTip ¶
func (cm *CreatePasswordModal) ShowWalletInfoTip(show bool) *CreatePasswordModal
func (*CreatePasswordModal) Title ¶
func (cm *CreatePasswordModal) Title(title string) *CreatePasswordModal
func (*CreatePasswordModal) UseCustomWidget ¶
func (cm *CreatePasswordModal) UseCustomWidget(layout layout.Widget) *CreatePasswordModal
type CreateWatchOnlyModal ¶
type CreateWatchOnlyModal struct { *load.Load *cryptomaterial.Modal // contains filtered or unexported fields }
func NewCreateWatchOnlyModal ¶
func NewCreateWatchOnlyModal(l *load.Load) *CreateWatchOnlyModal
func (*CreateWatchOnlyModal) EnableName ¶
func (cm *CreateWatchOnlyModal) EnableName(enable bool) *CreateWatchOnlyModal
func (*CreateWatchOnlyModal) Handle ¶
func (cm *CreateWatchOnlyModal) Handle()
func (*CreateWatchOnlyModal) HandleKeyPress ¶
func (cm *CreateWatchOnlyModal) 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 (*CreateWatchOnlyModal) KeysToHandle ¶
func (cm *CreateWatchOnlyModal) KeysToHandle() key.Set
KeysToHandle returns an expression that describes a set of key combinations that this modal 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 (*CreateWatchOnlyModal) OnDismiss ¶
func (cm *CreateWatchOnlyModal) OnDismiss()
func (*CreateWatchOnlyModal) OnResume ¶
func (cm *CreateWatchOnlyModal) OnResume()
func (*CreateWatchOnlyModal) SetCancelable ¶
func (cm *CreateWatchOnlyModal) SetCancelable(min bool) *CreateWatchOnlyModal
func (*CreateWatchOnlyModal) SetError ¶
func (cm *CreateWatchOnlyModal) SetError(err string)
func (*CreateWatchOnlyModal) WatchOnlyCreated ¶
func (cm *CreateWatchOnlyModal) WatchOnlyCreated(callback func(walletName, extPubKey string, m *CreateWatchOnlyModal) bool) *CreateWatchOnlyModal
type D ¶
type D = layout.Dimensions
type InfoModal ¶
type InfoModal struct { *load.Load *cryptomaterial.Modal // contains filtered or unexported fields }
func NewCustomModal ¶
NewCustomModal returns a modal that can be customized.
func NewErrorModal ¶
NewErrorModal returns the default error modal UI component.
func NewSuccessModal ¶
NewSuccessModal returns the default success modal UI component.
func (*InfoModal) CheckBox ¶
func (in *InfoModal) CheckBox(checkbox cryptomaterial.CheckBoxStyle, mustBeChecked bool) *InfoModal
func (*InfoModal) HandleKeyPress ¶
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 (*InfoModal) KeysToHandle ¶
KeysToHandle returns an expression that describes a set of key combinations that this modal 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 (*InfoModal) NegativeButtonStyle ¶
func (*InfoModal) PositiveButtonStyle ¶
func (*InfoModal) PositiveButtonWidth ¶
func (*InfoModal) SetCancelable ¶
func (*InfoModal) SetContentAlignment ¶
func (*InfoModal) SetNegativeButtonCallback ¶
func (*InfoModal) SetNegativeButtonText ¶
func (*InfoModal) SetPositiveButtonCallback ¶
func (*InfoModal) SetPositiveButtonText ¶
func (*InfoModal) SetupWithTemplate ¶
for backwards compatibility.
type PasswordModal ¶
type PasswordModal struct { *load.Load *cryptomaterial.Modal // contains filtered or unexported fields }
func NewPasswordModal ¶
func NewPasswordModal(l *load.Load) *PasswordModal
func (*PasswordModal) Description ¶
func (pm *PasswordModal) Description(description string) *PasswordModal
func (*PasswordModal) Handle ¶
func (pm *PasswordModal) Handle()
func (*PasswordModal) Hint ¶
func (pm *PasswordModal) Hint(hint string) *PasswordModal
func (*PasswordModal) NegativeButton ¶
func (pm *PasswordModal) NegativeButton(text string, clicked func()) *PasswordModal
func (*PasswordModal) OnDismiss ¶
func (pm *PasswordModal) OnDismiss()
func (*PasswordModal) OnResume ¶
func (pm *PasswordModal) OnResume()
func (*PasswordModal) PositiveButton ¶
func (pm *PasswordModal) PositiveButton(text string, clicked func(password string, m *PasswordModal) bool) *PasswordModal
func (*PasswordModal) SetCancelable ¶
func (pm *PasswordModal) SetCancelable(min bool) *PasswordModal
func (*PasswordModal) SetError ¶
func (pm *PasswordModal) SetError(err string)
func (*PasswordModal) SetLoading ¶
func (pm *PasswordModal) SetLoading(loading bool)
func (*PasswordModal) Title ¶
func (pm *PasswordModal) Title(title string) *PasswordModal
func (*PasswordModal) UseCustomWidget ¶
func (pm *PasswordModal) UseCustomWidget(layout layout.Widget) *PasswordModal
type TextInputModal ¶
type TextInputModal struct { *InfoModal // contains filtered or unexported fields }
func NewTextInputModal ¶
func NewTextInputModal(l *load.Load) *TextInputModal
func (*TextInputModal) Handle ¶
func (tm *TextInputModal) Handle()
func (*TextInputModal) Hint ¶
func (tm *TextInputModal) Hint(hint string) *TextInputModal
func (*TextInputModal) OnResume ¶
func (tm *TextInputModal) OnResume()
func (*TextInputModal) PositiveButtonStyle ¶
func (tm *TextInputModal) PositiveButtonStyle(background, text color.NRGBA) *TextInputModal
func (*TextInputModal) SetCancelable ¶
func (tm *TextInputModal) SetCancelable(min bool) *TextInputModal
func (*TextInputModal) SetError ¶
func (tm *TextInputModal) SetError(err string)
func (*TextInputModal) SetPositiveButtonCallback ¶
func (tm *TextInputModal) SetPositiveButtonCallback(callback func(string, *TextInputModal) bool) *TextInputModal
func (*TextInputModal) SetText ¶
func (tm *TextInputModal) SetText(text string) *TextInputModal
SetText replaces the content of this editor with the provided text.
func (*TextInputModal) SetTextWithTemplate ¶
func (tm *TextInputModal) SetTextWithTemplate(template string, walletName ...string) *TextInputModal
func (*TextInputModal) ShowAccountInfoTip ¶
func (tm *TextInputModal) ShowAccountInfoTip(show bool) *TextInputModal