layout.go
1package layout
2
3import (
4 "github.com/charmbracelet/bubbles/v2/key"
5 tea "github.com/charmbracelet/bubbletea/v2"
6)
7
8// TODO: move this to core
9
10type Focusable interface {
11 Focus() tea.Cmd
12 Blur() tea.Cmd
13 IsFocused() bool
14}
15
16type Sizeable interface {
17 SetSize(width, height int) tea.Cmd
18 GetSize() (int, int)
19}
20
21type Help interface {
22 Bindings() []key.Binding
23}
24
25type Positional interface {
26 SetPosition(x, y int) tea.Cmd
27}