misc

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlockTheme *dao.Block
View Source
var Config *dao.Config
View Source
var ExecBtn *tview.Button
View Source
var ExecLastFocus *tview.Primitive
View Source
var HelpBtn *tview.Button
View Source
var HelpModal *tview.Modal

Misc

View Source
var MainPage *tview.Pages
View Source
var Pages *tview.Pages
View Source
var PreviousModel interface{}
View Source
var PreviousPane tview.Primitive
View Source
var ProjectBtn *tview.Button

Nav

View Source
var ProjectsLastFocus *tview.Primitive
View Source
var RunBtn *tview.Button
View Source
var RunLastFocus *tview.Primitive
View Source
var TUITheme *dao.TUI
View Source
var TaskBtn *tview.Button
View Source
var TasksLastFocus *tview.Primitive
View Source
var ThemeName *string

Functions

func Colorize

func Colorize(value string, opts dao.ColorOptions) string

func ColorizeTitle

func ColorizeTitle(value string, opts dao.ColorOptions) string

func FocusNext

func FocusNext(elements []*TItem) *tview.Primitive

func FocusPage

func FocusPage(event *tcell.EventKey, focusable []*TItem)

func FocusPrevious

func FocusPrevious(elements []*TItem) *tview.Primitive

func FocusPreviousPage

func FocusPreviousPage()

func GetTexztModalSize

func GetTexztModalSize(text string) (int, int)

func LoadStyles

func LoadStyles(tui *dao.TUI)

func PadString

func PadString(name string) string

func SetActive

func SetActive(box *tview.Box, title string, active bool)

Types

type Event

type Event struct {
	Name string
	Data interface{}
}

type EventEmitter

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

func NewEventEmitter

func NewEventEmitter() *EventEmitter

func (*EventEmitter) Publish

func (ee *EventEmitter) Publish(event Event)

func (*EventEmitter) PublishAndWait

func (ee *EventEmitter) PublishAndWait(event Event)

func (*EventEmitter) Subscribe

func (ee *EventEmitter) Subscribe(eventName string, listener EventListener)

type EventListener

type EventListener func(Event)

type StyleOption

type StyleOption struct {
	Fg    tcell.Color
	Bg    tcell.Color
	Attr  tcell.AttrMask
	Align int

	FgStr     string
	BgStr     string
	AttrStr   string
	AlignStr  string
	FormatStr string

	Style tcell.Style
}
var STYLE_BORDER StyleOption

Border

var STYLE_BORDER_FOCUS StyleOption
var STYLE_BUTTON StyleOption

Button

var STYLE_BUTTON_ACTIVE StyleOption
var STYLE_DEFAULT StyleOption

Default

var STYLE_FILTER_LABEL StyleOption

Filter

var STYLE_FILTER_TEXT StyleOption
var STYLE_ITEM StyleOption

Item

var STYLE_ITEM_FOCUSED StyleOption
var STYLE_ITEM_SELECTED StyleOption
var STYLE_SEARCH_LABEL StyleOption

Search

var STYLE_SEARCH_TEXT StyleOption
var STYLE_SHORTCUT_LABEL StyleOption

Shortcut

var STYLE_SHORTCUT_TEXT StyleOption
var STYLE_TABLE_HEADER StyleOption

Table Header

var STYLE_TITLE StyleOption

Title

var STYLE_TITLE_ACTIVE StyleOption

type TItem

type TItem struct {
	Primitive tview.Primitive
	Box       *tview.Box
}

func GetTUIItem

func GetTUIItem(primitive tview.Primitive, box *tview.Box) *TItem

type ThreadSafeWriter

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

ThreadSafeWriter wraps a tview.ANSIWriter to make it thread-safe

func NewThreadSafeWriter

func NewThreadSafeWriter(view *tview.TextView) *ThreadSafeWriter

NewThreadSafeWriter creates a new thread-safe writer for tview

func (*ThreadSafeWriter) Write

func (w *ThreadSafeWriter) Write(p []byte) (n int, err error)

Write implements io.Writer interface in a thread-safe manner

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳