ui

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: ISC Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

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.

func UseLogger

func UseLogger(logger slog.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type C

type C = layout.Context

type D

type D = layout.Dimensions

type Window

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

Window represents the app window (and UI in general). There should only be one. Window maintains an internal state of variables to determine what to display at any point in time.

func CreateWindow

func CreateWindow(wal *wallet.Wallet) (*Window, error)

CreateWindow creates and initializes a new window with start as the first page displayed. Should never be called more than once as it calls app.NewWindow() which does not support being called more than once.

func (*Window) HandleEvents added in v1.7.0

func (win *Window) HandleEvents()

HandleEvents runs main event handling and page rendering loop.

func (*Window) NewLoad

func (win *Window) NewLoad() (*load.Load, error)

func (*Window) SubscribeKeyEvent added in v1.7.0

func (win *Window) SubscribeKeyEvent(eventChan chan *key.Event, pageID string)

SubscribeKeyEvent subscribes pages for key events.

func (*Window) UnsubscribeKeyEvent added in v1.7.0

func (win *Window) UnsubscribeKeyEvent(pageID string) error

UnsubscribeKeyEvent unsubscribe a page with {pageID} from receiving key events.

type WriteClipboard

type WriteClipboard struct {
	Text string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL