Documentation ¶
Index ¶
- func MakeBlock(cells []*ASCIISwitchboardCell, kind ASCIICellType)
- func MakeLabel(cells []*ASCIISwitchboardCell, kind ASCIICellType)
- type ASCIICellConnection
- type ASCIICellType
- type ASCIISwitchboard
- func (l *ASCIISwitchboard) Cell(x int, y int) *ASCIISwitchboardCell
- func (l *ASCIISwitchboard) CellAbove(x int, y int) *ASCIISwitchboardCell
- func (l *ASCIISwitchboard) CellBelow(x int, y int) *ASCIISwitchboardCell
- func (l *ASCIISwitchboard) CellLeftOf(x int, y int) *ASCIISwitchboardCell
- func (l *ASCIISwitchboard) CellRightOf(x int, y int) *ASCIISwitchboardCell
- type ASCIISwitchboardCell
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeBlock ¶
func MakeBlock(cells []*ASCIISwitchboardCell, kind ASCIICellType)
func MakeLabel ¶
func MakeLabel(cells []*ASCIISwitchboardCell, kind ASCIICellType)
Types ¶
type ASCIICellConnection ¶
type ASCIICellConnection int
const ( ConnectTop ASCIICellConnection = 1 ConnectRight ASCIICellConnection = 2 ConnectBottom ASCIICellConnection = 4 ConnectLeft ASCIICellConnection = 8 )
type ASCIICellType ¶
type ASCIICellType int
const ( UnprocessedCell ASCIICellType = iota SwitchVerticalDiagonalUpper SwitchVerticalDiagonalBackUpper SwitchVerticalDiagonalBackLower SwitchVerticalDiagonalLower SwitchHorizontalDiagonalUpper SwitchHorizontalDiagonalBackUpper SwitchHorizontalDiagonalBackLower SwitchHorizontalDiagonalLower SwitchVerticalCrossDiagonal SwitchVerticalCrossDiagonalBack SwitchHorizontalCrossDiagonal SwitchHorizontalCrossDiagonalBack )
const ( TrackHorizontal ASCIICellType = 20 + iota TrackVertical TrackDiagonalUpper TrackDiagonalLower TrackDiagonalBackUpper TrackDiagonalBackLower TrackHorizontalStopRight TrackHorizontalStopLeft TrackVerticalStopTop TrackVerticalStopBottom TrackHorizontalBlock TrackVerticalBlock TrackHorizontalLabel TrackVerticalLabel )
const ( // Used internally only by the interpreter SwitchHorizontalSlash ASCIICellType = 256 // Used internally only by the interpreter SwitchVerticalSlash ASCIICellType = 512 // Used internally only by the interpreter SwitchHorizontalBackslash ASCIICellType = 1024 // Used internally only by the interpreter SwitchVerticalBackslash ASCIICellType = 2048 )
const ( // Used internally only, not understood by the HTML UI TrackDoubleBackslash ASCIICellType = iota + 3000 // Used internally only, not understood by the HTML UI TrackDoubleSlash )
type ASCIISwitchboard ¶
type ASCIISwitchboard struct { LineCount int ColumnCount int Lines []string Cells []ASCIISwitchboardCell Location errlog.LocationRange }
* ASCIISwitchboard holds an ASCII representation of a switchboard. * Instances of this type are created while interpreting *.via files.
func (*ASCIISwitchboard) Cell ¶
func (l *ASCIISwitchboard) Cell(x int, y int) *ASCIISwitchboardCell
func (*ASCIISwitchboard) CellAbove ¶
func (l *ASCIISwitchboard) CellAbove(x int, y int) *ASCIISwitchboardCell
func (*ASCIISwitchboard) CellBelow ¶
func (l *ASCIISwitchboard) CellBelow(x int, y int) *ASCIISwitchboardCell
func (*ASCIISwitchboard) CellLeftOf ¶
func (l *ASCIISwitchboard) CellLeftOf(x int, y int) *ASCIISwitchboardCell
func (*ASCIISwitchboard) CellRightOf ¶
func (l *ASCIISwitchboard) CellRightOf(x int, y int) *ASCIISwitchboardCell
type ASCIISwitchboardCell ¶
type ASCIISwitchboardCell struct { Type ASCIICellType Connections ASCIICellConnection Rune rune X int Y int Text string Anchor *ASCIISwitchboardCell }
func (*ASCIISwitchboardCell) ConnectsToBottom ¶
func (c *ASCIISwitchboardCell) ConnectsToBottom() bool
func (*ASCIISwitchboardCell) ConnectsToLeft ¶
func (c *ASCIISwitchboardCell) ConnectsToLeft() bool
func (*ASCIISwitchboardCell) ConnectsToRight ¶
func (c *ASCIISwitchboardCell) ConnectsToRight() bool
func (*ASCIISwitchboardCell) ConnectsToTop ¶
func (c *ASCIISwitchboardCell) ConnectsToTop() bool
Click to show internal directories.
Click to hide internal directories.