style

package
v0.0.0-...-110b06d Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorTitle     = tcell.ColorOrange
	ColorText      = tcell.ColorWhiteSmoke
	ColorPrimary   = tcell.ColorDeepSkyBlue
	ColorSecondary = tcell.ColorDarkGray
	ColorContent   = tcell.ColorLightSkyBlue
	ColorBlack     = tcell.ColorBlack
	ColorDark      = tcell.ColorDarkSlateGray
)

Predefined colors.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flex

type Flex struct {
	Object *tview.Flex
}

Flex ...

func NewFlex

func NewFlex() *Flex

NewFlex return custom Flex object with predefined styles.

func (*Flex) AsModal

func (f *Flex) AsModal(title string) *Flex

AsModal add custom styles for flex.

func (*Flex) WithColumnDirection

func (f *Flex) WithColumnDirection() *Flex

WithColumnDirection add direction inside flex object.

func (*Flex) WithRowDirection

func (f *Flex) WithRowDirection() *Flex

WithRowDirection add direction inside flex object.

type Form

type Form struct {
	Object *tview.Form
}

Form ...

func NewForm

func NewForm() *Form

NewForm return custom Form object with predefined styles.

type Table

type Table struct {
	Object *tview.Table
	// contains filtered or unexported fields
}

Table ...

func NewTable

func NewTable() *Table

NewTable return custom Table object with predifined styles.

func (*Table) AddCellContent

func (t *Table) AddCellContent(r, c int, value string)

AddCellContent add item [row, col] as table value with Content color style.

func (*Table) AddCellHeader

func (t *Table) AddCellHeader(r, c int, value string)

AddCellHeader add item [row, col] as table Header.

func (*Table) AddCellPrimary

func (t *Table) AddCellPrimary(r, c int, value string)

AddCellPrimary add item [row, col] as table value with Primary color style.

func (*Table) AddCellSecondary

func (t *Table) AddCellSecondary(r, c int, value string)

AddCellSecondary add item [row, col] as table value with Secondary color style.

func (*Table) AddCellText

func (t *Table) AddCellText(r, c int, value string)

AddCellText add item [row, col] as table value with Default color style.

func (*Table) AddCellTitle

func (t *Table) AddCellTitle(r, c int, value string)

AddCellTitle add item [row, col] as table value with Title color style.

func (*Table) AsContent

func (t *Table) AsContent() *Table

AsContent add custom styles for table.

func (*Table) WithCount

func (t *Table) WithCount(count int) *Table

WithCount add to table title count of rows.

func (*Table) WithExpansion

func (t *Table) WithExpansion() *Table

WithExpansion set width: 100%.

func (*Table) WithFixedHeader

func (t *Table) WithFixedHeader() *Table

WithFixedHeader make first row fixed.

func (*Table) WithTitle

func (t *Table) WithTitle(title string) *Table

WithTitle add title to table.

type Text

type Text struct {
	Object *tview.TextView
}

Text ...

func NewText

func NewText() *Text

NewText return custom Text object with predefined styles.

func (*Text) AsLogger

func (t *Text) AsLogger() *Text

AsLogger add custom styles for text.

Jump to

Keyboard shortcuts

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