screen

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const WELCOME_MESSAGE = "Welcome! You can see available actions on the bottom of the screen, press `?` to toggle the help message."

Variables

This section is empty.

Functions

func ContentHeight

func ContentHeight(screen Screen, width int) int

Types

type GoToScreen

type GoToScreen struct {
	Tag ScreenTag
}

type HomeScreen

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

func NewHomeScreen

func NewHomeScreen() HomeScreen

func (HomeScreen) Clear

func (screen HomeScreen) Clear() Screen

func (HomeScreen) Keys

func (screen HomeScreen) Keys() tools.Keybinds

func (HomeScreen) Lock

func (screen HomeScreen) Lock() bool

func (HomeScreen) Messages

func (screen HomeScreen) Messages() []tools.Message

func (HomeScreen) Notifications

func (screen HomeScreen) Notifications() []tools.Notification

func (HomeScreen) Title

func (screen HomeScreen) Title() string

func (HomeScreen) Update

func (screen HomeScreen) Update(raw tea.Msg) (Screen, tea.Cmd)

func (HomeScreen) View

func (screen HomeScreen) View(width int) []string

type Screen

type Screen interface {
	Title() string
	Update(raw tea.Msg) (Screen, tea.Cmd)
	View(width int) []string
	Clear() Screen
	Messages() []tools.Message
	Notifications() []tools.Notification
	Keys() tools.Keybinds
	Lock() bool
}

type ScreenTag

type ScreenTag string
const (
	HOME_SCREEN ScreenTag = "home"
	USER_SCREEN ScreenTag = "user"
)

type UserItem

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

func NewUserItem

func NewUserItem(id string) UserItem

func (UserItem) Description

func (item UserItem) Description() string

func (UserItem) Id

func (item UserItem) Id() string

func (UserItem) Title

func (item UserItem) Title() string

type UserList

type UserList struct{}

func NewUserList

func NewUserList() UserList

func (UserList) Items

func (list UserList) Items() []component.Item

func (UserList) Size

func (list UserList) Size() int

type UserScreen

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

func NewUserScreen

func NewUserScreen() UserScreen

func (UserScreen) Clear

func (screen UserScreen) Clear() Screen

func (UserScreen) Keys

func (screen UserScreen) Keys() tools.Keybinds

func (UserScreen) Lock

func (screen UserScreen) Lock() bool

func (UserScreen) Messages

func (screen UserScreen) Messages() []tools.Message

func (UserScreen) Notifications

func (screen UserScreen) Notifications() []tools.Notification

func (UserScreen) Title

func (screen UserScreen) Title() string

func (UserScreen) Update

func (screen UserScreen) Update(raw tea.Msg) (Screen, tea.Cmd)

func (UserScreen) View

func (screen UserScreen) View(width int) []string

Jump to

Keyboard shortcuts

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