common

package
v0.0.0-...-b836c51 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TruncateString

func TruncateString(s string, max int) string

TruncateString is a convenient wrapper around truncate.TruncateString.

Types

type Common

type Common struct {
	Width, Height int
	Styles        *Styles
	Zone          *zone.Manager
	Output        *termenv.Output
}

Common is a struct all components should embed.

func NewCommon

func NewCommon(width, height int, s *Styles) Common

NewCommon returns a new Common struct.

func (*Common) SetSize

func (c *Common) SetSize(width, height int)

SetSize sets the width and height of the common struct.

type Styles

type Styles struct {
	AppName      Style
	App          Style
	CliArgs      Style
	Comment      Style
	CyclingChars Style
	ErrorHeader  Style
	ErrorDetails Style
	Flag         Style
	FlagComma    Style
	FlagDesc     Style
	InlineCode   Style
	Link         Style
	Pipe         Style
	Quote        Style

	Context     Style
	ContextTag  Style
	Goal        Style
	GoalTag     Style
	Question    Style
	QuestionTag Style

	Command Style

	Tabs         Style
	TabInactive  Style
	TabActive    Style
	TabSeparator Style

	TopLevelNormalTab    Style
	TopLevelActiveTab    Style
	TopLevelActiveTabDot Style
}

func MakeStyles

func MakeStyles(r *Renderer) (s Styles)

Jump to

Keyboard shortcuts

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