WIP gim: I had started working on some file vertex.go, not sure if I'll end up needing it or not
This commit is contained in:
parent
7d42bafad4
commit
49d208b190
27
gim/view/vertex.go
Normal file
27
gim/view/vertex.go
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
package view
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/mediocregopher/ginger/gim/geo"
|
||||||
|
"github.com/mediocregopher/ginger/gim/terminal"
|
||||||
|
)
|
||||||
|
|
||||||
|
type edge struct {
|
||||||
|
from, to *vertex
|
||||||
|
tail, head rune // if empty do directional segment char
|
||||||
|
body string
|
||||||
|
switchback bool
|
||||||
|
|
||||||
|
lineStyle terminal.LineStyle
|
||||||
|
}
|
||||||
|
|
||||||
|
type vertex struct {
|
||||||
|
coord, pos geo.XY
|
||||||
|
in, out [][]*edge // top level is port index
|
||||||
|
body string
|
||||||
|
|
||||||
|
// means it won't be drawn, and will be removed and have its in/out edges
|
||||||
|
// spliced together into a single edge.
|
||||||
|
ephemeral bool
|
||||||
|
|
||||||
|
lineStyle terminal.LineStyle // if zero value don't draw border
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user