msgs

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlinkMsg

type BlinkMsg struct {
	Name string // name of the target textinput
}

BlinkMsg is a message that causes the cursor to blink.

type BlurMsg

type BlurMsg struct {
	Name string // name of the target textinput
}

BlurMsg is published when the textinput blurs.

type DataMsg

type DataMsg[T any] struct {
	Name string // name of the target scrolltable
	Data []T    //the data to show in the scrolltable
}

DataMsg is a message to update the data in the scrolltable.

type ErrorMsg

type ErrorMsg struct{ Err error }

ErrorMsg is a message that contains an error.

func (ErrorMsg) Error

func (e ErrorMsg) Error() string

Error stringifies ErrorMsg.

type FiltersMsg

type FiltersMsg []string

FiltersMsg is a message that changes the display of the currently active filters.

type FocusMsg

type FocusMsg struct {
	Name string // name of the target textinput
}

FocusMsg is used to focus a textinput.

type FolderMsg

type FolderMsg string

FolderMsg is a message that changes the current folder.

type InputChangedMsg

type InputChangedMsg struct {
	Name string // name of the target textinput
	Text string // the current text in the textinput
}

InputChangedMsg is published when the value in a textinput changes.

type NavMsg string

NavMsg is a message that changes the nav display in the header.

type PromptMsg

type PromptMsg struct {
	Name   string // name of the target textinput
	Prompt string // text to set on the textinput
}

PromptMsg sets the prompt of a textinput.

type SelectionChangedMsg

type SelectionChangedMsg[T any] struct {
	Name      string // name of the target srolltable
	Empty     bool   // whether the frame is empty
	Selection T      // the selected item (if any) in the frame
}

SelectionChangedMsg is published when the scrolltable selection changes.

type SizeMsg

type SizeMsg struct {
	Name   string // name of the target component
	Width  int    // the max width the component can occupy
	Height int    // the max height the component can occupy
}

SizeMsg is a message to inform the component it needs to resize.

type TextMsg

type TextMsg struct {
	Name string // name of the target textinput
	Text string // text to set on the textinput
}

TextMsg sets the text of a textinput.

type View

type View string

View is which View to show.

const (
	ViewBooks View = "books" // show a listing of books
	ViewError View = "error" // show an error
)

type ViewMsg

type ViewMsg View

ViewMsg is a message that contains which view to show.

Jump to

Keyboard shortcuts

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