Mercurial > projects > dwt-mac
diff dwt/widgets/ToolTip.d @ 36:db5a898b2119
Fixed a lot of compile errors
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 07 Oct 2008 12:56:18 +0200 |
parents | 1a8b3cb347e0 |
children | 642f460a0908 |
line wrap: on
line diff
--- a/dwt/widgets/ToolTip.d Sun Sep 14 23:32:29 2008 +0200 +++ b/dwt/widgets/ToolTip.d Tue Oct 07 12:56:18 2008 +0200 @@ -106,7 +106,7 @@ tip = new Shell (parent, DWT.ON_TOP | DWT.NO_TRIM); Color background = display.getSystemColor (DWT.COLOR_INFO_BACKGROUND); tip.setBackground (background); - listener = new Listener () { + listener = new class Listener { public void handleEvent (Event event) { switch (event.type) { case DWT.Dispose: onDispose (event); break; @@ -179,70 +179,70 @@ spikeAbove = dest.height >= y + size.y + t; if (dest.width >= x + size.x) { if (dest.height >= y + size.y + t) { - polyline = new int [] { + polyline = new int [] [ 0, 5+t, 1, 5+t, 1, 3+t, 3, 1+t, 5, 1+t, 5, t, 16, t, 16, 0, 35, t, w-5, t, w-5, 1+t, w-3, 1+t, w-1, 3+t, w-1, 5+t, w, 5+t, w, h-5+t, w-1, h-5+t, w-1, h-3+t, w-2, h-3+t, w-2, h-2+t, w-3, h-2+t, w-3, h-1+t, w-5, h-1+t, w-5, h+t, 5, h+t, 5, h-1+t, 3, h-1+t, 3, h-2+t, 2, h-2+t, 2, h-3+t, 1, h-3+t, 1, h-5+t, 0, h-5+t, - 0, 5+t}; - borderPolygon = new int[] { + 0, 5+t]; + borderPolygon = new int[] [ 0, 5+t, 1, 4+t, 1, 3+t, 3, 1+t, 4, 1+t, 5, t, 16, t, 16, 1, 35, t, w-6, 0+t, w-5, 1+t, w-4, 1+t, w-2, 3+t, w-2, 4+t, w-1, 5+t, w-1, h-6+t, w-2, h-5+t, w-2, h-4+t, w-4, h-2+t, w-5, h-2+t, w-6, h-1+t, 5, h-1+t, 4, h-2+t, 3, h-2+t, 1, h-4+t, 1, h-5+t, 0, h-6+t, - 0, 5+t}; + 0, 5+t]; tip.setLocation (Math.max (0, x - i), y); } else { - polyline = new int [] { + polyline = new int [] [ 0, 5, 1, 5, 1, 3, 3, 1, 5, 1, 5, 0, w-5, 0, w-5, 1, w-3, 1, w-1, 3, w-1, 5, w, 5, w, h-5, w-1, h-5, w-1, h-3, w-2, h-3, w-2, h-2, w-3, h-2, w-3, h-1, w-5, h-1, w-5, h, 35, h, 16, h+t, 16, h, 5, h, 5, h-1, 3, h-1, 3, h-2, 2, h-2, 2, h-3, 1, h-3, 1, h-5, 0, h-5, - 0, 5}; - borderPolygon = new int[] { + 0, 5]; + borderPolygon = new int[] [ 0, 5, 1, 4, 1, 3, 3, 1, 4, 1, 5, 0, w-6, 0, w-5, 1, w-4, 1, w-2, 3, w-2, 4, w-1, 5, w-1, h-6, w-2, h-5, w-2, h-4, w-4, h-2, w-5, h-2, w-6, h-1, 36, h-1, 16, h+t-1, 16, h-1, 5, h-1, 4, h-2, 3, h-2, 1, h-4, 1, h-5, 0, h-6, - 0, 5}; + 0, 5]; tip.setLocation (Math.max (0, x - i), y - size.y - t); } } else { if (dest.height >= y + size.y + t) { - polyline = new int [] { + polyline = new int [] [ 0, 5+t, 1, 5+t, 1, 3+t, 3, 1+t, 5, 1+t, 5, t, w-35, t, w-16, 0, w-16, t, w-5, t, w-5, 1+t, w-3, 1+t, w-1, 3+t, w-1, 5+t, w, 5+t, w, h-5+t, w-1, h-5+t, w-1, h-3+t, w-2, h-3+t, w-2, h-2+t, w-3, h-2+t, w-3, h-1+t, w-5, h-1+t, w-5, h+t, 5, h+t, 5, h-1+t, 3, h-1+t, 3, h-2+t, 2, h-2+t, 2, h-3+t, 1, h-3+t, 1, h-5+t, 0, h-5+t, - 0, 5+t}; - borderPolygon = new int[] { + 0, 5+t]; + borderPolygon = new int[] [ 0, 5+t, 1, 4+t, 1, 3+t, 3, 1+t, 4, 1+t, 5, t, w-35, t, w-17, 2, w-17, t, w-6, t, w-5, 1+t, w-4, 1+t, w-2, 3+t, w-2, 4+t, w-1, 5+t, w-1, h-6+t, w-2, h-5+t, w-2, h-4+t, w-4, h-2+t, w-5, h-2+t, w-6, h-1+t, 5, h-1+t, 4, h-2+t, 3, h-2+t, 1, h-4+t, 1, h-5+t, 0, h-6+t, - 0, 5+t}; + 0, 5+t]; tip.setLocation (Math.min (dest.width - size.x, x - size.x + i), y); } else { - polyline = new int [] { + polyline = new int [] [ 0, 5, 1, 5, 1, 3, 3, 1, 5, 1, 5, 0, w-5, 0, w-5, 1, w-3, 1, w-1, 3, w-1, 5, w, 5, w, h-5, w-1, h-5, w-1, h-3, w-2, h-3, w-2, h-2, w-3, h-2, w-3, h-1, w-5, h-1, w-5, h, w-16, h, w-16, h+t, w-35, h, 5, h, 5, h-1, 3, h-1, 3, h-2, 2, h-2, 2, h-3, 1, h-3, 1, h-5, 0, h-5, - 0, 5}; - borderPolygon = new int[] { + 0, 5]; + borderPolygon = new int[] [ 0, 5, 1, 4, 1, 3, 3, 1, 4, 1, 5, 0, w-6, 0, w-5, 1, w-4, 1, w-2, 3, w-2, 4, w-1, 5, w-1, h-6, w-2, h-5, w-2, h-4, w-4, h-2, w-5, h-2, w-6, h-1, w-17, h-1, w-17, h+t-2, w-36, h-1, 5, h-1, 4, h-2, 3, h-2, 1, h-4, 1, h-5, 0, h-6, - 0, 5}; + 0, 5]; tip.setLocation (Math.min (dest.width - size.x, x - size.x + i), y - size.y - t); } } @@ -625,7 +625,7 @@ if (runnable !is null) display.timerExec (-1, runnable); runnable = null; if (autohide && visible) { - runnable = new Runnable () { + runnable = new class Runnable { public void run () { if (!isDisposed ()) setVisible (false); }