func (row *CompactRow) SetY(y int) {
	if y == row.Y {
		return
	}
	row.Bg.Y = y
	for _, w := range row.Cols {
		w.SetY(y)
	}
	row.Y = y
}
func (row *CompactRow) SetX(x int)     { row.X = x }
package compact
import (
	"github.com/bcicen/ctop/config"
	"github.com/bcicen/ctop/logging"
	"github.com/bcicen/ctop/models"
	ui "github.com/gizak/termui"
)
const rowPadding = 1
var log = logging.Init()
type RowBufferer interface {
	SetY(int)
	SetWidths(int, []int)
	GetHeight() int
	Buffer() ui.Buffer
}
type CompactRow struct {
	Bg     *RowBg
	Cols   []CompactCol
	X, Y   int
	Height int
	widths []int  
}
func NewCompactRow() *CompactRow {
	row := &CompactRow{
		Bg:     NewRowBg(),
		Cols:   newRowWidgets(),
		X:      rowPadding,
		Height: 1,
	}
	return row
}
func (row *CompactRow) SetMeta(m models.Meta) {
	for _, w := range row.Cols {
		w.SetMeta(m)
	}
}
func (row *CompactRow) SetMetrics(m models.Metrics) {
	for _, w := range row.Cols {
		w.SetMetrics(m)
	}
}
func (row *CompactRow) Reset() {
	for _, w := range row.Cols {
		w.Reset()
	}
}
func (row *CompactRow) GetHeight() int { return row.Height }