Documentation ¶
Index ¶
- Constants
- func DisableLog()
- func UseLogger(logger slog.Logger)
- type C
- type CreateOrderPage
- type D
- type ExSelector
- func (es *ExSelector) ExchangeSelected(callback func(*Exchange)) *ExSelector
- func (es *ExSelector) Handle(window app.WindowNavigator)
- func (es *ExSelector) Layout(window app.WindowNavigator, gtx C) D
- func (em ExSelector) OnDismiss()
- func (em ExSelector) OnResume()
- func (es *ExSelector) SelectedExchange() *Exchange
- func (es *ExSelector) SetSelectedExchange(exch *Exchange)
- func (es *ExSelector) SetSelectedExchangeName(name string)
- func (es *ExSelector) SupportedExchanges(server ...instantswap.Server) []*Exchange
- func (es *ExSelector) Title(title string) *ExSelector
- type Exchange
- type FrequencySelector
- type OrderDetailsPage
- type OrderHistoryPage
- type TradePage
Constants ¶
const CreateOrderPageID = "CreateOrder"
const ExSelectorID = "ExSelectorID"
const FrequencySelectorID = "FrequencySelectorID"
const OrderDetailsPageID = "OrderDetailsPage"
const OrderHistoryPageID = "OrderHistory"
const (
TradePageID = "Trade"
)
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 CreateOrderPage ¶
type CreateOrderPage 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 NewCreateOrderPage ¶
func NewCreateOrderPage(l *load.Load) *CreateOrderPage
func (*CreateOrderPage) AssetToCreate ¶ added in v1.1.0
func (pg *CreateOrderPage) AssetToCreate() libutils.AssetType
AssetToCreate check if there is any asset type that has not been created and returns the first one.
func (*CreateOrderPage) HandleUserInteractions ¶
func (pg *CreateOrderPage) HandleUserInteractions()
func (*CreateOrderPage) ID ¶
func (pg *CreateOrderPage) ID() string
func (*CreateOrderPage) Layout ¶
func (pg *CreateOrderPage) Layout(gtx C) D
func (*CreateOrderPage) OnNavigatedFrom ¶
func (pg *CreateOrderPage) OnNavigatedFrom()
func (*CreateOrderPage) OnNavigatedTo ¶
func (pg *CreateOrderPage) OnNavigatedTo()
type D ¶
type D = layout.Dimensions
type ExSelector ¶
type ExSelector struct {
// contains filtered or unexported fields
}
ExSelector models a widget for use for selecting exchanges.
func NewExSelector ¶
func NewExSelector(l *load.Load, server ...instantswap.Server) *ExSelector
NewExSelector creates an exchange selector component. It opens a modal to select a desired exchange.
func (*ExSelector) ExchangeSelected ¶
func (es *ExSelector) ExchangeSelected(callback func(*Exchange)) *ExSelector
ExchangeSelected sets the callback executed when an exchange is selected.
func (*ExSelector) Handle ¶
func (es *ExSelector) Handle(window app.WindowNavigator)
func (*ExSelector) Layout ¶
func (es *ExSelector) Layout(window app.WindowNavigator, gtx C) D
func (*ExSelector) SelectedExchange ¶
func (es *ExSelector) SelectedExchange() *Exchange
SelectedExchange returns the currently selected Exchange.
func (*ExSelector) SetSelectedExchange ¶
func (es *ExSelector) SetSelectedExchange(exch *Exchange)
SetSelectedExchange sets exch as the current selected exchange.
func (*ExSelector) SetSelectedExchangeName ¶
func (es *ExSelector) SetSelectedExchangeName(name string)
SetSelectedExchangeName sets the exchange whose Name field is equals to {name} as the current selected exchange. If it can find exchange whose Name field equals name it returns silently.
func (*ExSelector) SupportedExchanges ¶
func (es *ExSelector) SupportedExchanges(server ...instantswap.Server) []*Exchange
SupportedExchanges returns a slice containing all the exchanges Currently supported. If the server param is passed, it returns a slice containing the filtered server only.
func (*ExSelector) Title ¶
func (es *ExSelector) Title(title string) *ExSelector
Title Sets the title of the exchange list dialog.
type Exchange ¶
type Exchange struct { Name string Server instantswap.ExchangeServer Icon *cryptomaterial.Image }
Exchange models exchanges.
type FrequencySelector ¶
type FrequencySelector struct {
// contains filtered or unexported fields
}
FrequencySelector models a wiget for use for selecting exchanges.
func NewFrequencySelector ¶
func NewFrequencySelector(l *load.Load) *FrequencySelector
NewFrequencySelector creates an frequency selector component. It opens a modal to select a desired frequency.
func (*FrequencySelector) Layout ¶
func (fs *FrequencySelector) Layout(window app.WindowNavigator, gtx C) D
type OrderDetailsPage ¶
type OrderDetailsPage 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 NewOrderDetailsPage ¶
func NewOrderDetailsPage(l *load.Load, order *instantswap.Order) *OrderDetailsPage
func (*OrderDetailsPage) HandleUserInteractions ¶
func (pg *OrderDetailsPage) HandleUserInteractions()
func (*OrderDetailsPage) ID ¶
func (pg *OrderDetailsPage) ID() string
func (*OrderDetailsPage) Layout ¶
func (pg *OrderDetailsPage) Layout(gtx C) D
func (*OrderDetailsPage) OnNavigatedFrom ¶
func (pg *OrderDetailsPage) OnNavigatedFrom()
func (*OrderDetailsPage) OnNavigatedTo ¶
func (pg *OrderDetailsPage) OnNavigatedTo()
type OrderHistoryPage ¶
type OrderHistoryPage 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 NewOrderHistoryPage ¶
func NewOrderHistoryPage(l *load.Load) *OrderHistoryPage
func (*OrderHistoryPage) HandleUserInteractions ¶
func (pg *OrderHistoryPage) HandleUserInteractions()
func (*OrderHistoryPage) ID ¶
func (pg *OrderHistoryPage) ID() string
func (*OrderHistoryPage) Layout ¶
func (pg *OrderHistoryPage) Layout(gtx C) D
func (*OrderHistoryPage) OnNavigatedFrom ¶
func (pg *OrderHistoryPage) OnNavigatedFrom()
func (*OrderHistoryPage) OnNavigatedTo ¶
func (pg *OrderHistoryPage) OnNavigatedTo()
type TradePage ¶ added in v1.1.0
type TradePage struct { *load.Load *app.MasterPage // contains filtered or unexported fields }
func NewTradePage ¶ added in v1.1.0
func (*TradePage) HandleUserInteractions ¶ added in v1.1.0
func (pg *TradePage) 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 (*TradePage) 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 (*TradePage) 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 (*TradePage) OnNavigatedFrom ¶ added in v1.1.0
func (pg *TradePage) 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 (*TradePage) OnNavigatedTo ¶ added in v1.1.0
func (pg *TradePage) 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.