Documentation ¶
Index ¶
- Constants
- Variables
- func NewCell(c *elements.Component, cl elements.ComponentsList) *cell
- type SVG
- type Table
- func (t *Table) Add(c TableAbstract)
- func (t *Table) AddTo(x int, y int, c TableAbstract) error
- func (t *Table) Columns() int
- func (t *Table) Component() *elements.Component
- func (t *Table) GetFrom(x int, y int) (TableAbstract, error)
- func (t *Table) Height() int
- func (t *Table) Render(svg *svg.SVG) error
- func (t *Table) Rows() int
- func (t *Table) SetBorder(b int)
- func (t *Table) SetCaption(c string)
- func (t *Table) SetImage(i string)
- func (t *Table) SetRewriter(r image.Rewriter)
- func (t *Table) SetX(x int)
- func (t *Table) SetY(y int)
- func (t *Table) Width() int
- func (t *Table) X() int
- func (t *Table) Y() int
- type TableAbstract
Constants ¶
View Source
const ( BORDER DASHED_BORDER )
View Source
const BORDERHEIGHT = 40
Variables ¶
View Source
var Border = 40
Border dimension
View Source
var Dimension = 120
Cell dimension
View Source
var ErrCellNotEmpty = errors.New("Cell not empty")
Errors
View Source
var ErrIndexOutOfBounds = errors.New("Index out of bounds")
View Source
var Wireframe bool
Enables / disables the rendering of wireframes
Functions ¶
Types ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table representation
func NewTable ¶
func NewTable(cl elements.ComponentsList) *Table
Returns and initializes and empty table
func (*Table) Add ¶
func (t *Table) Add(c TableAbstract)
Add finds the next free slot and adds a component there. Increases the table if no free slot is available
func (*Table) AddTo ¶
func (t *Table) AddTo(x int, y int, c TableAbstract) error
Explicit add to x:y
func (*Table) GetFrom ¶
func (t *Table) GetFrom(x int, y int) (TableAbstract, error)
Retrieves an element from pos x:y
func (*Table) SetRewriter ¶
Click to show internal directories.
Click to hide internal directories.