package main import ( "fmt" "io" "go.wit.com/gui" ) type Size interface { Cpus() int Memory() float64 Disk() float64 } type SquareBox struct { Width float64 Height float64 } type MenuNode struct { Name string Box *gui.Node } func (s MenuNode) Area() float64 { return 20 } type Menu interface { Widget() *gui.Node SetMenu(*gui.Node) } type Draw interface { Show() bool Hide() } type Droplet interface { Box() *DropletBox Draw SetMenu(*DropletBox) Size PowerOn() error PowerOff() (bool, error) Connect() // Location fmt.Stringer io.Writer } func addMenu(d Droplet) { d.Show() // d.Menu.Widget() = gui.RawBox() }