view

package
v0.0.0-...-6d126c1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package view contains all the different views for the tui

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHeight

func GetHeight(style lipgloss.Style) int

GetHeight returns the inner width of a lipgloss Style

func GetOuterHeight

func GetOuterHeight(style lipgloss.Style) int

GetOuterHeight returns the outer border size of a lipgloss Style

func GetOuterWidth

func GetOuterWidth(style lipgloss.Style) int

GetOuterWidth returns the outer border size of a lipgloss Style

func GetWidth

func GetWidth(style lipgloss.Style) int

GetWidth returns the inner width of a lipgloss Style

func ImageToString

func ImageToString(img image.Image, width, height int) string

ImageToString converts an image to a string If either widht or height is 0 then the aspect ratio is kept

Types

type MsgSize

type MsgSize struct {
	Sizes map[string]Size
}

MsgSize is a message to let a view know its size The key of Sizes is the name of a view

type Size

type Size struct {
	Width  int
	Height int
}

Size contains the size data

type UpdateData

type UpdateData struct {
	Name     string
	View     View
	Update   func(ctx context.Context, view View) (tea.Msg, error)
	Interval int
}

UpdateData represents the data needed to update a view

type View

type View interface {
	Init() tea.Cmd
	Name() string
	Update(tea.Msg) (View, tea.Cmd)
	View() string
	GetUpdateDatas() []UpdateData
}

View represents a view

Directories

Path Synopsis
Package event provides the functions to draw all the upcoming zeus events on a TUI
Package event provides the functions to draw all the upcoming zeus events on a TUI
Package gamification provides the functions to draw an overview of gamification on a TUI
Package gamification provides the functions to draw an overview of gamification on a TUI
Package message provides the functions to draw all the cammie messages on a TUI
Package message provides the functions to draw all the cammie messages on a TUI
Package song provides the functions to draw an overview of the song integration
Package song provides the functions to draw an overview of the song integration
Package tap provides the functions to draw an overview of the recent tap orders on a TUI
Package tap provides the functions to draw an overview of the recent tap orders on a TUI
Package zess provides the functions to draw an overview of the zess scans on a TUI
Package zess provides the functions to draw an overview of the zess scans on a TUI

Jump to

Keyboard shortcuts

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