status

package
v0.0.0-...-bbcbdef Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Unlicense Imports: 1 Imported by: 0

Documentation

Overview

Package status contains types that plugins can make use of in their bindables for displaying status to the user. This package is kept on its own to reduce the frequency with which plugins importing it must be rebuilt.

For more information, see vidar's plugin package documentation.

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorErr = gxui.Color{
		R: 1,
		G: 0.2,
		B: 0,
		A: 1,
	}
	ColorWarn = gxui.Color{
		R: 0.8,
		G: 0.7,
		B: 0.1,
		A: 1,
	}
	ColorInfo = gxui.Color{
		R: 0.1,
		G: 0.8,
		B: 0,
		A: 1,
	}
)

Functions

This section is empty.

Types

type General

type General struct {
	Theme LabelCreator

	Err  string
	Warn string
	Info string
}

General is a type used to keep track of a general status. It implements commander.Statuser so that other types can simply embed it and rely on its functionality.

Types that embed this *must* set its Theme field.

func (*General) Clear

func (s *General) Clear()

Clear clears all fields in s.

func (*General) Status

func (s *General) Status() gxui.Control

Status returns the gxui.Control element that displays s's status.

type LabelCreator

type LabelCreator interface {
	CreateLabel() gxui.Label
}

LabelCreator is used by the status package to create labels.

Jump to

Keyboard shortcuts

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