styled

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 2 Imported by: 29

Documentation

Overview

Package styled provides a colored styled widget.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeRange

type AttributeRange struct {
	Start  int
	End    int
	Styler gowid.ICellStyler
}

TODO - make a constructor to keep these fields unexported

type BlinkIfSelectedForCopy

type BlinkIfSelectedForCopy struct{}

func (BlinkIfSelectedForCopy) AlterWidget

func (r BlinkIfSelectedForCopy) AlterWidget(w gowid.IWidget, app gowid.IApp) gowid.IWidget

type BoldIfSelectedForCopy

type BoldIfSelectedForCopy struct{}

func (BoldIfSelectedForCopy) AlterWidget

func (r BoldIfSelectedForCopy) AlterWidget(w gowid.IWidget, app gowid.IApp) gowid.IWidget

type Options

type Options struct {
	OverWrite bool // If true, then apply the style over any style below; if false, style underneath takes precedence
}

type ReverseIfSelectedForCopy

type ReverseIfSelectedForCopy struct{}

func (ReverseIfSelectedForCopy) AlterWidget

type UsePaletteIfSelectedForCopy

type UsePaletteIfSelectedForCopy struct {
	Entry string
}

func (UsePaletteIfSelectedForCopy) AlterWidget

type Widget

type Widget struct {
	gowid.IWidget

	*gowid.Callbacks
	gowid.SubWidgetCallbacks
	// contains filtered or unexported fields
}

func New

func New(inner gowid.IWidget, styler gowid.ICellStyler, opts ...Options) *Widget

Very simple way to color an entire widget

func NewExt

func NewExt(inner gowid.IWidget, notFocusStyler, focusStyler gowid.ICellStyler, opts ...Options) *Widget

func NewFocus

func NewFocus(inner gowid.IWidget, styler gowid.ICellStyler, opts ...Options) *Widget

func NewInvertedFocus

func NewInvertedFocus(inner gowid.IWidget, styler gowid.ICellStyler, opts ...Options) *Widget

func NewNoFocus

func NewNoFocus(inner gowid.IWidget, styler gowid.ICellStyler, opts ...Options) *Widget

func NewWithRanges

func NewWithRanges(inner gowid.IWidget, notFocusRange []AttributeRange, focusRange []AttributeRange, opts ...Options) *Widget

func (*Widget) Render

func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas

func (*Widget) RenderSize

func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox

func (*Widget) SetSubWidget

func (w *Widget) SetSubWidget(inner gowid.IWidget, app gowid.IApp)

func (*Widget) String

func (w *Widget) String() string

func (*Widget) SubWidget

func (w *Widget) SubWidget() gowid.IWidget

func (*Widget) SubWidgetSize

func (w *Widget) SubWidgetSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderSize

func (*Widget) UserInput

func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool

Jump to

Keyboard shortcuts

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