model

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 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 BaseModel

type BaseModel struct {
	ID     string
	Width  int
	Height int
	Active bool
}

func NewBaseModel

func NewBaseModel() *BaseModel

func (*BaseModel) Blur

func (m *BaseModel) Blur()

失去焦点

func (*BaseModel) Focus

func (m *BaseModel) Focus()

获取焦点

func (*BaseModel) Resize

func (m *BaseModel) Resize(width int, height int)

调整尺寸

type BoxModel added in v1.2.0

type BoxModel struct {
	*BaseModel

	// header title
	HTitle string

	// footer title
	FTitle string

	BorderNormalColor lipgloss.Color

	BorderActiveColor lipgloss.Color
}

基础容器模型

func NewBoxModel added in v1.2.0

func NewBoxModel() *BoxModel

func (*BoxModel) GetBoxStyle added in v1.2.0

func (m *BoxModel) GetBoxStyle() lipgloss.Style

func (*BoxModel) Render added in v1.2.0

func (m *BoxModel) Render(innerView string) string

render with inner view

type IBaseModel

type IBaseModel interface {
	Resize(width int, height int)
	Focus()
	Blur()
}

Jump to

Keyboard shortcuts

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