ttk.go
func NewWindow(manager Windower) *Window {
	wc := make(chan *Window)
	Queue(func() {
		w := &Window{
			id:           lastWindowID,
			mgr:          manager,
			x:            maxX,
			y:            maxY,
			focus:        -1, // no widget focused
			backingStore: make([]Cell, maxX*maxY),
			widgets:      make([]Widgeter, 0, 16),
		}
		lastWindowID++
		windows[w.id] = w
		windower2window[manager] = w
		manager.Init(w)
		wc <- w
	})
	return <-wc
}
func NewWindow(manager Windower) *Window {
	wc := make(chan *Window)
	Queue(func() {
		w := &Window{
			id:           lastWindowID,
			mgr:          manager,
			x:            maxX,
			y:            maxY,
			focus:        -1, // no widget focused
			backingStore: make([]Cell, maxX*maxY),
			widgets:      make([]Widgeter, 0, 16),
		}
		lastWindowID++
		windows[w.id] = w
		windower2window[manager] = w
		manager.Init(w)
		wc <- w
	})
	return <-wc
}
func NewWindow ( manager Windower ) * Window { wc := make ( chan * Window ) Queue ( func ( ) { w := & Window { id : lastWindowID , mgr : manager , x : maxX , y : maxY , focus : - 1 , // no widget focused backingStore : make ( [ ] Cell , maxX * maxY ) , widgets : make ( [ ] Widgeter , 0 , 16 ) , } lastWindowID ++ windows [ w . id ] = w windower2window [ manager ] = w manager . Init ( w ) wc <- w } ) return <- wc }
// NewWindow creates a new window type.
NewWindow creates a new window type .