bubbletea

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Window

func Window(width int, height int, fonts crt.Fonts, model tea.Model, defaultBg color.Color, options ...tea.ProgramOption) (*crt.Window, *tea.Program, error)

Window creates a new crt based bubbletea window with the given width, height, fonts, model and default background color. Additional options can be passed to the bubbletea program.

Types

type Adapter added in v0.0.3

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

Adapter represents a bubbletea adapter for the crt package.

func NewAdapter added in v0.0.3

func NewAdapter(prog *tea.Program, options ...Options) *Adapter

NewAdapter creates a new bubbletea adapter.

func (*Adapter) HandleKeyPress added in v0.0.3

func (b *Adapter) HandleKeyPress()

func (*Adapter) HandleMouseButton added in v0.0.3

func (b *Adapter) HandleMouseButton(button crt.MouseButton)

func (*Adapter) HandleMouseMotion added in v0.0.3

func (b *Adapter) HandleMouseMotion(motion crt.MouseMotion)

func (*Adapter) HandleMouseWheel added in v0.0.3

func (b *Adapter) HandleMouseWheel(wheel crt.MouseWheel)

func (*Adapter) HandleWindowSize added in v0.0.3

func (b *Adapter) HandleWindowSize(size crt.WindowSize)

type Options added in v0.0.3

type Options func(*Adapter)

Options are used to configure the adapter.

func WithFilterMousePressed added in v0.0.3

func WithFilterMousePressed(filter bool) Options

WithFilterMousePressed filters the MousePressed event and only emits MouseReleased events.

Jump to

Keyboard shortcuts

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