summaryrefslogtreecommitdiff
path: root/redo/zz_test.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-04 23:31:11 -0400
committerPietro Gagliardi <[email protected]>2014-08-04 23:31:11 -0400
commit28764445b9d8073b6fc9af6779bfa3b485b1ae06 (patch)
treed2767c5361353c9eab33ccdaae87f87d0b0d2ddd /redo/zz_test.go
parent95151ce6eac593827c27ebba8aa5f4a7d8c11f45 (diff)
Re-added Area on the GTK+ backend. Not yet working; need to reconnect signals.
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"),