Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSControl.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 |
---|---|
39 super(id); | 39 super(id); |
40 } | 40 } |
41 | 41 |
42 public bool abortEditing () | 42 public bool abortEditing () |
43 { | 43 { |
44 return OS.objc_msgSend(this.id, OS.sel_abortEditing) !is null; | 44 return OS.objc_msgSend(this.id_, OS.sel_abortEditing) !is null; |
45 } | 45 } |
46 | 46 |
47 public objc.SEL action () | 47 public objc.SEL action () |
48 { | 48 { |
49 return OS.objc_msgSend(this.id, OS.sel_action); | 49 return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action); |
50 } | 50 } |
51 | 51 |
52 public objc.id alignment () | 52 public objc.id alignment () |
53 { | 53 { |
54 return OS.objc_msgSend(this.id, OS.sel_alignment); | 54 return OS.objc_msgSend(this.id_, OS.sel_alignment); |
55 } | 55 } |
56 | 56 |
57 public NSAttributedString attributedStringValue () | 57 public NSAttributedString attributedStringValue () |
58 { | 58 { |
59 objc.id result = OS.objc_msgSend(this.id, OS.sel_attributedStringValue); | 59 objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedStringValue); |
60 return result !is null ? new NSAttributedString(result) : null; | 60 return result !is null ? new NSAttributedString(result) : null; |
61 } | 61 } |
62 | 62 |
63 public objc.id baseWritingDirection () | 63 public objc.id baseWritingDirection () |
64 { | 64 { |
65 return OS.objc_msgSend(this.id, OS.sel_baseWritingDirection); | 65 return OS.objc_msgSend(this.id_, OS.sel_baseWritingDirection); |
66 } | 66 } |
67 | 67 |
68 public void calcSize () | 68 public void calcSize () |
69 { | 69 { |
70 OS.objc_msgSend(this.id, OS.sel_calcSize); | 70 OS.objc_msgSend(this.id_, OS.sel_calcSize); |
71 } | 71 } |
72 | 72 |
73 public objc.id cell () | 73 public objc.id cell () |
74 { | 74 { |
75 objc.id result = OS.objc_msgSend(this.id, OS.sel_cell); | 75 objc.id result = OS.objc_msgSend(this.id_, OS.sel_cell); |
76 return result !is null ? result : null; | 76 return result !is null ? result : null; |
77 } | 77 } |
78 | 78 |
79 public static objc.Class cellClass () | 79 public static objc.Class cellClass () |
80 { | 80 { |
81 return OS.objc_msgSend(OS.class_NSControl, OS.sel_cellClass); | 81 return cast(objc.Class) OS.objc_msgSend(OS.class_NSControl, OS.sel_cellClass); |
82 } | 82 } |
83 | 83 |
84 public NSText currentEditor () | 84 public NSText currentEditor () |
85 { | 85 { |
86 objc.id result = OS.objc_msgSend(this.id, OS.sel_currentEditor); | 86 objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentEditor); |
87 return result !is null ? new NSText(result) : null; | 87 return result !is null ? new NSText(result) : null; |
88 } | 88 } |
89 | 89 |
90 public double doubleValue () | 90 public double doubleValue () |
91 { | 91 { |
92 return OS.objc_msgSend_fpret(this.id, OS.sel_doubleValue); | 92 return OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue); |
93 } | 93 } |
94 | 94 |
95 public void drawCell (NSCell aCell) | 95 public void drawCell (NSCell aCell) |
96 { | 96 { |
97 OS.objc_msgSend(this.id, OS.sel_drawCell_1, aCell !is null ? aCell.id : null); | 97 OS.objc_msgSend(this.id_, OS.sel_drawCell_1, aCell !is null ? aCell.id_ : null); |
98 } | 98 } |
99 | 99 |
100 public void drawCellInside (NSCell aCell) | 100 public void drawCellInside (NSCell aCell) |
101 { | 101 { |
102 OS.objc_msgSend(this.id, OS.sel_drawCellInside_1, aCell !is null ? aCell.id : null); | 102 OS.objc_msgSend(this.id_, OS.sel_drawCellInside_1, aCell !is null ? aCell.id_ : null); |
103 } | 103 } |
104 | 104 |
105 public float floatValue () | 105 public float floatValue () |
106 { | 106 { |
107 return cast(float) OS.objc_msgSend_fpret(this.id, OS.sel_floatValue); | 107 return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_floatValue); |
108 } | 108 } |
109 | 109 |
110 public NSFont font () | 110 public NSFont font () |
111 { | 111 { |
112 objc.id result = OS.objc_msgSend(this.id, OS.sel_font); | 112 objc.id result = OS.objc_msgSend(this.id_, OS.sel_font); |
113 return result !is null ? new NSFont(result) : null; | 113 return result !is null ? new NSFont(result) : null; |
114 } | 114 } |
115 | 115 |
116 public id formatter () | 116 public id formatter () |
117 { | 117 { |
118 objc.id result = OS.objc_msgSend(this.id, OS.sel_formatter); | 118 objc.id result = OS.objc_msgSend(this.id_, OS.sel_formatter); |
119 return result !is null ? new id(result) : null; | 119 return result !is null ? new id(result) : null; |
120 } | 120 } |
121 | 121 |
122 public bool ignoresMultiClick () | 122 public bool ignoresMultiClick () |
123 { | 123 { |
124 return OS.objc_msgSend(this.id, OS.sel_ignoresMultiClick) !is null; | 124 return OS.objc_msgSend(this.id_, OS.sel_ignoresMultiClick) !is null; |
125 } | 125 } |
126 | 126 |
127 public int intValue () | 127 public int intValue () |
128 { | 128 { |
129 return OS.objc_msgSend(this.id, OS.sel_intValue); | 129 return cast(int) OS.objc_msgSend(this.id_, OS.sel_intValue); |
130 } | 130 } |
131 | 131 |
132 public int integerValue () | 132 public NSInteger integerValue () |
133 { | 133 { |
134 return OS.objc_msgSend(this.id, OS.sel_integerValue); | 134 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_integerValue); |
135 } | 135 } |
136 | 136 |
137 public bool isContinuous () | 137 public bool isContinuous () |
138 { | 138 { |
139 return OS.objc_msgSend(this.id, OS.sel_isContinuous) !is null; | 139 return OS.objc_msgSend(this.id_, OS.sel_isContinuous) !is null; |
140 } | 140 } |
141 | 141 |
142 public bool isEnabled () | 142 public bool isEnabled () |
143 { | 143 { |
144 return OS.objc_msgSend(this.id, OS.sel_isEnabled) !is null; | 144 return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null; |
145 } | 145 } |
146 | 146 |
147 public void mouseDown (NSEvent theEvent) | 147 public void mouseDown (NSEvent theEvent) |
148 { | 148 { |
149 OS.objc_msgSend(this.id, OS.sel_mouseDown_1, theEvent !is null ? theEvent.id : null); | 149 OS.objc_msgSend(this.id_, OS.sel_mouseDown_1, theEvent !is null ? theEvent.id_ : null); |
150 } | 150 } |
151 | 151 |
152 public id objectValue () | 152 public id objectValue () |
153 { | 153 { |
154 objc.id result = OS.objc_msgSend(this.id, OS.sel_objectValue); | 154 objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectValue); |
155 return result !is null ? new id(result) : null; | 155 return result !is null ? new id(result) : null; |
156 } | 156 } |
157 | 157 |
158 public void performClick (id sender) | 158 public void performClick (id sender) |
159 { | 159 { |
160 OS.objc_msgSend(this.id, OS.sel_performClick_1, sender !is null ? sender.id : null); | 160 OS.objc_msgSend(this.id_, OS.sel_performClick_1, sender !is null ? sender.id_ : null); |
161 } | 161 } |
162 | 162 |
163 public bool refusesFirstResponder () | 163 public bool refusesFirstResponder () |
164 { | 164 { |
165 return OS.objc_msgSend(this.id, OS.sel_refusesFirstResponder) !is null; | 165 return OS.objc_msgSend(this.id_, OS.sel_refusesFirstResponder) !is null; |
166 } | 166 } |
167 | 167 |
168 public void selectCell (NSCell aCell) | 168 public void selectCell (NSCell aCell) |
169 { | 169 { |
170 OS.objc_msgSend(this.id, OS.sel_selectCell_1, aCell !is null ? aCell.id : null); | 170 OS.objc_msgSend(this.id_, OS.sel_selectCell_1, aCell !is null ? aCell.id_ : null); |
171 } | 171 } |
172 | 172 |
173 public id selectedCell () | 173 public id selectedCell () |
174 { | 174 { |
175 objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedCell); | 175 objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedCell); |
176 return result !is null ? new id(result) : null; | 176 return result !is null ? new id(result) : null; |
177 } | 177 } |
178 | 178 |
179 public NSInteger selectedTag () | 179 public NSInteger selectedTag () |
180 { | 180 { |
181 return OS.objc_msgSend(this.id, OS.sel_selectedTag); | 181 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedTag); |
182 } | 182 } |
183 | 183 |
184 public bool sendAction (objc.SEL theAction, id theTarget) | 184 public bool sendAction (objc.SEL theAction, id theTarget) |
185 { | 185 { |
186 return OS.objc_msgSend(this.id, OS.sel_sendAction_1to_1, theAction, theTarget !is null ? theTarget.id : null) !is null; | 186 return OS.objc_msgSend(this.id_, OS.sel_sendAction_1to_1, theAction, theTarget !is null ? theTarget.id_ : null) !is null; |
187 } | 187 } |
188 | 188 |
189 public NSInteger sendActionOn (NSInteger mask) | 189 public NSInteger sendActionOn (NSInteger mask) |
190 { | 190 { |
191 return OS.objc_msgSend(this.id, OS.sel_sendActionOn_1, mask); | 191 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_sendActionOn_1, mask); |
192 } | 192 } |
193 | 193 |
194 public void setAction (objc.SEL aSelector) | 194 public void setAction (objc.SEL aSelector) |
195 { | 195 { |
196 OS.objc_msgSend(this.id, OS.sel_setAction_1, aSelector); | 196 OS.objc_msgSend(this.id_, OS.sel_setAction_1, aSelector); |
197 } | 197 } |
198 | 198 |
199 public void setAlignment (objc.id mode) | 199 public void setAlignment (objc.id mode) |
200 { | 200 { |
201 OS.objc_msgSend(this.id, OS.sel_setAlignment_1, mode); | 201 OS.objc_msgSend(this.id_, OS.sel_setAlignment_1, mode); |
202 } | 202 } |
203 | 203 |
204 public void setAttributedStringValue (NSAttributedString obj) | 204 public void setAttributedStringValue (NSAttributedString obj) |
205 { | 205 { |
206 OS.objc_msgSend(this.id, OS.sel_setAttributedStringValue_1, obj !is null ? obj.id : null); | 206 OS.objc_msgSend(this.id_, OS.sel_setAttributedStringValue_1, obj !is null ? obj.id_ : null); |
207 } | 207 } |
208 | 208 |
209 public void setBaseWritingDirection (objc.id writingDirection) | 209 public void setBaseWritingDirection (objc.id writingDirection) |
210 { | 210 { |
211 OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_1, writingDirection); | 211 OS.objc_msgSend(this.id_, OS.sel_setBaseWritingDirection_1, writingDirection); |
212 } | 212 } |
213 | 213 |
214 public void setCell (NSCell aCell) | 214 public void setCell (NSCell aCell) |
215 { | 215 { |
216 OS.objc_msgSend(this.id, OS.sel_setCell_1, aCell !is null ? aCell.id : null); | 216 OS.objc_msgSend(this.id_, OS.sel_setCell_1, aCell !is null ? aCell.id_ : null); |
217 } | 217 } |
218 | 218 |
219 public static void setCellClass (objc.Class factoryId) | 219 public static void setCellClass (objc.Class factoryId) |
220 { | 220 { |
221 OS.objc_msgSend(OS.class_NSControl, OS.sel_setCellClass_1, factoryId); | 221 OS.objc_msgSend(OS.class_NSControl, OS.sel_setCellClass_1, factoryId); |
222 } | 222 } |
223 | 223 |
224 public void setContinuous (bool flag) | 224 public void setContinuous (bool flag) |
225 { | 225 { |
226 OS.objc_msgSend(this.id, OS.sel_setContinuous_1, flag); | 226 OS.objc_msgSend(this.id_, OS.sel_setContinuous_1, flag); |
227 } | 227 } |
228 | 228 |
229 public void setDoubleValue (double aDouble) | 229 public void setDoubleValue (double aDouble) |
230 { | 230 { |
231 OS.objc_msgSend(this.id, OS.sel_setDoubleValue_1, aDouble); | 231 OS.objc_msgSend(this.id_, OS.sel_setDoubleValue_1, aDouble); |
232 } | 232 } |
233 | 233 |
234 public void setEnabled (bool flag) | 234 public void setEnabled (bool flag) |
235 { | 235 { |
236 OS.objc_msgSend(this.id, OS.sel_setEnabled_1, flag); | 236 OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, flag); |
237 } | 237 } |
238 | 238 |
239 public void setFloatValue (float aFloat) | 239 public void setFloatValue (float aFloat) |
240 { | 240 { |
241 OS.objc_msgSend(this.id, OS.sel_setFloatValue_1, aFloat); | 241 OS.objc_msgSend(this.id_, OS.sel_setFloatValue_1, aFloat); |
242 } | 242 } |
243 | 243 |
244 public void setFloatingPointFormat (bool autoRange, NSUInteger leftDigits, NSUInteger rightDigits) | 244 public void setFloatingPointFormat (bool autoRange, NSUInteger leftDigits, NSUInteger rightDigits) |
245 { | 245 { |
246 OS.objc_msgSend(this.id, OS.sel_setFloatingPointFormat_1left_1right_1, autoRange, leftDigits, rightDigits); | 246 OS.objc_msgSend(this.id_, OS.sel_setFloatingPointFormat_1left_1right_1, autoRange, leftDigits, rightDigits); |
247 } | 247 } |
248 | 248 |
249 public void setFont (NSFont fontObj) | 249 public void setFont (NSFont fontObj) |
250 { | 250 { |
251 OS.objc_msgSend(this.id, OS.sel_setFont_1, fontObj !is null ? fontObj.id : null); | 251 OS.objc_msgSend(this.id_, OS.sel_setFont_1, fontObj !is null ? fontObj.id_ : null); |
252 } | 252 } |
253 | 253 |
254 public void setFormatter (NSFormatter newFormatter) | 254 public void setFormatter (NSFormatter newFormatter) |
255 { | 255 { |
256 OS.objc_msgSend(this.id, OS.sel_setFormatter_1, newFormatter !is null ? newFormatter.id : null); | 256 OS.objc_msgSend(this.id_, OS.sel_setFormatter_1, newFormatter !is null ? newFormatter.id_ : null); |
257 } | 257 } |
258 | 258 |
259 public void setIgnoresMultiClick (bool flag) | 259 public void setIgnoresMultiClick (bool flag) |
260 { | 260 { |
261 OS.objc_msgSend(this.id, OS.sel_setIgnoresMultiClick_1, flag); | 261 OS.objc_msgSend(this.id_, OS.sel_setIgnoresMultiClick_1, flag); |
262 } | 262 } |
263 | 263 |
264 public void setIntValue (int anInt) | 264 public void setIntValue (int anInt) |
265 { | 265 { |
266 OS.objc_msgSend(this.id, OS.sel_setIntValue_1, anInt); | 266 OS.objc_msgSend(this.id_, OS.sel_setIntValue_1, anInt); |
267 } | 267 } |
268 | 268 |
269 public void setIntegerValue (int anInteger) | 269 public void setIntegerValue (NSInteger anInteger) |
270 { | 270 { |
271 OS.objc_msgSend(this.id, OS.sel_setIntegerValue_1, anInteger); | 271 OS.objc_msgSend(this.id_, OS.sel_setIntegerValue_1, anInteger); |
272 } | 272 } |
273 | 273 |
274 public void setNeedsDisplay () | 274 public void setNeedsDisplay () |
275 { | 275 { |
276 OS.objc_msgSend(this.id, OS.sel_setNeedsDisplay); | 276 OS.objc_msgSend(this.id_, OS.sel_setNeedsDisplay); |
277 } | 277 } |
278 | 278 |
279 public void setObjectValue (id obj) | 279 public void setObjectValue (id obj) |
280 { | 280 { |
281 OS.objc_msgSend(this.id, OS.sel_setObjectValue_1, obj !is null ? obj.id : null); | 281 OS.objc_msgSend(this.id_, OS.sel_setObjectValue_1, obj !is null ? obj.id_ : null); |
282 } | 282 } |
283 | 283 |
284 public void setRefusesFirstResponder (bool flag) | 284 public void setRefusesFirstResponder (bool flag) |
285 { | 285 { |
286 OS.objc_msgSend(this.id, OS.sel_setRefusesFirstResponder_1, flag); | 286 OS.objc_msgSend(this.id_, OS.sel_setRefusesFirstResponder_1, flag); |
287 } | 287 } |
288 | 288 |
289 public void setStringValue (NSString aString) | 289 public void setStringValue (NSString aString) |
290 { | 290 { |
291 OS.objc_msgSend(this.id, OS.sel_setStringValue_1, aString !is null ? aString.id : null); | 291 OS.objc_msgSend(this.id_, OS.sel_setStringValue_1, aString !is null ? aString.id_ : null); |
292 } | 292 } |
293 | 293 |
294 public void setTag (NSInteger anInt) | 294 public void setTag (NSInteger anInt) |
295 { | 295 { |
296 OS.objc_msgSend(this.id, OS.sel_setTag_1, anInt); | 296 OS.objc_msgSend(this.id_, OS.sel_setTag_1, anInt); |
297 } | 297 } |
298 | 298 |
299 public void setTarget (id anObject) | 299 public void setTarget (id anObject) |
300 { | 300 { |
301 OS.objc_msgSend(this.id, OS.sel_setTarget_1, anObject !is null ? anObject.id : null); | 301 OS.objc_msgSend(this.id_, OS.sel_setTarget_1, anObject !is null ? anObject.id_ : null); |
302 } | 302 } |
303 | 303 |
304 public void sizeToFit () | 304 public void sizeToFit () |
305 { | 305 { |
306 OS.objc_msgSend(this.id, OS.sel_sizeToFit); | 306 OS.objc_msgSend(this.id_, OS.sel_sizeToFit); |
307 } | 307 } |
308 | 308 |
309 public NSString stringValue () | 309 public NSString stringValue () |
310 { | 310 { |
311 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringValue); | 311 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringValue); |
312 return result !is null ? new NSString(result) : null; | 312 return result !is null ? new NSString(result) : null; |
313 } | 313 } |
314 | 314 |
315 public NSInteger tag () | 315 public NSInteger tag () |
316 { | 316 { |
317 return OS.objc_msgSend(this.id, OS.sel_tag); | 317 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_tag); |
318 } | 318 } |
319 | 319 |
320 public void takeDoubleValueFrom (id sender) | 320 public void takeDoubleValueFrom (id sender) |
321 { | 321 { |
322 OS.objc_msgSend(this.id, OS.sel_takeDoubleValueFrom_1, sender !is null ? sender.id : null); | 322 OS.objc_msgSend(this.id_, OS.sel_takeDoubleValueFrom_1, sender !is null ? sender.id_ : null); |
323 } | 323 } |
324 | 324 |
325 public void takeFloatValueFrom (id sender) | 325 public void takeFloatValueFrom (id sender) |
326 { | 326 { |
327 OS.objc_msgSend(this.id, OS.sel_takeFloatValueFrom_1, sender !is null ? sender.id : null); | 327 OS.objc_msgSend(this.id_, OS.sel_takeFloatValueFrom_1, sender !is null ? sender.id_ : null); |
328 } | 328 } |
329 | 329 |
330 public void takeIntValueFrom (id sender) | 330 public void takeIntValueFrom (id sender) |
331 { | 331 { |
332 OS.objc_msgSend(this.id, OS.sel_takeIntValueFrom_1, sender !is null ? sender.id : null); | 332 OS.objc_msgSend(this.id_, OS.sel_takeIntValueFrom_1, sender !is null ? sender.id_ : null); |
333 } | 333 } |
334 | 334 |
335 public void takeIntegerValueFrom (id sender) | 335 public void takeIntegerValueFrom (id sender) |
336 { | 336 { |
337 OS.objc_msgSend(this.id, OS.sel_takeIntegerValueFrom_1, sender !is null ? sender.id : null); | 337 OS.objc_msgSend(this.id_, OS.sel_takeIntegerValueFrom_1, sender !is null ? sender.id_ : null); |
338 } | 338 } |
339 | 339 |
340 public void takeObjectValueFrom (id sender) | 340 public void takeObjectValueFrom (id sender) |
341 { | 341 { |
342 OS.objc_msgSend(this.id, OS.sel_takeObjectValueFrom_1, sender !is null ? sender.id : null); | 342 OS.objc_msgSend(this.id_, OS.sel_takeObjectValueFrom_1, sender !is null ? sender.id_ : null); |
343 } | 343 } |
344 | 344 |
345 public void takeStringValueFrom (id sender) | 345 public void takeStringValueFrom (id sender) |
346 { | 346 { |
347 OS.objc_msgSend(this.id, OS.sel_takeStringValueFrom_1, sender !is null ? sender.id : null); | 347 OS.objc_msgSend(this.id_, OS.sel_takeStringValueFrom_1, sender !is null ? sender.id_ : null); |
348 } | 348 } |
349 | 349 |
350 public id target () | 350 public id target () |
351 { | 351 { |
352 objc.id result = OS.objc_msgSend(this.id, OS.sel_target); | 352 objc.id result = OS.objc_msgSend(this.id_, OS.sel_target); |
353 return result !is null ? new id(result) : null; | 353 return result !is null ? new id(result) : null; |
354 } | 354 } |
355 | 355 |
356 public void updateCell (NSCell aCell) | 356 public void updateCell (NSCell aCell) |
357 { | 357 { |
358 OS.objc_msgSend(this.id, OS.sel_updateCell_1, aCell !is null ? aCell.id : null); | 358 OS.objc_msgSend(this.id_, OS.sel_updateCell_1, aCell !is null ? aCell.id_ : null); |
359 } | 359 } |
360 | 360 |
361 public void updateCellInside (NSCell aCell) | 361 public void updateCellInside (NSCell aCell) |
362 { | 362 { |
363 OS.objc_msgSend(this.id, OS.sel_updateCellInside_1, aCell !is null ? aCell.id : null); | 363 OS.objc_msgSend(this.id_, OS.sel_updateCellInside_1, aCell !is null ? aCell.id_ : null); |
364 } | 364 } |
365 | 365 |
366 public void validateEditing () | 366 public void validateEditing () |
367 { | 367 { |
368 OS.objc_msgSend(this.id, OS.sel_validateEditing); | 368 OS.objc_msgSend(this.id_, OS.sel_validateEditing); |
369 } | 369 } |
370 | 370 |
371 } | 371 } |