changeset 149:36ae710173d9

Selection is now working for TrayItems
author Jacob Carlborg <doob@me.com>
date Tue, 09 Jun 2009 21:05:40 +0200
parents 8944c1d87c63
children 1ec7c20355bd
files dwt/widgets/TrayItem.d
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/widgets/TrayItem.d	Sun Jun 07 15:21:18 2009 +0200
+++ b/dwt/widgets/TrayItem.d	Tue Jun 09 21:05:40 2009 +0200
@@ -34,6 +34,7 @@
 
 import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSView;
+import Carbon = dwt.internal.c.Carbon;
 import objc = dwt.internal.objc.runtime;
 import dwt.widgets.Item;
 import dwt.widgets.ToolTip;
@@ -67,7 +68,7 @@
     NSStatusItem item;
     NSImageView view;
     
-    static final float BORDER = 8f;
+    static const float BORDER = 8f;
     
 /**
  * Constructs a new instance of this class given its parent
@@ -363,7 +364,7 @@
     if (image !is null && image.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
     super.setImage (image);
     view.setImage(image !is null ? image.handle : null);
-    float /*double*/ width = image !is null && visible ? image.handle.size().width + BORDER : 0;
+    Carbon.CGFloat width = image !is null && visible ? image.handle.size().width + BORDER : 0;
     item.setLength(width);
 }
 
@@ -430,7 +431,7 @@
         if (isDisposed ()) return;
     }
     this.visible = visible;
-    float /*double*/ width = image !is null && visible ? image.handle.size().width + BORDER : 0;
+    Carbon.CGFloat width = image !is null && visible ? image.handle.size().width + BORDER : 0;
     item.setLength(width);
     if (!visible) sendEvent (DWT.Hide);
 }
@@ -455,12 +456,12 @@
     }
 }
 
-void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseUp(objc.id id, objc.SEL sel, objc.id theEvent) {
     highlight = false;
     (cast(NSView)view).setNeedsDisplay(true);
 }
 
-void rightMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseDown(objc.id id, objc.SEL sel, objc.id theEvent) {
     showMenu();
 }