Mercurial > projects > dwt-mac
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:380af2bdd8e5 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2007 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * | |
11 * Port to the D Programming language: | |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | |
13 *******************************************************************************/ | |
14 module dwt.internal.cocoa.NSPathControl; | |
15 | |
16 import dwt.internal.cocoa.NSArray; | |
17 import dwt.internal.cocoa.NSColor; | |
18 import dwt.internal.cocoa.NSControl; | |
19 import dwt.internal.cocoa.NSDragOperation; | |
20 import dwt.internal.cocoa.NSPathCell : NSPathStyle; | |
21 import dwt.internal.cocoa.NSPathComponentCell; | |
22 import dwt.internal.cocoa.NSURL; | |
23 import dwt.internal.cocoa.OS; | |
24 import objc = dwt.internal.objc.runtime; | |
25 | |
26 public class NSPathControl : NSControl | |
27 { | |
28 | |
29 public this () | |
30 { | |
31 super(); | |
32 } | |
33 | |
34 public this (objc.id id) | |
35 { | |
36 super(id); | |
37 } | |
38 | |
39 public NSURL URL () | |
40 { | |
41 objc.id result = OS.objc_msgSend(this.id, OS.sel_URL); | |
42 return result !is null ? new NSURL(result) : null; | |
43 } | |
44 | |
45 public NSColor backgroundColor () | |
46 { | |
47 objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor); | |
48 return result !is null ? new NSColor(result) : null; | |
49 } | |
50 | |
51 public NSPathComponentCell clickedPathComponentCell () | |
52 { | |
53 objc.id result = OS.objc_msgSend(this.id, OS.sel_clickedPathComponentCell); | |
54 return result !is null ? new NSPathComponentCell(result) : null; | |
55 } | |
56 | |
57 public id delegatee () | |
58 { | |
59 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); | |
60 return result !is null ? new id(result) : null; | |
61 } | |
62 | |
63 public objc.SEL doubleAction () | |
64 { | |
65 return OS.objc_msgSend(this.id, OS.sel_doubleAction); | |
66 } | |
67 | |
68 public NSArray pathComponentCells () | |
69 { | |
70 objc.id result = OS.objc_msgSend(this.id, OS.sel_pathComponentCells); | |
71 return result !is null ? new NSArray(result) : null; | |
72 } | |
73 | |
74 public NSPathStyle pathStyle () | |
75 { | |
76 return OS.objc_msgSend(this.id, OS.sel_pathStyle); | |
77 } | |
78 | |
79 public void setBackgroundColor (NSColor color) | |
80 { | |
81 OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null); | |
82 } | |
83 | |
84 public void setDelegate (id delegatee) | |
85 { | |
86 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id : null); | |
87 } | |
88 | |
89 public void setDoubleAction (objc.SEL action) | |
90 { | |
91 OS.objc_msgSend(this.id, OS.sel_setDoubleAction_1, action); | |
92 } | |
93 | |
94 public void setDraggingSourceOperationMask (NSDragOperation mask, bool isLocal) | |
95 { | |
96 OS.objc_msgSend(this.id, OS.sel_setDraggingSourceOperationMask_1forLocal_1, mask, isLocal); | |
97 } | |
98 | |
99 public void setPathComponentCells (NSArray cells) | |
100 { | |
101 OS.objc_msgSend(this.id, OS.sel_setPathComponentCells_1, cells !is null ? cells.id : null); | |
102 } | |
103 | |
104 public void setPathStyle (NSPathStyle style) | |
105 { | |
106 OS.objc_msgSend(this.id, OS.sel_setPathStyle_1, style); | |
107 } | |
108 | |
109 public void setURL (NSURL url) | |
110 { | |
111 OS.objc_msgSend(this.id, OS.sel_setURL_1, url !is null ? url.id : null); | |
112 } | |
113 | |
114 } |