57 lines
699 B
Go
57 lines
699 B
Go
package tui
|
|
|
|
import (
|
|
"git.tordarus.net/Tordarus/buf2d"
|
|
"github.com/gdamore/tcell"
|
|
)
|
|
|
|
type ViewBuffer = buf2d.Buffer[Rune]
|
|
type KeyEvent = tcell.EventKey
|
|
type Style = tcell.Style
|
|
type Color = tcell.Color
|
|
|
|
var StyleDefault Style = tcell.StyleDefault
|
|
|
|
type Point struct {
|
|
X, Y int
|
|
}
|
|
|
|
type Size struct {
|
|
Width, Height int
|
|
}
|
|
|
|
type Dimension struct {
|
|
Point
|
|
Size
|
|
}
|
|
|
|
type Orientation uint8
|
|
|
|
const (
|
|
Horizontal Orientation = iota
|
|
Vertical
|
|
)
|
|
|
|
type Side uint8
|
|
|
|
const (
|
|
SideTop Side = iota
|
|
SideBottom
|
|
SideLeft
|
|
SideRight
|
|
)
|
|
|
|
type Anchor uint8
|
|
|
|
const (
|
|
AnchorTopLeft Anchor = iota
|
|
AnchorTop
|
|
AnchorTopRight
|
|
AnchorLeft
|
|
AnchorCenter
|
|
AnchorRight
|
|
AnchorBottomLeft
|
|
AnchorBottom
|
|
AnchorBottomRight
|
|
)
|