blockwidget

package
v0.0.0-...-45b0304 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

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

func New

func New() Block

func (Block) Bordered

func (b Block) Bordered() Block

func (Block) Double

func (b Block) Double() Block

func (Block) Inner

func (b Block) Inner(area bento.Rect) bento.Rect

func (Block) Render

func (b Block) Render(area bento.Rect, buffer *bento.Buffer)

func (Block) Rounded

func (b Block) Rounded() Block

func (Block) Sharp

func (b Block) Sharp() Block

func (Block) Thick

func (b Block) Thick() Block

func (Block) WithBorderSides

func (b Block) WithBorderSides(borders ...Side) Block

func (Block) WithBorderStyle

func (b Block) WithBorderStyle(style bento.Style) Block

func (Block) WithBorderType

func (b Block) WithBorderType(borderType BorderType) Block

func (Block) WithPadding

func (b Block) WithPadding(padding bento.Padding) Block

func (Block) WithStyle

func (b Block) WithStyle(style bento.Style) Block

func (Block) WithTitle

func (b Block) WithTitle(title Title) Block

func (Block) WithTitlePosition

func (b Block) WithTitlePosition(position TitlePosition) Block

func (Block) WithTitleStr

func (b Block) WithTitleStr(title string) Block

func (Block) WithTitlesAlignment

func (b Block) WithTitlesAlignment(alignment bento.Alignment) Block

func (Block) WithTitlesStyle

func (b Block) WithTitlesStyle(style bento.Style) Block

type BorderSet

type BorderSet struct {
	TopLeft,
	TopRight,
	BottomLeft,
	BottomRight,
	VerticalLeft,
	VerticalRight,
	HorizontalTop,
	HorizontalBottom string
}

func (BorderSet) WithBottomLeft

func (b BorderSet) WithBottomLeft(s string) BorderSet

func (BorderSet) WithBottomRight

func (b BorderSet) WithBottomRight(s string) BorderSet

func (BorderSet) WithHorizontalBottom

func (b BorderSet) WithHorizontalBottom(s string) BorderSet

func (BorderSet) WithHorizontalTop

func (b BorderSet) WithHorizontalTop(s string) BorderSet

func (BorderSet) WithTopLeft

func (b BorderSet) WithTopLeft(s string) BorderSet

func (BorderSet) WithTopRight

func (b BorderSet) WithTopRight(s string) BorderSet

func (BorderSet) WithVerticalLeft

func (b BorderSet) WithVerticalLeft(s string) BorderSet

func (BorderSet) WithVerticalRight

func (b BorderSet) WithVerticalRight(s string) BorderSet

type BorderType

type BorderType int
const (
	BorderTypeSharp BorderType = iota
	BorderTypeRounded
	BorderTypeDouble
	BorderTypeThick
)

func (BorderType) Set

func (b BorderType) Set() BorderSet

type Side

type Side uint8
const (
	SideNone   Side = 0b0000
	SideTop    Side = 0b0001
	SideRight  Side = 0b0010
	SideBottom Side = 0b0100
	SideLeft   Side = 0b1000
	SideAll         = SideTop | SideRight | SideBottom | SideLeft
)

type Title

type Title struct {
	Alignment bento.Alignment
	Position  *TitlePosition
	Line      textwidget.Line
}

func NewTitle

func NewTitle(line textwidget.Line) Title

func NewTitleStr

func NewTitleStr(title string) Title

func (Title) Bottom

func (t Title) Bottom() Title

func (Title) Center

func (t Title) Center() Title

func (Title) Left

func (t Title) Left() Title

func (Title) Right

func (t Title) Right() Title

func (Title) Top

func (t Title) Top() Title

func (Title) WithAlignment

func (t Title) WithAlignment(alignment bento.Alignment) Title

func (Title) WithPosition

func (t Title) WithPosition(position TitlePosition) Title

type TitlePosition

type TitlePosition int
const (
	TitlePositionTop TitlePosition = iota
	TitlePositionBottom
)

Jump to

Keyboard shortcuts

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