Mercurial > projects > dwt-mac
diff dwt/custom/ControlEditor.d @ 148:8944c1d87c63
Fixes #33
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 07 Jun 2009 15:21:18 +0200 |
parents | 6337764516f1 |
children |
line wrap: on
line diff
--- a/dwt/custom/ControlEditor.d Sun Jun 07 00:04:52 2009 +0200 +++ b/dwt/custom/ControlEditor.d Sun Jun 07 15:21:18 2009 +0200 @@ -127,18 +127,30 @@ public this (Composite parent) { this.parent = parent; - controlListener = new class() Listener { + controlListener = new class(this) Listener { + ControlEditor ce; + + this (ControlEditor ce) { + this.ce = ce; + } + public void handleEvent(Event e) { - layout (); + ce.layout (); } }; for (int i=0; i<EVENTS.length; i++) { parent.addListener (EVENTS [i], controlListener); } - scrollbarListener = new class() Listener { + scrollbarListener = new class(this) Listener { + ControlEditor ce; + + this (ControlEditor ce) { + this.ce = ce; + } + public void handleEvent(Event e) { - scroll (e); + ce.scroll (e); } }; ScrollBar hBar = parent.getHorizontalBar ();