diff dwt/internal/cocoa/NSTableHeaderView.d @ 45:d8635bb48c7c

Merge with SWT 3.5
author Jacob Carlborg <doob@me.com>
date Mon, 01 Dec 2008 17:07:00 +0100
parents f565d3a95c0a
children 62202ce0039f
line wrap: on
line diff
--- a/dwt/internal/cocoa/NSTableHeaderView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTableHeaderView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,76 +1,49 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTableHeaderView;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSTableView;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSTableHeaderView : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSTableHeaderView : NSView {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public NSInteger columnAtPoint (NSPoint point)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_columnAtPoint_1, point);
-    }
-
-    public NSInteger draggedColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_draggedColumn);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public CGFloat draggedDistance ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_draggedDistance);
-    }
-
-    public NSRect headerRectOfColumn (NSInteger column)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_headerRectOfColumn_1, column);
-        return result;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSInteger resizedColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_resizedColumn);
-    }
+public NSInteger columnAtPoint(NSPoint point) {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_columnAtPoint_, point);
+}
 
-    public void setTableView (NSTableView tableView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTableView_1, tableView !is null ? tableView.id_ : null);
-    }
-
-    public NSTableView tableView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tableView);
-        return result !is null ? new NSTableView(result) : null;
-    }
+public NSRect headerRectOfColumn(NSInteger column) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_headerRectOfColumn_, column);
+    return result;
+}
 
 }