Mercurial > projects > dwt-mac
diff dwt/widgets/Link.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 | d8635bb48c7c |
line wrap: on
line diff
--- a/dwt/widgets/Link.d Wed Aug 27 14:10:03 2008 +0200 +++ b/dwt/widgets/Link.d Wed Aug 27 14:30:35 2008 +0200 @@ -135,10 +135,10 @@ //TODO wrapping, wHint int borderStyle = hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder; NSSize borderSize = NSScrollView.frameSizeForContentSize(new NSSize(), false, false, borderStyle); - NSTextView widget = (NSTextView)view; + NSTextView widget = cast(NSTextView)view; NSSize size = widget.textStorage().size(); - width = (int)(size.width + borderSize.width); - height = (int)(size.height + borderSize.height); + width = cast(int)(size.width + borderSize.width); + height = cast(int)(size.height + borderSize.height); if (wHint !is DWT.DEFAULT) width = wHint; if (hHint !is DWT.DEFAULT) height = hHint; int border = getBorderWidth (); @@ -148,13 +148,13 @@ } void createHandle () { - SWTScrollView scrollWidget = (SWTScrollView)new SWTScrollView().alloc(); + SWTScrollView scrollWidget = cast(SWTScrollView)new SWTScrollView().alloc(); scrollWidget.initWithFrame(new NSRect ()); scrollWidget.setDrawsBackground(false); scrollWidget.setBorderType(hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder); scrollWidget.setTag(jniRef); - SWTTextView widget = (SWTTextView)new SWTTextView().alloc(); + SWTTextView widget = cast(SWTTextView)new SWTTextView().alloc(); widget.initWithFrame(new NSRect()); widget.setEditable(false); widget.setDrawsBackground(false); @@ -406,7 +406,7 @@ if (string is null) error (DWT.ERROR_NULL_ARGUMENT); if (string.equals (text)) return; text = string; - NSTextView widget = (NSTextView)view; + NSTextView widget = cast(NSTextView)view; widget.setString(NSString.stringWith(parse(string))); NSTextStorage textStorage = widget.textStorage(); NSRange range = new NSRange();