gui

package
v1.2.20 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

View Source
const (
	Border_Left_Up      = "┌"
	Border_Left_Bottom  = "└"
	Border_Right_Up     = "┐"
	Border_Right_Bottom = "┘"
	Border_Horizontal   = "─"
	Border_Vertical     = "│"
	Border_T            = "┬"
	Border_Un_T         = "┴"
	Border_Left_Center  = "├"
	Border_Right_Center = "┤"
	Border_Center       = "┼"

	Reg_Chinese      = "^[\u4E00-\u9FA5]+$"
	Reg_Chinese_Sign = "" /* 130-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func Background added in v1.2.16

func Background()

func IsChinese added in v1.0.1

func IsChinese(text string) bool

func Middle added in v1.2.15

func Middle(left, right string) string

func Println added in v1.2.15

func Println(left, middle, right string)

func PrintlnFailure added in v1.2.15

func PrintlnFailure(format string, args ...any)

func PrintlnNormal added in v1.2.15

func PrintlnNormal(left, right string)

func PrintlnOk added in v1.2.15

func PrintlnOk(format string, args ...any)

Types

type Border added in v1.1.0

type Border struct {
	Data string
	Len  int
	// contains filtered or unexported fields
}

func NewBorder added in v1.1.0

func NewBorder(data string) *Border

func (*Border) Adjust added in v1.1.0

func (b *Border) Adjust(maxLen int)

func (*Border) Text added in v1.1.0

func (b *Border) Text() string

type Column added in v1.1.0

type Column struct {
	Data string
	Len  int
	// contains filtered or unexported fields
}

func NewColumn added in v1.1.0

func NewColumn(data string, p Position) *Column

func NewColumnBy added in v1.1.1

func NewColumnBy(data string, p Position, color color.Color) *Column

func (*Column) Add added in v1.1.0

func (r *Column) Add(p Position)

func (*Column) Adjust added in v1.1.0

func (r *Column) Adjust(maxLen int)

func (*Column) DownBorder added in v1.1.0

func (r *Column) DownBorder() string

func (*Column) Reset added in v1.1.0

func (r *Column) Reset(p Position)

func (*Column) Text added in v1.1.0

func (r *Column) Text() string

func (*Column) UpBorder added in v1.1.0

func (r *Column) UpBorder() string

type Position added in v1.1.0

type Position byte
const (
	Position_Left_Up    Position = 1
	Position_Left       Position = 2
	Position_Right_Up   Position = 3
	Position_Right      Position = 4
	Position_Center     Position = 5
	Position_Up         Position = 6
	Position_Down       Position = 7
	Position_Left_Down  Position = 8
	Position_Right_Down Position = 9
)

type Row

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

func NewRow

func NewRow(index int) *Row

func (*Row) Add added in v1.1.0

func (r *Row) Add(data string)

func (*Row) AddColor added in v1.1.1

func (r *Row) AddColor(data string, color color.Color)

func (*Row) Adjust

func (t *Row) Adjust(index, maxLen int)

func (*Row) ColumnLen added in v1.1.0

func (t *Row) ColumnLen(index int) int

func (*Row) DownBorder added in v1.1.0

func (t *Row) DownBorder() string

func (*Row) Final added in v1.1.0

func (r *Row) Final(rowCount int)

func (*Row) Text added in v1.1.0

func (t *Row) Text() string

func (*Row) UpBorder added in v1.1.0

func (t *Row) UpBorder() string

type Table

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

func NewTable

func NewTable() *Table

func (*Table) Add

func (t *Table) Add(index int, text string)

func (*Table) AddAny added in v1.1.0

func (t *Table) AddAny(index int, data any)

func (*Table) AddColor added in v1.1.1

func (t *Table) AddColor(index int, text string, color color.Color)

func (*Table) AddInt added in v1.1.0

func (t *Table) AddInt(index, data int)

func (*Table) AddRow added in v1.1.1

func (t *Table) AddRow(row *Row)

func (*Table) Show

func (t *Table) Show()

type Wrap added in v1.2.19

type Wrap struct {
	Weight int
	// contains filtered or unexported fields
}

func NewWrap added in v1.2.19

func NewWrap(data string, weight int, pos Position) *Wrap

Jump to

Keyboard shortcuts

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