uiutils

package
v0.0.0-...-4cb4cf9 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Center

func Center(width, height int, p tview.Primitive) *tview.Flex

Center returns a new primitive which shows the provided primitive in its center, given the provided primitive's size.

func CenterHorizontally

func CenterHorizontally(width int, p tview.Primitive) *tview.Flex

CenterHorizontally returns a new primitive which shows the provided primitive in its horizontal center, given the provided primitive's width.

func CenterVertically

func CenterVertically(height int, p tview.Primitive) *tview.Flex

CenterVertically returns a new primitive which shows the provided primitive in its vertical center, given the provided primitive's height.

func CenterVerticallyDynamically

func CenterVerticallyDynamically(p tview.Primitive) *tview.Flex

CenterVerticallyDynamically returns a new primitive which shows the provided primitive in its vertical center based on its render size, will dynamically update with the element.

func ErrorToUserFeedback

func ErrorToUserFeedback(err error) (feedback string)

ErrorToUserFeedback will convert an error object into a user-friendly message.

func MinFormSize

func MinFormSize(form *tview.Form) (width, height int)

MinFormSize returns a minimum width and height needed for a form. This does not yet handle buttons or horizontal forms.

func MinListSize

func MinListSize(list *customshortcutlist.List) (width, height int)

MinListSize returns a minimum width and height needed for a list. Does not yet handle secondary text.

func MinTextViewWithNoWrapSize

func MinTextViewWithNoWrapSize(textView *tview.TextView) (width, height int)

MinTextViewWithNoWrapSize returns the minimum width and height needed for a textview. This does not yet handle wrapping.

Types

This section is empty.

Jump to

Keyboard shortcuts

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