Mercurial > projects > dwt-mac
comparison dwt/widgets/ToolBar.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 |
comparison
equal
deleted
inserted
replaced
6:b903c16b6f48 | 7:e831403a80a9 |
---|---|
125 if (hHint !is DWT.DEFAULT) extent.y = hHint; | 125 if (hHint !is DWT.DEFAULT) extent.y = hHint; |
126 return extent; | 126 return extent; |
127 } | 127 } |
128 | 128 |
129 void createHandle () { | 129 void createHandle () { |
130 SWTView widget = (SWTView)new SWTView().alloc(); | 130 SWTView widget = cast(SWTView)new SWTView().alloc(); |
131 widget.initWithFrame(new NSRect()); | 131 widget.initWithFrame(new NSRect()); |
132 // widget.setDrawsBackground(false); | 132 // widget.setDrawsBackground(false); |
133 widget.setTag(jniRef); | 133 widget.setTag(jniRef); |
134 view = widget; | 134 view = widget; |
135 parent.contentView().addSubview_(widget); | 135 parent.contentView().addSubview_(widget); |
181 } | 181 } |
182 | 182 |
183 public Rectangle getClientArea () { | 183 public Rectangle getClientArea () { |
184 checkWidget(); | 184 checkWidget(); |
185 NSRect rect = view.bounds(); | 185 NSRect rect = view.bounds(); |
186 return new Rectangle((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height); | 186 return new Rectangle(cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height); |
187 } | 187 } |
188 | 188 |
189 /** | 189 /** |
190 * Returns the item at the given, zero-relative index in the | 190 * Returns the item at the given, zero-relative index in the |
191 * receiver. Throws an exception if the index is out of range. | 191 * receiver. Throws an exception if the index is out of range. |