label

package
v0.0.0-...-af996ba Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CellFactory

type CellFactory struct {
	// Height is returned when CellHeight() is called.
	Height float64
}

CellFactory provides simple text cells.

func (*CellFactory) CellHeight

func (f *CellFactory) CellHeight() float64

CellHeight implements the widget.CellFactory interface.

func (*CellFactory) CreateCell

func (f *CellFactory) CreateCell(owner ui.Widget, element interface{}, index int, selected, focused bool) ui.Widget

CreateCell implements the widget.CellFactory interface.

type Label

type Label struct {
	widget.Block
	// contains filtered or unexported fields
}

Label represents a non-interactive piece of text.

func New

func New(text string) *Label

New creates a label with the specified text.

func NewWithFont

func NewWithFont(text string, font *font.Font) *Label

NewWithFont creates a label with the specified text and font.

func (*Label) SetForeground

func (label *Label) SetForeground(color color.Color)

SetForeground sets the color used when drawing the text.

func (*Label) Sizes

func (label *Label) Sizes(hint geom.Size) (min, pref, max geom.Size)

Sizes implements Sizer

Jump to

Keyboard shortcuts

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