style

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 6 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 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)

Jump to

Keyboard shortcuts

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