dive/runtime/ui/view/view.go
2019-10-21 06:54:13 -04:00

28 lines
432 B
Go

package view
const (
HeightFull = -1
WidthFull = -1
IdentityNone = ""
)
type Identifiable interface {
Name() string
}
type Dimensional interface {
IsVisible() bool
Height() int
Width() int
}
// View defines the an element with state that can be updated, queried if visible, and render elements to the screen
type View interface {
Identifiable
Dimensional
Update() error
Render() error
KeyHelp() string
}