32 lines
606 B
Go
32 lines
606 B
Go
// This creates a simple hello world window
|
|
package linuxstatus
|
|
|
|
import (
|
|
"go.wit.com/gui"
|
|
"go.wit.com/log"
|
|
|
|
"go.wit.com/lib/gadgets"
|
|
)
|
|
|
|
func NewLinuxStatus(parent *gui.Node) *LinuxStatus {
|
|
if me != nil {
|
|
log.Log(WARN, "You have done New() twice. You can only do this once")
|
|
return me
|
|
}
|
|
me = &LinuxStatus{
|
|
hidden: true,
|
|
ready: false,
|
|
}
|
|
me.ifmap = make(map[int]*IFtype)
|
|
me.ipmap = make(map[string]*IPtype)
|
|
|
|
log.Log(WARN, "Creating the Window")
|
|
me.window = gadgets.NewBasicWindow(parent, "OS Hostname Details")
|
|
me.window.Make()
|
|
draw(me)
|
|
me.window.Draw()
|
|
|
|
me.ready = true
|
|
return me
|
|
}
|