Mercurial > projects > dwt-mac
diff dwt/widgets/TreeItem.d @ 123:63a09873578e
Fixed compile errors
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Thu, 15 Jan 2009 23:08:54 +0100 |
parents | 8e3c85e1733d |
children |
line wrap: on
line diff
--- a/dwt/widgets/TreeItem.d Wed Dec 31 21:01:13 2008 +0100 +++ b/dwt/widgets/TreeItem.d Thu Jan 15 23:08:54 2009 +0100 @@ -269,7 +269,7 @@ rect.width = rect.height = Float.MAX_VALUE; NSSize size = cell.cellSizeForBounds (rect); width = cast(int)Math.ceil (size.width); - + if (callMeasureItem && parent.hooks (DWT.MeasureItem)) { NSOutlineView outlineView = cast(NSOutlineView)parent.view; NSInteger nsColumnIndex = 0; @@ -302,7 +302,7 @@ width = event.width; } } - + if (columnIndex is 0) { NSTableColumn column = parent.columnCount is 0 ? parent.firstColumn : parent.columns[0].nsColumn; NSOutlineView outlineView = cast(NSOutlineView)parent.view; @@ -411,7 +411,7 @@ if (font !is null) { dict.setObject(font.handle, OS.NSFontAttributeName); } - + NSMutableParagraphStyle paragraphStyle = cast(NSMutableParagraphStyle)(new NSMutableParagraphStyle ()).alloc ().init (); paragraphStyle.autorelease (); paragraphStyle.setLineBreakMode (OS.NSLineBreakByClipping); @@ -425,7 +425,7 @@ paragraphStyle.setAlignment (OS.NSRightTextAlignment); } } - + String text = getText (index); NSString str = NSString.stringWith(text); NSAttributedString attribStr = (cast(NSAttributedString) (new NSAttributedString ()).alloc ()).initWithString (str, dict); @@ -521,7 +521,7 @@ checkWidget (); if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED); if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0); - + NSOutlineView outlineView = cast(NSOutlineView) parent.view; if (parent.columnCount is 0) { index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0; @@ -722,7 +722,7 @@ checkWidget (); if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED); if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0); - + NSOutlineView outlineView = cast(NSOutlineView) parent.view; Image image = index is 0 ? this.image : (images !is null) ? images [index] : null; if (parent.columnCount is 0) { @@ -896,7 +896,7 @@ checkWidget (); if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED); if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0); - + NSOutlineView outlineView = cast(NSOutlineView) parent.view; Image image = index is 0 ? this.image : (images !is null) ? images [index] : null; if (parent.columnCount is 0) { @@ -993,12 +993,12 @@ */ public void removeAll () { checkWidget (); -// for (int i=itemCount - 1; i >= 0; i--) { -// TreeItem item = parent._getItem (childIds [i], false); -// if (item !is null && !item.isDisposed ()) { -// item.dispose (); -// } -// } + // for (int i=itemCount - 1; i >= 0; i--) { + // TreeItem item = parent._getItem (childIds [i], false); + // if (item !is null && !item.isDisposed ()) { + // item.dispose (); + // } + // } } /** @@ -1067,7 +1067,7 @@ cellBackground [index] = color; if (oldColor !is null && oldColor.equals (color)) return; cached = true; - + NSOutlineView outlineView = cast(NSOutlineView) parent.view; if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) { outlineView.reloadItem (handle); @@ -1126,12 +1126,12 @@ } parent.ignoreExpand = false; cached = true; -// if (expanded) { -// parent.setScrollWidth (false, childIds, false); -// } else { -// parent.setScrollWidth (true); -// parent.fixScrollBar (); -// } + // if (expanded) { + // parent.setScrollWidth (false, childIds, false); + // } else { + // parent.setScrollWidth (true); + // parent.fixScrollBar (); + // } } /** @@ -1199,7 +1199,7 @@ cellFont [index] = font; if (oldFont !is null && oldFont.equals (font)) return; cached = true; - + NSOutlineView outlineView = cast(NSOutlineView) parent.view; if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) { outlineView.reloadItem (handle); @@ -1283,7 +1283,7 @@ cellForeground [index] = color; if (oldColor !is null && oldColor.equals (color)) return; cached = true; - + NSOutlineView outlineView = cast(NSOutlineView) parent.view; if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) { outlineView.reloadItem (handle); @@ -1364,9 +1364,9 @@ if (image !is null && image.isDisposed ()) { error (DWT.ERROR_INVALID_ARGUMENT); } -// if (parent.imageBounds is null && image !is null) { -// parent.setItemHeight (image); -// } + // if (parent.imageBounds is null && image !is null) { + // parent.setItemHeight (image); + // } if (index is 0) { if (image !is null && image.type is DWT.ICON) { if (image.equals (this.image)) return; @@ -1382,9 +1382,9 @@ } images [index] = image; } -// cached = true; + // cached = true; if (index is 0) parent.setScrollWidth (this, false, true); - + NSOutlineView outlineView = cast(NSOutlineView) parent.view; if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) { outlineView.reloadItem (handle); @@ -1479,7 +1479,7 @@ } cached = true; if (index is 0) parent.setScrollWidth (this, false, true); - + NSOutlineView outlineView = cast(NSOutlineView) parent.view; if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) { outlineView.reloadItem (handle);