Moved containers into a separate package

This commit is contained in:
Sasha Koshka
2023-03-16 14:22:56 -04:00
parent c55925d152
commit a4ef28cdd0
22 changed files with 65 additions and 45 deletions

View File

@@ -6,6 +6,7 @@ import "git.tebibyte.media/sashakoshka/tomo/elements"
import "git.tebibyte.media/sashakoshka/tomo/layouts/basic"
import "git.tebibyte.media/sashakoshka/tomo/elements/basic"
import "git.tebibyte.media/sashakoshka/tomo/elements/testing"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
func main () {
@@ -16,7 +17,7 @@ func run () {
window, _ := tomo.NewWindow(300, 2)
window.SetTitle("List Sidebar")
container := basicElements.NewContainer(basicLayouts.Horizontal { true, true })
container := containers.NewContainer(basicLayouts.Horizontal { true, true })
window.Adopt(container)
var currentPage elements.Element
@@ -39,7 +40,7 @@ func run () {
})
mouse := testing.NewMouse()
input := basicElements.NewTextBox("Write some text", "")
form := basicElements.NewContainer(basicLayouts.Vertical { true, false})
form := containers.NewContainer(basicLayouts.Vertical { true, false})
form.Adopt(basicElements.NewLabel("I have:", false), false)
form.Adopt(basicElements.NewSpacer(true), false)
form.Adopt(basicElements.NewCheckbox("Skin", true), false)