Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSPathCell.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.NSPathCell; | 14 module dwt.internal.cocoa.NSPathCell; |
15 | 15 |
16 import dwt.internal.cocoa.id; | |
16 import dwt.internal.cocoa.NSActionCell; | 17 import dwt.internal.cocoa.NSActionCell; |
17 import dwt.internal.cocoa.NSArray; | 18 import dwt.internal.cocoa.NSArray; |
18 import dwt.internal.cocoa.NSAttributedString; | 19 import dwt.internal.cocoa.NSAttributedString; |
19 import dwt.internal.cocoa.NSCell : NSControlSize; | 20 import dwt.internal.cocoa.NSCell : NSControlSize; |
20 import dwt.internal.cocoa.NSColor; | 21 import dwt.internal.cocoa.NSColor; |
21 import dwt.internal.cocoa.NSEvent; | 22 import dwt.internal.cocoa.NSEvent; |
22 import dwt.internal.cocoa.NSInteger; | 23 import dwt.internal.cocoa.NSInteger; |
23 import dwt.internal.cocoa.NSPathComponentCell; | 24 import dwt.internal.cocoa.NSPathComponentCell; |
24 import dwt.internal.cocoa.NSPoint; | 25 import dwt.internal.cocoa.NSPoint; |
25 import dwt.internal.cocoa.NSRect; | 26 import dwt.internal.cocoa.NSRect; |
27 import dwt.internal.cocoa.NSString; | |
26 import dwt.internal.cocoa.NSURL; | 28 import dwt.internal.cocoa.NSURL; |
27 import dwt.internal.cocoa.NSView; | 29 import dwt.internal.cocoa.NSView; |
28 import dwt.internal.cocoa.OS; | 30 import dwt.internal.cocoa.OS; |
29 import objc = dwt.internal.objc.runtime; | 31 import objc = dwt.internal.objc.runtime; |
30 | 32 |
50 super(id); | 52 super(id); |
51 } | 53 } |
52 | 54 |
53 public NSURL URL () | 55 public NSURL URL () |
54 { | 56 { |
55 objc.id result = OS.objc_msgSend(this.id, OS.sel_URL); | 57 objc.id result = OS.objc_msgSend(this.id_, OS.sel_URL); |
56 return result !is null ? new NSURL(result) : null; | 58 return result !is null ? new NSURL(result) : null; |
57 } | 59 } |
58 | 60 |
59 public NSArray allowedTypes () | 61 public NSArray allowedTypes () |
60 { | 62 { |
61 objc.id result = OS.objc_msgSend(this.id, OS.sel_allowedTypes); | 63 objc.id result = OS.objc_msgSend(this.id_, OS.sel_allowedTypes); |
62 return result !is null ? new NSArray(result) : null; | 64 return result !is null ? new NSArray(result) : null; |
63 } | 65 } |
64 | 66 |
65 public NSColor backgroundColor () | 67 public NSColor backgroundColor () |
66 { | 68 { |
67 objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor); | 69 objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor); |
68 return result !is null ? new NSColor(result) : null; | 70 return result !is null ? new NSColor(result) : null; |
69 } | 71 } |
70 | 72 |
71 public NSPathComponentCell clickedPathComponentCell () | 73 public NSPathComponentCell clickedPathComponentCell () |
72 { | 74 { |
73 objc.id result = OS.objc_msgSend(this.id, OS.sel_clickedPathComponentCell); | 75 objc.id result = OS.objc_msgSend(this.id_, OS.sel_clickedPathComponentCell); |
74 return result !is null ? new NSPathComponentCell(result) : null; | 76 return result !is null ? new NSPathComponentCell(result) : null; |
75 } | 77 } |
76 | 78 |
77 public id delegatee () | 79 public id delegatee () |
78 { | 80 { |
79 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); | 81 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate); |
80 return result !is null ? new id(result) : null; | 82 return result !is null ? new id(result) : null; |
81 } | 83 } |
82 | 84 |
83 public objc.SEL doubleAction () | 85 public objc.SEL doubleAction () |
84 { | 86 { |
85 return OS.objc_msgSend(this.id, OS.sel_doubleAction); | 87 return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_doubleAction); |
86 } | 88 } |
87 | 89 |
88 public void mouseEntered (NSEvent event, NSRect frame, NSView view) | 90 public void mouseEntered (NSEvent event, NSRect frame, NSView view) |
89 { | 91 { |
90 OS.objc_msgSend(this.id, OS.sel_mouseEntered_1withFrame_1inView_1, event !is null ? event.id : null, frame, view !is null ? view.id : null); | 92 OS.objc_msgSend(this.id_, OS.sel_mouseEntered_1withFrame_1inView_1, event !is null ? event.id_ : null, frame, view !is null ? view.id_ : null); |
91 } | 93 } |
92 | 94 |
93 public void mouseExited (NSEvent event, NSRect frame, NSView view) | 95 public void mouseExited (NSEvent event, NSRect frame, NSView view) |
94 { | 96 { |
95 OS.objc_msgSend(this.id, OS.sel_mouseExited_1withFrame_1inView_1, event !is null ? event.id : null, frame, view !is null ? view.id : null); | 97 OS.objc_msgSend(this.id_, OS.sel_mouseExited_1withFrame_1inView_1, event !is null ? event.id_ : null, frame, view !is null ? view.id_ : null); |
96 } | 98 } |
97 | 99 |
98 public NSPathComponentCell pathComponentCellAtPoint (NSPoint point, NSRect frame, NSView view) | 100 public NSPathComponentCell pathComponentCellAtPoint (NSPoint point, NSRect frame, NSView view) |
99 { | 101 { |
100 objc.id result = OS.objc_msgSend(this.id, OS.sel_pathComponentCellAtPoint_1withFrame_1inView_1, point, frame, view !is null ? view.id : null); | 102 objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathComponentCellAtPoint_1withFrame_1inView_1, point, frame, view !is null ? view.id_ : null); |
101 return result !is null ? new NSPathComponentCell(result) : null; | 103 return result !is null ? new NSPathComponentCell(result) : null; |
102 } | 104 } |
103 | 105 |
104 public static objc.Class pathComponentCellClass () | 106 public static objc.Class pathComponentCellClass () |
105 { | 107 { |
106 return cast(objc.Class) OS.objc_msgSend(OS.class_NSPathCell, OS.sel_pathComponentCellClass); | 108 return cast(objc.Class) OS.objc_msgSend(OS.class_NSPathCell, OS.sel_pathComponentCellClass); |
107 } | 109 } |
108 | 110 |
109 public NSArray pathComponentCells () | 111 public NSArray pathComponentCells () |
110 { | 112 { |
111 objc.id result = OS.objc_msgSend(this.id, OS.sel_pathComponentCells); | 113 objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathComponentCells); |
112 return result !is null ? new NSArray(result) : null; | 114 return result !is null ? new NSArray(result) : null; |
113 } | 115 } |
114 | 116 |
115 public NSPathStyle pathStyle () | 117 public NSPathStyle pathStyle () |
116 { | 118 { |
117 return OS.objc_msgSend(this.id, OS.sel_pathStyle); | 119 return cast(NSPathStyle) OS.objc_msgSend(this.id_, OS.sel_pathStyle); |
118 } | 120 } |
119 | 121 |
120 public NSAttributedString placeholderAttributedString () | 122 public NSAttributedString placeholderAttributedString () |
121 { | 123 { |
122 objc.id result = OS.objc_msgSend(this.id, OS.sel_placeholderAttributedString); | 124 objc.id result = OS.objc_msgSend(this.id_, OS.sel_placeholderAttributedString); |
123 return result !is null ? new NSAttributedString(result) : null; | 125 return result !is null ? new NSAttributedString(result) : null; |
124 } | 126 } |
125 | 127 |
126 public NSString placeholderString () | 128 public NSString placeholderString () |
127 { | 129 { |
128 objc.id result = OS.objc_msgSend(this.id, OS.sel_placeholderString); | 130 objc.id result = OS.objc_msgSend(this.id_, OS.sel_placeholderString); |
129 return result !is null ? new NSString(result) : null; | 131 return result !is null ? new NSString(result) : null; |
130 } | 132 } |
131 | 133 |
132 public NSRect rectOfPathComponentCell (NSPathComponentCell cell, NSRect frame, NSView view) | 134 public NSRect rectOfPathComponentCell (NSPathComponentCell cell, NSRect frame, NSView view) |
133 { | 135 { |
134 NSRect result; | 136 NSRect result; |
135 OS.objc_msgSend_stret(result, this.id, OS.sel_rectOfPathComponentCell_1withFrame_1inView_1, cell !is null ? cell.id : null, frame, | 137 OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectOfPathComponentCell_1withFrame_1inView_1, cell !is null ? cell.id_ : null, frame, |
136 view !is null ? view.id : null); | 138 view !is null ? view.id_ : null); |
137 return result; | 139 return result; |
138 } | 140 } |
139 | 141 |
140 public void setAllowedTypes (NSArray allowedTypes) | 142 public void setAllowedTypes (NSArray allowedTypes) |
141 { | 143 { |
142 OS.objc_msgSend(this.id, OS.sel_setAllowedTypes_1, allowedTypes !is null ? allowedTypes.id : null); | 144 OS.objc_msgSend(this.id_, OS.sel_setAllowedTypes_1, allowedTypes !is null ? allowedTypes.id_ : null); |
143 } | 145 } |
144 | 146 |
145 public void setBackgroundColor (NSColor color) | 147 public void setBackgroundColor (NSColor color) |
146 { | 148 { |
147 OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null); | 149 OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null); |
148 } | 150 } |
149 | 151 |
150 public void setControlSize (NSControlSize size) | 152 public void setControlSize (NSControlSize size) |
151 { | 153 { |
152 OS.objc_msgSend(this.id, OS.sel_setControlSize_1, size); | 154 OS.objc_msgSend(this.id_, OS.sel_setControlSize_1, size); |
153 } | 155 } |
154 | 156 |
155 public void setDelegate (id value) | 157 public void setDelegate (id value) |
156 { | 158 { |
157 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, value !is null ? value.id : null); | 159 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, value !is null ? value.id_ : null); |
158 } | 160 } |
159 | 161 |
160 public void setDoubleAction (objc.SEL action) | 162 public void setDoubleAction (objc.SEL action) |
161 { | 163 { |
162 OS.objc_msgSend(this.id, OS.sel_setDoubleAction_1, action); | 164 OS.objc_msgSend(this.id_, OS.sel_setDoubleAction_1, action); |
163 } | 165 } |
164 | 166 |
165 public void setObjectValue (id obj) | 167 public void setObjectValue (id obj) |
166 { | 168 { |
167 OS.objc_msgSend(this.id, OS.sel_setObjectValue_1, obj !is null ? obj.id : null); | 169 OS.objc_msgSend(this.id_, OS.sel_setObjectValue_1, obj !is null ? obj.id_ : null); |
168 } | 170 } |
169 | 171 |
170 public void setPathComponentCells (NSArray cells) | 172 public void setPathComponentCells (NSArray cells) |
171 { | 173 { |
172 OS.objc_msgSend(this.id, OS.sel_setPathComponentCells_1, cells !is null ? cells.id : null); | 174 OS.objc_msgSend(this.id_, OS.sel_setPathComponentCells_1, cells !is null ? cells.id_ : null); |
173 } | 175 } |
174 | 176 |
175 public void setPathStyle (NSPathStyle style) | 177 public void setPathStyle (NSPathStyle style) |
176 { | 178 { |
177 OS.objc_msgSend(this.id, OS.sel_setPathStyle_1, style); | 179 OS.objc_msgSend(this.id_, OS.sel_setPathStyle_1, style); |
178 } | 180 } |
179 | 181 |
180 public void setPlaceholderAttributedString (NSAttributedString string) | 182 public void setPlaceholderAttributedString (NSAttributedString string) |
181 { | 183 { |
182 OS.objc_msgSend(this.id, OS.sel_setPlaceholderAttributedString_1, string !is null ? string.id : null); | 184 OS.objc_msgSend(this.id_, OS.sel_setPlaceholderAttributedString_1, string !is null ? string.id_ : null); |
183 } | 185 } |
184 | 186 |
185 public void setPlaceholderString (NSString string) | 187 public void setPlaceholderString (NSString string) |
186 { | 188 { |
187 OS.objc_msgSend(this.id, OS.sel_setPlaceholderString_1, string !is null ? string.id : null); | 189 OS.objc_msgSend(this.id_, OS.sel_setPlaceholderString_1, string !is null ? string.id_ : null); |
188 } | 190 } |
189 | 191 |
190 public void setURL (NSURL url) | 192 public void setURL (NSURL url) |
191 { | 193 { |
192 OS.objc_msgSend(this.id, OS.sel_setURL_1, url !is null ? url.id : null); | 194 OS.objc_msgSend(this.id_, OS.sel_setURL_1, url !is null ? url.id_ : null); |
193 } | 195 } |
194 | 196 |
195 } | 197 } |