move MaxRows() method into cgrid

This commit is contained in:
Bradley Cicenas
2017-03-08 11:52:31 +11:00
parent d7f9f715bb
commit a6ee6edb1d
3 changed files with 7 additions and 10 deletions

View File

@@ -38,6 +38,7 @@ func (cg *CompactGrid) GetHeight() int { return len(cg.Rows) }
func (cg *CompactGrid) SetX(x int) { cg.X = x }
func (cg *CompactGrid) SetY(y int) { cg.Y = y }
func (cg *CompactGrid) SetWidth(w int) { cg.Width = w }
func (cg *CompactGrid) MaxRows() int { return ui.TermHeight() - header.Height - cg.Y }
func (cg *CompactGrid) Buffer() ui.Buffer {
buf := ui.NewBuffer()