diff dwt/widgets/TableItem.d @ 123:63a09873578e

Fixed compile errors
author Jacob Carlborg <doob@me.com>
date Thu, 15 Jan 2009 23:08:54 +0100
parents 2d895a357833
children
line wrap: on
line diff
--- a/dwt/widgets/TableItem.d	Wed Dec 31 21:01:13 2008 +0100
+++ b/dwt/widgets/TableItem.d	Thu Jan 15 23:08:54 2009 +0100
@@ -151,7 +151,7 @@
 
 int calculateWidth (int columnIndex, GC gc, bool callMeasureItem) {
     if (!callMeasureItem && customWidth !is -1) return customWidth;
-
+    
     NSBrowserCell cell = parent.dataCell;
     cell.setFont (getFont (columnIndex).handle);
     cell.setTitle (NSString.stringWith (getText (columnIndex)));
@@ -161,7 +161,7 @@
     rect.width = rect.height = Float.MAX_VALUE;
     NSSize size = cell.cellSizeForBounds (rect);
     int width = cast(int)Math.ceil (size.width);
-
+    
     if (callMeasureItem && parent.hooks (DWT.MeasureItem)) {
         NSTableView tableView = cast(NSTableView)parent.view;
         NSInteger nsColumnIndex = 0;
@@ -241,7 +241,7 @@
             paragraphStyle.setAlignment (OS.NSRightTextAlignment);
         }
     }
-
+    
     String text = getText (index);
     size_t length_ = text.length ();
     char[] chars = new char [length_];
@@ -334,7 +334,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);
-
+    
     NSTableView tableView = cast(NSTableView) parent.view;
     if (parent.columnCount is 0) {
         index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
@@ -512,7 +512,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);
-
+    
     NSTableView tableView = cast(NSTableView) parent.view;
     Image image = index is 0 ? this.image : (images !is null) ? images [index] : null;
     if (parent.columnCount is 0) {
@@ -616,7 +616,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);
-
+    
     NSTableView tableView = cast(NSTableView) parent.view;
     Image image = index is 0 ? this.image : (images !is null) ? images [index] : null;
     if (parent.columnCount is 0) {
@@ -636,7 +636,7 @@
 }
 
 void redraw () {
-//  0[aTableView setNeedsDisplayInRect:[aTableView rectOfRow:row]];
+    //  0[aTableView setNeedsDisplayInRect:[aTableView rectOfRow:row]];
     (cast(NSTableView) parent.view).reloadData ();
     (cast(NSTableView) parent.view).tile ();
 }
@@ -648,7 +648,7 @@
 
 void releaseParent () {
     super.releaseParent ();
-//  parent.checkItems (true);
+    //  parent.checkItems (true);
 }
 
 void releaseWidget () {
@@ -727,7 +727,7 @@
     cellBackground [index] = color;
     if (oldColor !is null && oldColor.equals (color)) return;
     cached = true;
-
+    
     NSTableView tableView = cast(NSTableView) parent.view;
     NSRect rect;
     if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
@@ -833,7 +833,7 @@
     cellFont [index] = font;
     if (oldFont !is null && oldFont.equals (font)) return;
     cached = true;
-
+    
     NSTableView tableView = cast(NSTableView) parent.view;
     NSRect rect;
     if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
@@ -916,7 +916,7 @@
     cellForeground [index] = color;
     if (oldColor !is null && oldColor.equals (color)) return;
     cached = true;
-
+    
     NSTableView tableView = cast(NSTableView) parent.view;
     NSRect rect;
     if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
@@ -998,9 +998,9 @@
     }
     int itemIndex = parent.indexOf (this);
     if (itemIndex is -1) return;
-//  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;
@@ -1016,8 +1016,8 @@
         }
         images [index] = image; 
     }
-//  cached = true;
-//  if (index is 0) parent.setScrollWidth (this);
+    //  cached = true;
+    //  if (index is 0) parent.setScrollWidth (this);
     
     NSTableView tableView = cast(NSTableView) parent.view;
     NSRect rect;
@@ -1112,7 +1112,7 @@
     }
     cached = true;
     if (index is 0) parent.setScrollWidth (this, true);
-
+    
     NSTableView tableView = cast(NSTableView) parent.view;
     NSRect rect;
     if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {