func newWindow() *window { textWidget := tuikit.NewTextWidget() spinner := tuikit.NewProgressSpinner() w := &window{ SplitLayout: tuikit.NewSplitLayout(textWidget, spinner), textWidget: textWidget, spinner: spinner, } w.SetOrientation(tuikit.OrientationHorizontal) return w }
func newWindow() *window { stack1 := newStackBox(termbox.Cell{Bg: termbox.ColorBlue}, tuikit.NewSize(1, 5)) stack2 := newStackBox(termbox.Cell{Bg: termbox.ColorYellow}, tuikit.NewSize(1, 10)) stack3 := newStackBox(termbox.Cell{Bg: termbox.ColorRed}, tuikit.NewSize(15, 15)) stack4 := newStackBox(termbox.Cell{Bg: termbox.ColorGreen}, tuikit.NewSize(15, 15)) horizSplit := tuikit.NewSplitLayout(stack3, stack4) horizSplit.SetOrientation(tuikit.OrientationHorizontal) children := []tuikit.Painter{stack1, stack2, horizSplit} w := &window{tuikit.NewLinearLayout(children)} return w }