gal/struct_screen.go
Brian Buller 23b8a190ec Colorize some results
* Can toggle default calendars
  * Though the interactive screen doesn't update :(
* Colorize default view depending on time until event
2017-03-02 10:26:34 -06:00

24 lines
398 B
Go

package main
import "github.com/jroimartin/gocui"
type screen interface {
setViewDefaults(*gocui.View)
setViewTextAndCursor(*gocui.View, string)
getViewValue(*gocui.Gui)
}
type position struct {
// value = pct * MAX + abs
pct float32
abs int
}
func (p position) getCoordinate(max int) int {
return int(p.pct*float32(max)) + p.abs
}
type viewPosition struct {
x0, y0, x1, y1 position
}