msgs

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 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 BreadcrumbsMsg string

BreadcrumbsMsg is a message that changes the current breadcrumbs being displayed.

type DataMsg

type DataMsg[T any] struct {
	Name string    // name of the target control
	Data []T       //the data to show in the scrolltable
	Move Direction // optionally adjust the cursor
}

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

type Direction

type Direction int

Direction is a direction movement can occur in.

const (
	DirectionNone  Direction = iota // don't move
	DirectionUp                     // move up
	DirectionDown                   // move down
	DirectionStart                  // move to the start
)

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 FolderMsg

type FolderMsg string

FolderMsg is a message that changes the current folder.

type InputChangedMsg

type InputChangedMsg struct {
	Name string // name of the target control
}

InputChangedMsg is published when the value in an input changes.

type SelectionChangedMsg

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

SelectionChangedMsg is published when the table selection changes.

type View

type View int

View is which View to show.

const (
	ViewNone  View = iota // no view
	ViewBooks             // show a listing of books
	ViewError             // 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