Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSPathControl.d @ 1:8b48be5454ce
The internal cocoa classes compile now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 19 Aug 2008 17:35:17 +0200 |
parents | 380af2bdd8e5 |
children | f565d3a95c0a |
comparison
equal
deleted
inserted
replaced
0:380af2bdd8e5 | 1:8b48be5454ce |
---|---|
11 * Port to the D Programming language: | 11 * Port to the D Programming language: |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | 12 * Jacob Carlborg <jacob.carlborg@gmail.com> |
13 *******************************************************************************/ | 13 *******************************************************************************/ |
14 module dwt.internal.cocoa.NSPathControl; | 14 module dwt.internal.cocoa.NSPathControl; |
15 | 15 |
16 import dwt.internal.cocoa.id; | |
16 import dwt.internal.cocoa.NSArray; | 17 import dwt.internal.cocoa.NSArray; |
17 import dwt.internal.cocoa.NSColor; | 18 import dwt.internal.cocoa.NSColor; |
18 import dwt.internal.cocoa.NSControl; | 19 import dwt.internal.cocoa.NSControl; |
19 import dwt.internal.cocoa.NSDragOperation; | 20 import dwt.internal.cocoa.NSDragOperation; |
20 import dwt.internal.cocoa.NSPathCell : NSPathStyle; | 21 import dwt.internal.cocoa.NSPathCell : NSPathStyle; |
36 super(id); | 37 super(id); |
37 } | 38 } |
38 | 39 |
39 public NSURL URL () | 40 public NSURL URL () |
40 { | 41 { |
41 objc.id result = OS.objc_msgSend(this.id, OS.sel_URL); | 42 objc.id result = OS.objc_msgSend(this.id_, OS.sel_URL); |
42 return result !is null ? new NSURL(result) : null; | 43 return result !is null ? new NSURL(result) : null; |
43 } | 44 } |
44 | 45 |
45 public NSColor backgroundColor () | 46 public NSColor backgroundColor () |
46 { | 47 { |
47 objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor); | 48 objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor); |
48 return result !is null ? new NSColor(result) : null; | 49 return result !is null ? new NSColor(result) : null; |
49 } | 50 } |
50 | 51 |
51 public NSPathComponentCell clickedPathComponentCell () | 52 public NSPathComponentCell clickedPathComponentCell () |
52 { | 53 { |
53 objc.id result = OS.objc_msgSend(this.id, OS.sel_clickedPathComponentCell); | 54 objc.id result = OS.objc_msgSend(this.id_, OS.sel_clickedPathComponentCell); |
54 return result !is null ? new NSPathComponentCell(result) : null; | 55 return result !is null ? new NSPathComponentCell(result) : null; |
55 } | 56 } |
56 | 57 |
57 public id delegatee () | 58 public id delegatee () |
58 { | 59 { |
59 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); | 60 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate); |
60 return result !is null ? new id(result) : null; | 61 return result !is null ? new id(result) : null; |
61 } | 62 } |
62 | 63 |
63 public objc.SEL doubleAction () | 64 public objc.SEL doubleAction () |
64 { | 65 { |
65 return OS.objc_msgSend(this.id, OS.sel_doubleAction); | 66 return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_doubleAction); |
66 } | 67 } |
67 | 68 |
68 public NSArray pathComponentCells () | 69 public NSArray pathComponentCells () |
69 { | 70 { |
70 objc.id result = OS.objc_msgSend(this.id, OS.sel_pathComponentCells); | 71 objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathComponentCells); |
71 return result !is null ? new NSArray(result) : null; | 72 return result !is null ? new NSArray(result) : null; |
72 } | 73 } |
73 | 74 |
74 public NSPathStyle pathStyle () | 75 public NSPathStyle pathStyle () |
75 { | 76 { |
76 return OS.objc_msgSend(this.id, OS.sel_pathStyle); | 77 return cast(NSPathStyle) OS.objc_msgSend(this.id_, OS.sel_pathStyle); |
77 } | 78 } |
78 | 79 |
79 public void setBackgroundColor (NSColor color) | 80 public void setBackgroundColor (NSColor color) |
80 { | 81 { |
81 OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null); | 82 OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null); |
82 } | 83 } |
83 | 84 |
84 public void setDelegate (id delegatee) | 85 public void setDelegate (id delegatee) |
85 { | 86 { |
86 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id : null); | 87 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null); |
87 } | 88 } |
88 | 89 |
89 public void setDoubleAction (objc.SEL action) | 90 public void setDoubleAction (objc.SEL action) |
90 { | 91 { |
91 OS.objc_msgSend(this.id, OS.sel_setDoubleAction_1, action); | 92 OS.objc_msgSend(this.id_, OS.sel_setDoubleAction_1, action); |
92 } | 93 } |
93 | 94 |
94 public void setDraggingSourceOperationMask (NSDragOperation mask, bool isLocal) | 95 public void setDraggingSourceOperationMask (NSDragOperation mask, bool isLocal) |
95 { | 96 { |
96 OS.objc_msgSend(this.id, OS.sel_setDraggingSourceOperationMask_1forLocal_1, mask, isLocal); | 97 OS.objc_msgSend(this.id_, OS.sel_setDraggingSourceOperationMask_1forLocal_1, mask, isLocal); |
97 } | 98 } |
98 | 99 |
99 public void setPathComponentCells (NSArray cells) | 100 public void setPathComponentCells (NSArray cells) |
100 { | 101 { |
101 OS.objc_msgSend(this.id, OS.sel_setPathComponentCells_1, cells !is null ? cells.id : null); | 102 OS.objc_msgSend(this.id_, OS.sel_setPathComponentCells_1, cells !is null ? cells.id_ : null); |
102 } | 103 } |
103 | 104 |
104 public void setPathStyle (NSPathStyle style) | 105 public void setPathStyle (NSPathStyle style) |
105 { | 106 { |
106 OS.objc_msgSend(this.id, OS.sel_setPathStyle_1, style); | 107 OS.objc_msgSend(this.id_, OS.sel_setPathStyle_1, style); |
107 } | 108 } |
108 | 109 |
109 public void setURL (NSURL url) | 110 public void setURL (NSURL url) |
110 { | 111 { |
111 OS.objc_msgSend(this.id, OS.sel_setURL_1, url !is null ? url.id : null); | 112 OS.objc_msgSend(this.id_, OS.sel_setURL_1, url !is null ? url.id_ : null); |
112 } | 113 } |
113 | 114 |
114 } | 115 } |