Mercurial > projects > dwt-mac
comparison dwt/layout/RowLayout.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 | fbe68c33eeee |
comparison
equal
deleted
inserted
replaced
6:b903c16b6f48 | 7:e831403a80a9 |
---|---|
212 return extent; | 212 return extent; |
213 } | 213 } |
214 | 214 |
215 Point computeSize (Control control, bool flushCache) { | 215 Point computeSize (Control control, bool flushCache) { |
216 int wHint = DWT.DEFAULT, hHint = DWT.DEFAULT; | 216 int wHint = DWT.DEFAULT, hHint = DWT.DEFAULT; |
217 RowData data = (RowData) control.getLayoutData (); | 217 RowData data = cast(RowData) control.getLayoutData (); |
218 if (data !is null) { | 218 if (data !is null) { |
219 wHint = data.width; | 219 wHint = data.width; |
220 hHint = data.height; | 220 hHint = data.height; |
221 } | 221 } |
222 return control.computeSize (wHint, hHint, flushCache); | 222 return control.computeSize (wHint, hHint, flushCache); |
245 Point layoutHorizontal (Composite composite, bool move, bool wrap, int width, bool flushCache) { | 245 Point layoutHorizontal (Composite composite, bool move, bool wrap, int width, bool flushCache) { |
246 Control [] children = composite.getChildren (); | 246 Control [] children = composite.getChildren (); |
247 int count = 0; | 247 int count = 0; |
248 for (int i=0; i<children.length; i++) { | 248 for (int i=0; i<children.length; i++) { |
249 Control control = children [i]; | 249 Control control = children [i]; |
250 RowData data = (RowData) control.getLayoutData (); | 250 RowData data = cast(RowData) control.getLayoutData (); |
251 if (data is null || !data.exclude) { | 251 if (data is null || !data.exclude) { |
252 children [count++] = children [i]; | 252 children [count++] = children [i]; |
253 } | 253 } |
254 } | 254 } |
255 if (count is 0) { | 255 if (count is 0) { |
364 Point layoutVertical (Composite composite, bool move, bool wrap, int height, bool flushCache) { | 364 Point layoutVertical (Composite composite, bool move, bool wrap, int height, bool flushCache) { |
365 Control [] children = composite.getChildren (); | 365 Control [] children = composite.getChildren (); |
366 int count = 0; | 366 int count = 0; |
367 for (int i=0; i<children.length; i++) { | 367 for (int i=0; i<children.length; i++) { |
368 Control control = children [i]; | 368 Control control = children [i]; |
369 RowData data = (RowData) control.getLayoutData (); | 369 RowData data = cast(RowData) control.getLayoutData (); |
370 if (data is null || !data.exclude) { | 370 if (data is null || !data.exclude) { |
371 children [count++] = children [i]; | 371 children [count++] = children [i]; |
372 } | 372 } |
373 } | 373 } |
374 if (count is 0) { | 374 if (count is 0) { |