Documentation
¶
Index ¶
- Variables
- func GetKeyValue(key string, options []ItemPreference) string
- type C
- type D
- type ItemPreference
- type ListPreferenceModal
- func (lp *ListPreferenceModal) Handle()
- func (lp *ListPreferenceModal) IsWallet(setAccount bool) *ListPreferenceModal
- func (lp *ListPreferenceModal) Layout(gtx C) D
- func (lp *ListPreferenceModal) OnDismiss()
- func (lp *ListPreferenceModal) OnResume()
- func (lp *ListPreferenceModal) ReadPreferenceKeyedValue() string
- func (lp *ListPreferenceModal) SavePreferenceKeyedValue()
- func (lp *ListPreferenceModal) Title(title string) *ListPreferenceModal
- func (lp *ListPreferenceModal) UpdateValues(clicked func(val string)) *ListPreferenceModal
- func (lp *ListPreferenceModal) UseCustomWidget(layout layout.Widget) *ListPreferenceModal
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NetworkTypes = []ItemPreference{ {Key: string(libutils.Mainnet), Value: libutils.Mainnet.Display()}, {Key: string(libutils.Testnet), Value: libutils.Testnet.Display()}, } // ExchOptions holds the configurable options for exchange servers. ExchOptions = []ItemPreference{ {Key: values.BinanceExchange, Value: values.StrUsdBinance}, {Key: values.BittrexExchange, Value: values.StrUsdBittrex}, {Key: values.DefaultExchangeValue, Value: values.StrNone}, } // LangOptions stores the configurable language options. LangOptions = []ItemPreference{ {Key: localizable.ENGLISH, Value: values.StrEnglish}, {Key: localizable.FRENCH, Value: values.StrFrench}, {Key: localizable.SPANISH, Value: values.StrSpanish}, } // LogOptions are the selectable debug levels. LogOptions = []ItemPreference{ {Key: libutils.LogLevelTrace, Value: values.StrLogLevelTrace}, {Key: libutils.LogLevelDebug, Value: values.StrLogLevelDebug}, {Key: libutils.LogLevelInfo, Value: values.StrLogLevelInfo}, {Key: libutils.LogLevelWarn, Value: values.StrLogLevelWarn}, {Key: libutils.LogLevelError, Value: values.StrLogLevelError}, {Key: libutils.LogLevelCritical, Value: values.StrLogLevelCritical}, } )
Functions ¶
func GetKeyValue ¶
func GetKeyValue(key string, options []ItemPreference) string
GetKeyValue return the value for a key within a set of prefence options. The key is case sensitive, `Key` != `key`. Returns the empty string if the key is not found.
Types ¶
type D ¶
type D = layout.Dimensions
type ItemPreference ¶
ItemPreference models the options shown by the list preference modal.
type ListPreferenceModal ¶
type ListPreferenceModal struct { *load.Load *cryptomaterial.Modal // contains filtered or unexported fields }
func NewListPreference ¶
func NewListPreference(l *load.Load, preferenceKey, defaultValue string, items []ItemPreference) *ListPreferenceModal
func (*ListPreferenceModal) Handle ¶
func (lp *ListPreferenceModal) Handle()
func (*ListPreferenceModal) IsWallet ¶
func (lp *ListPreferenceModal) IsWallet(setAccount bool) *ListPreferenceModal
func (*ListPreferenceModal) Layout ¶
func (lp *ListPreferenceModal) Layout(gtx C) D
func (*ListPreferenceModal) OnDismiss ¶
func (lp *ListPreferenceModal) OnDismiss()
func (*ListPreferenceModal) OnResume ¶
func (lp *ListPreferenceModal) OnResume()
func (*ListPreferenceModal) ReadPreferenceKeyedValue ¶
func (lp *ListPreferenceModal) ReadPreferenceKeyedValue() string
func (*ListPreferenceModal) SavePreferenceKeyedValue ¶
func (lp *ListPreferenceModal) SavePreferenceKeyedValue()
func (*ListPreferenceModal) Title ¶
func (lp *ListPreferenceModal) Title(title string) *ListPreferenceModal
func (*ListPreferenceModal) UpdateValues ¶
func (lp *ListPreferenceModal) UpdateValues(clicked func(val string)) *ListPreferenceModal
func (*ListPreferenceModal) UseCustomWidget ¶
func (lp *ListPreferenceModal) UseCustomWidget(layout layout.Widget) *ListPreferenceModal
Click to show internal directories.
Click to hide internal directories.