From f570acef6fa0a2faf436bd61b2e8427827bf4642 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 8 Aug 2015 23:03:05 -0400 Subject: [PATCH] Started migrating the original main test back. We need to rework Spinbox now. --- redo/osxaltest/main.swift | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/redo/osxaltest/main.swift b/redo/osxaltest/main.swift index c7b6f323..c67f5ecc 100644 --- a/redo/osxaltest/main.swift +++ b/redo/osxaltest/main.swift @@ -16,6 +16,7 @@ func appLaunched() { var box = Box(vertical: firstvert, padded: spaced) mainwin.SetControl(box) +/* var hbox = {(entrys: Bool, buttons: Bool) -> Box in var hbox = Box(vertical: !firstvert, padded: spaced) hbox.Add(Entry(), entrys) @@ -27,6 +28,30 @@ func appLaunched() { box.Add(hbox(true, false), false) box.Add(hbox(false, true), false) box.Add(hbox(false, false), false) +*/ + + box.Add(Entry(), false) + + var mkhbox = {() -> Box in + Box(vertical: !firstvert, padded: spaced) + } + + var hbox = mkhbox() + hbox.Add(Button("Button"), true) + hbox.Add(Button("Button"), true) + box.Add(hbox, false) + + hbox = mkhbox() + hbox.Add(Button("Button"), true) + hbox.Add(Button("Button"), true) + box.Add(hbox, false) + + hbox = mkhbox() + hbox.Add(Button("Button"), true) + hbox.Add(Button("A"), false) + hbox.Add(Button("BB"), false) + hbox.Add(Button("CCC"), false) + box.Add(hbox, false) mainwin.Show()