comparison dwt/widgets/TrayItem.d @ 7:e831403a80a9

Add 'cast' to casts
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 14:30:35 +0200
parents 1a8b3cb347e0
children db5a898b2119
comparison
equal deleted inserted replaced
6:b903c16b6f48 7:e831403a80a9
162 item = statusBar.statusItemWithLength(0); 162 item = statusBar.statusItemWithLength(0);
163 if (item is null) error (DWT.ERROR_NO_HANDLES); 163 if (item is null) error (DWT.ERROR_NO_HANDLES);
164 item.retain(); 164 item.retain();
165 item.setHighlightMode(true); 165 item.setHighlightMode(true);
166 NSRect rect = new NSRect(); 166 NSRect rect = new NSRect();
167 view = (NSImageView)new SWTImageView().alloc(); 167 view = cast(NSImageView)new SWTImageView().alloc();
168 if (view is null) error (DWT.ERROR_NO_HANDLES); 168 if (view is null) error (DWT.ERROR_NO_HANDLES);
169 view.initWithFrame(rect); 169 view.initWithFrame(rect);
170 item.setView(view); 170 item.setView(view);
171 createJNIRef(); 171 createJNIRef();
172 view.setTag(jniRef); 172 view.setTag(jniRef);
183 NSPoint pt = new NSPoint(); 183 NSPoint pt = new NSPoint();
184 pt.x = rect.width / 2; 184 pt.x = rect.width / 2;
185 pt.y = rect.height; 185 pt.y = rect.height;
186 pt = view.convertPoint_fromView_(pt, null); 186 pt = view.convertPoint_fromView_(pt, null);
187 pt.x += windowRect.x; 187 pt.x += windowRect.x;
188 return new Point ((int)pt.x, (int)pt.y); 188 return new Point (cast(int)pt.x, cast(int)pt.y);
189 } 189 }
190 190
191 /** 191 /**
192 * Returns the receiver's parent, which must be a <code>Tray</code>. 192 * Returns the receiver's parent, which must be a <code>Tray</code>.
193 * 193 *