summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-30 22:42:32 -0400
committerPietro Gagliardi <[email protected]>2014-07-30 22:42:32 -0400
commitbdc8aac4d6407f4e0a2ef7e15bb0c411ca606bb8 (patch)
tree5d700f1bd48a67f9185fa47f38d4232ba155f7f0
parentc5917de29c5452b4ff11441fe353fe46984caa4f (diff)
Added preferred size tests to zz_test.go; these will help for what we're about to do (implement Control.preferredSize() on all other platforms).
-rw-r--r--redo/zz_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/redo/zz_test.go b/redo/zz_test.go
index b3d44e7..2552642 100644
--- a/redo/zz_test.go
+++ b/redo/zz_test.go
@@ -28,6 +28,8 @@ var ddata = []dtype{
type testwin struct {
t Tab
w Window
+ spw *Stack
+ sph *Stack
s *Stack // TODO make Stack
l Label
table Table
@@ -49,6 +51,22 @@ func (tw *testwin) make(done chan struct{}) {
done <- struct{}{}
return true
})
+ tw.spw = NewHorizontalStack(
+ NewButton("hello"),
+ NewCheckbox("hello"),
+ NewTextField(),
+ NewPasswordField(),
+ NewTable(reflect.TypeOf(struct{A,B,C int}{})),
+ NewStandaloneLabel("hello"))
+ tw.t.Append("Pref Width", tw.spw)
+ tw.sph = NewVerticalStack(
+ NewButton("hello"),
+ NewCheckbox("hello"),
+ NewTextField(),
+ NewPasswordField(),
+ NewTable(reflect.TypeOf(struct{A,B,C int}{})),
+ NewStandaloneLabel("hello"))
+ tw.t.Append("Pref Height", tw.sph)
stack1 := NewHorizontalStack(NewLabel("Test"), NewTextField())
stack1.SetStretchy(1)
stack2 := NewHorizontalStack(NewLabel("Test 2"),