style

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KEYWORD_NORMAL     = janet.Keyword("normal")
	KEYWORD_ROUNDED    = janet.Keyword("rounded")
	KEYWORD_BLOCK      = janet.Keyword("block")
	KEYWORD_OUTER_HALF = janet.Keyword("outer-half")
	KEYWORD_INNER_HALF = janet.Keyword("inner-half")
	KEYWORD_THICK      = janet.Keyword("thick")
	KEYWORD_DOUBLE     = janet.Keyword("double")
	KEYWORD_HIDDEN     = janet.Keyword("hidden")

	// Special border behavior
	KEYWORD_NONE = janet.Keyword("none")
)
View Source
var (
	KEYWORD_RIGHT  = janet.Keyword("right")
	KEYWORD_LEFT   = janet.Keyword("left")
	KEYWORD_CENTER = janet.Keyword("center")
	KEYWORD_TOP    = janet.Keyword("top")
	KEYWORD_BOTTOM = janet.Keyword("bottom")
)
View Source
var DefaultBorder = NewBorder(lipgloss.RoundedBorder())

Functions

func FillBorder

func FillBorder(
	image image.Image,
	row, col, rows, cols int,
	border Border,
)

FillBorder detects whether the cell specified by row and col can be replaced with a different border glyph that links its adjacent border cells together nicely.

func GhostCursor added in v0.10.0

func GhostCursor(image image.Image, row, col int)

GhostCursor adds a (standardized) "ghost" cursor to an image. This shows the user where the cursor actually is.

Types

type Border

type Border struct {
	lipgloss.Border
	// contains filtered or unexported fields
}

func NewBorder

func NewBorder(border lipgloss.Border) Border

func (*Border) MarshalJanet

func (b *Border) MarshalJanet() interface{}

func (Border) None added in v0.8.0

func (b Border) None() bool

None reports whether this Border is none, or should not be rendered.

func (Border) Smoothable

func (b Border) Smoothable() bool

func (*Border) UnmarshalJanet

func (b *Border) UnmarshalJanet(value *janet.Value) (err error)

type Color added in v0.6.0

type Color struct {
	lipgloss.Color
}

func NewColor added in v0.12.0

func NewColor(c string) *Color

func (*Color) Emu added in v0.6.0

func (c *Color) Emu() emu.Color

func (*Color) MarshalJanet added in v0.6.0

func (c *Color) MarshalJanet() interface{}

func (*Color) UnmarshalJanet added in v0.6.0

func (c *Color) UnmarshalJanet(value *janet.Value) (err error)

type ColorMap added in v1.0.0

type ColorMap struct {
	// contains filtered or unexported fields
}

func NewColorMap added in v1.0.0

func NewColorMap(mapping map[lipgloss.Color]lipgloss.Color) *ColorMap

func (*ColorMap) Apply added in v1.0.0

func (c *ColorMap) Apply(i image.Image)

Apply applies the color mapping to the Image.

func (*ColorMap) MarshalJanet added in v1.0.0

func (c *ColorMap) MarshalJanet() interface{}

func (*ColorMap) UnmarshalJanet added in v1.0.0

func (c *ColorMap) UnmarshalJanet(value *janet.Value) (err error)

type Style added in v0.6.0

type Style struct {
	lipgloss.Style
}

func (*Style) UnmarshalJanet added in v0.6.0

func (s *Style) UnmarshalJanet(value *janet.Value) (err error)

type Unfiltered added in v1.0.0

type Unfiltered interface {
	UnfilteredState() *tty.State
}

Unfiltered allows Screens to return their original visual state unaltered by a color map.

Directories

Path Synopsis
Code generated by gen.go; DO NOT EDIT.
Code generated by gen.go; DO NOT EDIT.

Jump to

Keyboard shortcuts

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