Beispiel #1
0
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
}
Beispiel #2
0
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
}