func (mw *mainWindow) Init(w *ttk.Window) {
	mw.l = w.AddLabel(2, 2, "hello world")
	mw.l.SetAttributes(ttk.Attributes{
		Fg: termbox.ColorYellow,
		Bg: termbox.ColorBlue,
	})

	// edit box
	var s string = "12345"
	mw.e = w.AddEdit(2, 4, -2, &s)

	var s2 string
	mw.e2 = w.AddEdit(4, 5, -4, &s2)

	var s3 string
	mw.e3 = w.AddEdit(3, 6, -8, &s3)

	var s4 string
	mw.e4 = w.AddEdit(0, 8, 0, &s4)

	// list box
	mw.list = w.AddList(10, 10, 0, -2)
	mw.list.Append("this is a list box with some content")

	// title
	mw.t = w.AddStatus(0, ttk.JustifyCenter, "title %v", 12)
	mw.t.SetAttributes(ttk.Attributes{
		Fg: termbox.ColorBlack,
		Bg: termbox.ColorGreen,
	})

	// status
	mw.s = w.AddStatus(-1, ttk.JustifyRight, "status: %v", "OMG")
	mw.s.SetAttributes(ttk.Attributes{
		Fg: termbox.ColorBlack,
		Bg: termbox.ColorYellow,
	})
	ttk.Flush()
}
func (mw *mainWindow) Init(w *ttk.Window) {
	mw.l = w.AddLabel(2, 2, "hello world")
	mw.l.SetAttributes(ttk.Attributes{
		Fg: termbox.ColorYellow,
		Bg: termbox.ColorBlue,
	})

	
	var s string = "12345"
	mw.e = w.AddEdit(2, 4, -2, &s)

	var s2 string
	mw.e2 = w.AddEdit(4, 5, -4, &s2)

	var s3 string
	mw.e3 = w.AddEdit(3, 6, -8, &s3)

	var s4 string
	mw.e4 = w.AddEdit(0, 8, 0, &s4)

	
	mw.list = w.AddList(10, 10, 0, -2)
	mw.list.Append("this is a list box with some content")

	
	mw.t = w.AddStatus(0, ttk.JustifyCenter, "title %v", 12)
	mw.t.SetAttributes(ttk.Attributes{
		Fg: termbox.ColorBlack,
		Bg: termbox.ColorGreen,
	})

	
	mw.s = w.AddStatus(-1, ttk.JustifyRight, "status: %v", "OMG")
	mw.s.SetAttributes(ttk.Attributes{
		Fg: termbox.ColorBlack,
		Bg: termbox.ColorYellow,
	})
	ttk.Flush()
}
func ( mw * mainWindow ) Init ( w * ttk . Window ) { mw . l = w . AddLabel ( 2 , 2 , " " ) mw . l . SetAttributes ( ttk . Attributes { Fg : termbox . ColorYellow , Bg : termbox . ColorBlue , } ) // edit box var s string = " " mw . e = w . AddEdit ( 2 , 4 , - 2 , & s ) var s2 string mw . e2 = w . AddEdit ( 4 , 5 , - 4 , & s2 ) var s3 string mw . e3 = w . AddEdit ( 3 , 6 , - 8 , & s3 ) var s4 string mw . e4 = w . AddEdit ( 0 , 8 , 0 , & s4 ) // list box mw . list = w . AddList ( 10 , 10 , 0 , - 2 ) mw . list . Append ( " " ) // title mw . t = w . AddStatus ( 0 , ttk . JustifyCenter , " " , 12 ) mw . t . SetAttributes ( ttk . Attributes { Fg : termbox . ColorBlack , Bg : termbox . ColorGreen , } ) // status mw . s = w . AddStatus ( - 1 , ttk . JustifyRight , " " , " " ) mw . s . SetAttributes ( ttk . Attributes { Fg : termbox . ColorBlack , Bg : termbox . ColorYellow , } ) ttk . Flush ( ) }
// called from queue
called from queue