예제 #1
0
파일: fill.go 프로젝트: xormplus/ui-1
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
파일: table.go 프로젝트: xormplus/ui-1
// 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
}