gui

package
Version: v0.0.2-0...-1c7e8a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2021 License: Unlicense Imports: 54 Imported by: 0

Documentation

Index

Constants

View Source
const Break1 = 48
View Source
const ZeroAddress = "1111111111111111111114oLvT2"

Variables

This section is empty.

Functions

func Check

func Check(err error) bool

func Debug

func Debug(a ...interface{})

func Debugc

func Debugc(fn func() string)

func Debugf

func Debugf(format string, a ...interface{})

func Debugs

func Debugs(a interface{})

func Error

func Error(a ...interface{})

func Errorc

func Errorc(fn func() string)

func Errorf

func Errorf(format string, a ...interface{})

func Errors

func Errors(a interface{})

func Fatal

func Fatal(a ...interface{})

func Fatalc

func Fatalc(fn func() string)

func Fatalf

func Fatalf(format string, a ...interface{})

func Fatals

func Fatals(a interface{})

func Info

func Info(a ...interface{})

func Infoc

func Infoc(fn func() string)

func Infof

func Infof(format string, a ...interface{})

func Infos

func Infos(a interface{})

func Main

func Main(cx *conte.Xt, c *cli.Context) (err error)

func Trace

func Trace(a ...interface{})

func Tracec

func Tracec(fn func() string)

func Tracef

func Tracef(format string, a ...interface{})

func Traces

func Traces(a interface{})

func Warn

func Warn(a ...interface{})

func Warnc

func Warnc(fn func() string)

func Warnf

func Warnf(format string, a ...interface{})

func Warns

func Warns(a interface{})

Types

type AddressEntry

type AddressEntry struct {
	Address  string      `json:"address"`
	Message  string      `json:"message,omitempty"`
	Label    string      `json:"label,omitempty"`
	Amount   util.Amount `json:"amount"`
	Created  time.Time   `json:"created"`
	Modified time.Time   `json:"modified"`
}

type BoolMap

type BoolMap map[string]*gui.Bool

type CategoryFilter

type CategoryFilter struct {
	Send     bool
	Generate bool
	Immature bool
	Receive  bool
	Unknown  bool
}

CategoryFilter marks which transactions to omit from the filtered transaction list

func (*CategoryFilter) Filter

func (c *CategoryFilter) Filter(s string) (include bool)

type CheckableMap

type CheckableMap map[string]*gui.Checkable

type ClickableMap

type ClickableMap map[string]*gui.Clickable

type Console

type Console struct {
	*gui.Window
	// contains filtered or unexported fields
}

func (*Console) Fn

func (c *Console) Fn(gtx l.Context) l.Dimensions

func (*Console) JSONWidget

func (c *Console) JSONWidget(color string, j []byte) (out []l.Widget)

type IncDecMap

type IncDecMap map[string]*gui.IncDec

type InputMap

type InputMap map[string]*gui.Input

type JSONElement

type JSONElement struct {
	// contains filtered or unexported fields
}

type JSONElements

type JSONElements []JSONElement

func GetJSONElements

func GetJSONElements(in map[string]interface{}) (je JSONElements)

func (JSONElements) Len

func (je JSONElements) Len() int

func (JSONElements) Less

func (je JSONElements) Less(i, j int) bool

func (JSONElements) Swap

func (je JSONElements) Swap(i, j int)

type ListMap

type ListMap map[string]*gui.List

type Marshalled

type Marshalled struct {
	LastUpdated        time.Time
	BestBlockHeight    int32
	BestBlockHash      chainhash.Hash
	Balance            float64
	BalanceUnconfirmed float64
	AllTxs             []btcjson.ListTransactionsResult
	Filter             CategoryFilter
	ReceivingAddress   string
	ActivePage         string
	ReceiveAddressBook []AddressEntry
	SendAddressBook    []AddressEntry
}

func (*Marshalled) Unmarshal

func (m *Marshalled) Unmarshal(s *State)

type PasswordMap

type PasswordMap map[string]*gui.Password

type ReceivePage

type ReceivePage struct {
	// contains filtered or unexported fields
}

func (*ReceivePage) AddressbookHeader

func (rp *ReceivePage) AddressbookHeader() l.Widget

func (*ReceivePage) AmountInput

func (rp *ReceivePage) AmountInput() l.Widget

func (*ReceivePage) Fn

func (rp *ReceivePage) Fn(gtx l.Context) l.Dimensions

func (*ReceivePage) GetAddressbookHistoryCards

func (rp *ReceivePage) GetAddressbookHistoryCards(bg string) (widgets []l.Widget)

func (*ReceivePage) GetQRText

func (rp *ReceivePage) GetQRText() string

func (*ReceivePage) MediumList

func (rp *ReceivePage) MediumList(gtx l.Context) l.Dimensions

func (*ReceivePage) MessageInput

func (rp *ReceivePage) MessageInput() l.Widget

func (*ReceivePage) QRButton

func (rp *ReceivePage) QRButton() l.Widget

func (*ReceivePage) QRMessage

func (rp *ReceivePage) QRMessage() l.Widget

func (*ReceivePage) RegenerateButton

func (rp *ReceivePage) RegenerateButton() l.Widget

func (*ReceivePage) SmallList

func (rp *ReceivePage) SmallList(gtx l.Context) l.Dimensions

func (*ReceivePage) Spacer

func (rp *ReceivePage) Spacer() l.Widget

type SendPage

type SendPage struct {
	// contains filtered or unexported fields
}

func (*SendPage) AddressInput

func (sp *SendPage) AddressInput() l.Widget

func (*SendPage) AddressbookHeader

func (sp *SendPage) AddressbookHeader() l.Widget

func (*SendPage) AmountInput

func (sp *SendPage) AmountInput() l.Widget

func (*SendPage) Fn

func (sp *SendPage) Fn(gtx l.Context) l.Dimensions

func (*SendPage) GetAddressbookHistoryCards

func (sp *SendPage) GetAddressbookHistoryCards(bg string) (widgets []l.Widget)

func (*SendPage) MediumList

func (sp *SendPage) MediumList(gtx l.Context) l.Dimensions

func (*SendPage) MessageInput

func (sp *SendPage) MessageInput() l.Widget

func (*SendPage) PasteButton

func (sp *SendPage) PasteButton() l.Widget

func (*SendPage) SaveButton

func (sp *SendPage) SaveButton() l.Widget

func (*SendPage) SendButton

func (sp *SendPage) SendButton() l.Widget

func (*SendPage) SmallList

func (sp *SendPage) SmallList(gtx l.Context) l.Dimensions

type State

type State struct {
	// contains filtered or unexported fields
}

func GetNewState

func GetNewState(params *netparams.Params, activePage *uberatomic.String) *State

func (*State) ActivePage

func (s *State) ActivePage() string

func (*State) Balance

func (s *State) Balance() float64

func (*State) BalanceUnconfirmed

func (s *State) BalanceUnconfirmed() float64

func (*State) BestBlockHash

func (s *State) BestBlockHash() *chainhash.Hash

func (*State) BestBlockHeight

func (s *State) BestBlockHeight() int32

func (*State) BumpLastUpdated

func (s *State) BumpLastUpdated()

func (*State) Goroutines

func (s *State) Goroutines() []l.Widget

func (*State) IsReceivingAddress

func (s *State) IsReceivingAddress() bool

func (*State) LastUpdated

func (s *State) LastUpdated() time.Time

func (*State) Load

func (s *State) Load(filename string, pass *string) (err error)

func (*State) Marshal

func (s *State) Marshal() (out *Marshalled)

func (*State) Save

func (s *State) Save(filename string, pass *string) (err error)

func (*State) SetActivePage

func (s *State) SetActivePage(page string)

func (*State) SetAllTxs

func (s *State) SetAllTxs(atxs []btcjson.ListTransactionsResult)

func (*State) SetBalance

func (s *State) SetBalance(total float64)

func (*State) SetBalanceUnconfirmed

func (s *State) SetBalanceUnconfirmed(unconfirmed float64)

func (*State) SetBestBlockHash

func (s *State) SetBestBlockHash(h *chainhash.Hash)

func (*State) SetBestBlockHeight

func (s *State) SetBestBlockHeight(height int32)

func (*State) SetGoroutines

func (s *State) SetGoroutines(gr []l.Widget)

func (*State) SetReceivingAddress

func (s *State) SetReceivingAddress(addr util.Address)

type WalletGUI

type WalletGUI struct {
	State *State

	ChainMutex, WalletMutex   sync.Mutex
	ChainClient, WalletClient *rpcclient.Client
	*gui.Window
	Size    *int
	MainApp *gui.App

	RecentTransactionsWidget l.Widget
	HistoryWidget            l.Widget

	Syncing *uberatomic.Bool

	// ReceiveAddressbook l.Widget
	// SendAddressbook    l.Widget
	ReceivePage *ReceivePage
	SendPage    *SendPage
	// contains filtered or unexported fields
}

func (*WalletGUI) ChainNotifications

func (wg *WalletGUI) ChainNotifications() *rpcclient.NotificationHandlers

func (*WalletGUI) ConsolePage

func (wg *WalletGUI) ConsolePage() *Console

func (*WalletGUI) CreateWalletPage

func (wg *WalletGUI) CreateWalletPage(gtx l.Context) l.Dimensions

func (*WalletGUI) GetAppWidget

func (wg *WalletGUI) GetAppWidget() (a *gui.App)

func (*WalletGUI) GetBools

func (wg *WalletGUI) GetBools() BoolMap

func (*WalletGUI) GetButtons

func (wg *WalletGUI) GetButtons()

func (*WalletGUI) GetCheckables

func (wg *WalletGUI) GetCheckables() CheckableMap

func (*WalletGUI) GetClickables

func (wg *WalletGUI) GetClickables() ClickableMap

func (*WalletGUI) GetIncDecs

func (wg *WalletGUI) GetIncDecs() IncDecMap

func (*WalletGUI) GetInputs

func (wg *WalletGUI) GetInputs() InputMap

func (*WalletGUI) GetLists

func (wg *WalletGUI) GetLists() (o ListMap)

func (*WalletGUI) GetNewReceivingAddress

func (wg *WalletGUI) GetNewReceivingAddress()

func (*WalletGUI) GetNewReceivingQRCode

func (wg *WalletGUI) GetNewReceivingQRCode(qrText string)

func (*WalletGUI) GetPasswords

func (wg *WalletGUI) GetPasswords()

func (*WalletGUI) GetReceivePage

func (wg *WalletGUI) GetReceivePage() (rp *ReceivePage)

func (*WalletGUI) GetRunUnit

func (wg *WalletGUI) GetRunUnit(name string, before, after func(), args ...string) *rununit.RunUnit

func (*WalletGUI) GetSendPage

func (wg *WalletGUI) GetSendPage() (sp *SendPage)

func (*WalletGUI) HelpPage

func (wg *WalletGUI) HelpPage() func(gtx l.Context) l.Dimensions

func (*WalletGUI) HistoryPage

func (wg *WalletGUI) HistoryPage() l.Widget

func (*WalletGUI) HistoryPageStatusFilter

func (wg *WalletGUI) HistoryPageStatusFilter() l.Widget

func (*WalletGUI) HistoryPageView

func (wg *WalletGUI) HistoryPageView() l.Widget

func (*WalletGUI) OverviewPage

func (wg *WalletGUI) OverviewPage() l.Widget

func (*WalletGUI) Page

func (wg *WalletGUI) Page(title string, widget gui.Widgets) func(gtx l.Context) l.Dimensions

func (*WalletGUI) PageTopBarButton

func (wg *WalletGUI) PageTopBarButton(
	name string, index int, ico *[]byte, onClick func(string), app *gui.App,
	highlightColor string,
) func(gtx l.Context) l.Dimensions

func (*WalletGUI) RecentTransactions

func (wg *WalletGUI) RecentTransactions(n int, listName string) l.Widget

RecentTransactions generates a display showing recent transactions

fields to use: Address, Amount, BlockIndex, BlockTime, Category, Confirmations, Generated

func (*WalletGUI) Run

func (wg *WalletGUI) Run() (err error)

func (*WalletGUI) RunStatusPanel

func (wg *WalletGUI) RunStatusPanel(gtx l.Context) l.Dimensions

func (*WalletGUI) SetNodeRunState

func (wg *WalletGUI) SetNodeRunState(b bool)

func (*WalletGUI) SetWalletRunState

func (wg *WalletGUI) SetWalletRunState(b bool)

func (*WalletGUI) SideBarButton

func (wg *WalletGUI) SideBarButton(title, page string, index int) func(gtx l.Context) l.Dimensions

func (*WalletGUI) StatusBarButton

func (wg *WalletGUI) StatusBarButton(
	name string,
	index int,
	ico *[]byte,
	onClick func(string),
	app *gui.App,
) func(gtx l.Context) l.Dimensions

func (*WalletGUI) Tickers

func (wg *WalletGUI) Tickers()

func (*WalletGUI) WalletAndClientRunning

func (wg *WalletGUI) WalletAndClientRunning() bool

func (*WalletGUI) WalletNotifications

func (wg *WalletGUI) WalletNotifications() *rpcclient.NotificationHandlers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to