Пример #1
0
func NewFill(parent ui.Drawer) *Fill {
	f := &Fill{
		parent,
		nil,
		false,
		false,
		ui.NewRectangle(0, 0, 0, 0),
		ui.Margin{0, 0, 0, 0},
		ui.NewMask(true),
		ui.NewKeyDispatch(),
		ui.NewCharDispatch(),
		ui.NewMouseDispatch(),
	}

	f.attachCB(parent)
	return f
}
Пример #2
0
// NewTable builds a default Table.
func NewTable(parent ui.Drawer) *Table {
	table := &Table{
		ui.NewRectangle(0, 0, 0, 0),
		parent,
		nil,
		make([]*cell, 0),
		make([]float64, 0),
		make([]float64, 0),
		DEFAULT_TABLE_CELL_HEIGHT,
		DEFAULT_TABLE_CELL_WIDTH,
		ui.Margin{0, 0, 0, 0},
		ui.Padding{0, 0, 0, 0},
		ui.NewKeyDispatch(),
		ui.NewCharDispatch(),
		ui.NewMouseDispatch(),
		ui.NewScrollDispatch(),
	}

	table.route(parent)
	return table
}