diff dwt/internal/cocoa/NSPathControl.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children 8b48be5454ce
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/NSPathControl.d	Sat Aug 09 17:00:02 2008 +0200
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *     
+ * Port to the D Programming language:
+ *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.NSPathControl;
+
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSColor;
+import dwt.internal.cocoa.NSControl;
+import dwt.internal.cocoa.NSDragOperation;
+import dwt.internal.cocoa.NSPathCell : NSPathStyle;
+import dwt.internal.cocoa.NSPathComponentCell;
+import dwt.internal.cocoa.NSURL;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
+
+public class NSPathControl : NSControl
+{
+
+    public this ()
+    {
+        super();
+    }
+
+    public this (objc.id id)
+    {
+        super(id);
+    }
+
+    public NSURL URL ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_URL);
+        return result !is null ? new NSURL(result) : null;
+    }
+
+    public NSColor backgroundColor ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor);
+        return result !is null ? new NSColor(result) : null;
+    }
+
+    public NSPathComponentCell clickedPathComponentCell ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_clickedPathComponentCell);
+        return result !is null ? new NSPathComponentCell(result) : null;
+    }
+
+    public id delegatee ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate);
+        return result !is null ? new id(result) : null;
+    }
+
+    public objc.SEL doubleAction ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_doubleAction);
+    }
+
+    public NSArray pathComponentCells ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_pathComponentCells);
+        return result !is null ? new NSArray(result) : null;
+    }
+
+    public NSPathStyle pathStyle ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_pathStyle);
+    }
+
+    public void setBackgroundColor (NSColor color)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null);
+    }
+
+    public void setDelegate (id delegatee)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id : null);
+    }
+
+    public void setDoubleAction (objc.SEL action)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setDoubleAction_1, action);
+    }
+
+    public void setDraggingSourceOperationMask (NSDragOperation mask, bool isLocal)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setDraggingSourceOperationMask_1forLocal_1, mask, isLocal);
+    }
+
+    public void setPathComponentCells (NSArray cells)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setPathComponentCells_1, cells !is null ? cells.id : null);
+    }
+
+    public void setPathStyle (NSPathStyle style)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setPathStyle_1, style);
+    }
+
+    public void setURL (NSURL url)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setURL_1, url !is null ? url.id : null);
+    }
+
+}