Containers are no longer in their own dir because why were they

This commit is contained in:
2023-04-16 17:30:13 -04:00
parent a7de6c7f3b
commit 775390e884
23 changed files with 29 additions and 416 deletions

View File

@@ -4,7 +4,6 @@ import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/textdraw"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -15,7 +14,7 @@ func run () {
window.SetTitle("Text alignment")
container := containers.NewDocument()
scrollContainer := containers.NewScroll(false, true)
scrollContainer := elements.NewScroll(false, true)
scrollContainer.Adopt(container)
window.Adopt(scrollContainer)

View File

@@ -3,7 +3,6 @@ package main
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/popups"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
func main () {
@@ -14,7 +13,7 @@ func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 0, 0))
window.SetTitle("Checkboxes")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
window.Adopt(container)
introText := elements.NewLabel (

View File

@@ -10,7 +10,6 @@ import "git.tebibyte.media/sashakoshka/tomo/data"
import "git.tebibyte.media/sashakoshka/tomo/popups"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -26,9 +25,9 @@ func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 256, 0))
window.SetTitle("Clipboard")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
textInput := elements.NewTextBox("", "")
controlRow := containers.NewHBox(false, true)
controlRow := elements.NewHBox(false, true)
copyButton := elements.NewButton("Copy")
copyButton.SetIcon(tomo.IconCopy)
pasteButton := elements.NewButton("Paste")

View File

@@ -6,7 +6,6 @@ import _ "image/png"
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -22,8 +21,8 @@ func run () {
file.Close()
if err != nil { panic(err.Error()); return }
scrollContainer := containers.NewScroll(false, true)
document := containers.NewDocument()
scrollContainer := elements.NewScroll(false, true)
document := elements.NewDocument()
document.Adopt (elements.NewLabel (
"A document container is a vertically stacked container " +

View File

@@ -4,7 +4,6 @@ import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/flow"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -13,7 +12,7 @@ func main () {
func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 192, 192))
window.SetTitle("adventure")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
window.Adopt(container)
var world flow.Flow

View File

@@ -6,7 +6,6 @@ import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import "git.tebibyte.media/sashakoshka/tomo/elements/fun"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -16,7 +15,7 @@ func main () {
func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 200, 216))
window.SetTitle("Clock")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
window.Adopt(container)
clock := fun.NewAnalogClock(time.Now())

View File

@@ -3,7 +3,6 @@ package main
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -13,7 +12,7 @@ func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 360, 0))
window.SetTitle("horizontal stack")
container := containers.NewHBox(true, true)
container := elements.NewHBox(true, true)
window.Adopt(container)
container.Adopt(elements.NewLabel("this is sample text", true), true)

View File

@@ -3,7 +3,6 @@ package main
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -13,7 +12,7 @@ func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 360, 0))
window.SetTitle("Icons")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
window.Adopt(container)
container.Adopt(elements.NewLabel("Just some of the wonderful icons we have:", false), false)

View File

@@ -4,7 +4,6 @@ import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/popups"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -13,7 +12,7 @@ func main () {
func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 0, 0))
window.SetTitle("Enter Details")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
window.Adopt(container)
// create inputs

View File

@@ -5,7 +5,6 @@ import "image"
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -15,7 +14,7 @@ func run () {
window, _ := tomo.NewWindow(tomo.Bounds(200, 200, 256, 256))
window.SetTitle("Main")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
container.Adopt(elements.NewLabel("Main window", false), true)
window.Adopt(container)

View File

@@ -4,7 +4,6 @@ import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/popups"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -15,7 +14,7 @@ func run () {
if err != nil { panic(err.Error()) }
window.SetTitle("Dialog Boxes")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
window.Adopt(container)
container.Adopt(elements.NewLabel("Try out different dialogs:", false), true)

View File

@@ -4,7 +4,6 @@ import "time"
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/popups"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
func main () {
@@ -14,7 +13,7 @@ func main () {
func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 0, 0))
window.SetTitle("Approaching")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
window.Adopt(container)
container.Adopt (elements.NewLabel (

View File

@@ -7,7 +7,6 @@ import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/popups"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
//go:embed wall.png
var wallTextureBytes []uint8
@@ -22,7 +21,7 @@ func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 640, 480))
window.SetTitle("Raycaster")
container := containers.NewVBox(false, false)
container := elements.NewVBox(false, false)
window.Adopt(container)
wallTexture, _ := TextureFrom(bytes.NewReader(wallTextureBytes))

View File

@@ -4,7 +4,6 @@ package main
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -13,7 +12,7 @@ func main () {
func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 360, 240))
window.SetTitle("Scroll")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
window.Adopt(container)
textBox := elements.NewTextBox("", copypasta)

View File

@@ -3,7 +3,6 @@ package main
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -13,7 +12,7 @@ func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 0, 0))
window.SetTitle("Spaced Out")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
window.Adopt(container)
container.Adopt (elements.NewLabel("This is at the top", false), false)

View File

@@ -3,7 +3,6 @@ package main
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
func main () {
tomo.Run(run)
@@ -13,7 +12,7 @@ func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 0, 0))
window.SetTitle("Switches")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
window.Adopt(container)
container.Adopt(elements.NewSwitch("hahahah", false), false)

View File

@@ -3,7 +3,6 @@ package main
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/elements"
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 () {
@@ -14,7 +13,7 @@ func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 128, 128))
window.SetTitle("vertical stack")
container := containers.NewVBox(true, true)
container := elements.NewVBox(true, true)
label := elements.NewLabel("it is a label hehe", true)
button := elements.NewButton("drawing pad")