summaryrefslogtreecommitdiff
path: root/redo/zz_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/zz_test.go')
-rw-r--r--redo/zz_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/redo/zz_test.go b/redo/zz_test.go
index c04b669..2c1a044 100644
--- a/redo/zz_test.go
+++ b/redo/zz_test.go
@@ -9,6 +9,7 @@ import (
"flag"
"reflect"
"testing"
+ "image"
)
var closeOnClick = flag.Bool("close", false, "close on click")
@@ -28,6 +29,7 @@ var ddata = []dtype{
type testwin struct {
t Tab
w Window
+ a Area
spw *Stack
sph *Stack
s *Stack // TODO make Stack
@@ -39,6 +41,13 @@ type testwin struct {
e2 TextField
}
+type areaHandler struct{}
+func (a *areaHandler) Paint(r image.Rectangle) *image.RGBA {
+ return image.NewRGBA(r)
+}
+func (a *areaHandler) Mouse(me MouseEvent) bool { return false }
+func (a *areaHandler) Key(ke KeyEvent) bool { return false }
+
func (tw *testwin) make(done chan struct{}) {
tw.t = NewTab()
tw.w = NewWindow("Hello", 320, 240, tw.t)
@@ -51,6 +60,8 @@ func (tw *testwin) make(done chan struct{}) {
done <- struct{}{}
return true
})
+ tw.a = NewArea(200, 200, &areaHandler{})
+ tw.t.Append("Area", tw.a)
tw.spw = NewHorizontalStack(
NewButton("hello"),
NewCheckbox("hello"),