ui

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: ISC Imports: 24 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 {
	*giouiApp.Window

	// Quit channel used to trigger background process to begin implementing the
	// shutdown protocol.
	Quit chan struct{}
	// IsShutdown channel is used to report that background processes have
	// completed shutting down, therefore the UI processes can finally stop.
	IsShutdown chan struct{}
	// 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(appInfo *load.AppInfo) (*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

func (win *Window) HandleEvents()

HandleEvents runs main event handling and page rendering loop.

func (*Window) NewLoad

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

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