comparison dwt/internal/cocoa/NSCell.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.NSCell;
15
16 import dwt.internal.cocoa.id;
17 import dwt.internal.cocoa.NSAttributedString;
18 import dwt.internal.cocoa.NSCell;
19 import dwt.internal.cocoa.NSColor;
20 import dwt.internal.cocoa.NSEvent;
21 import dwt.internal.cocoa.NSFont;
22 import dwt.internal.cocoa.NSFormatter;
23 import dwt.internal.cocoa.NSImage;
24 import dwt.internal.cocoa.NSInteger;
25 import dwt.internal.cocoa.NSMenu;
26 import dwt.internal.cocoa.NSObject;
27 import dwt.internal.cocoa.NSPoint;
28 import dwt.internal.cocoa.NSRect;
29 import dwt.internal.cocoa.NSSize;
30 import dwt.internal.cocoa.NSText;
31 import dwt.internal.cocoa.NSView;
32 import dwt.internal.cocoa.OS;
33 import objc = dwt.internal.objc.runtime;
34
35 /*alias NSUInteger NSControlSize;*/
36
37 enum NSControlSize : NSUInteger
38 {
39 NSRegularControlSize,
40 NSSmallControlSize,
41 NSMiniControlSize
42 }
43
44 alias NSControlSize.NSRegularControlSize NSRegularControlSize;
45 alias NSControlSize.NSSmallControlSize NSSmallControlSize;
46 alias NSControlSize.NSMiniControlSize NSMiniControlSize;
47
48 /*alias NSUInteger NSCellAttribute;*/
49
50 enum NSCellAttribute : NSUInteger
51 {
52 NSCellDisabled = 0,
53 NSCellState = 1,
54 NSPushInCell = 2,
55 NSCellEditable = 3,
56 NSChangeGrayCell = 4,
57 NSCellHighlighted = 5,
58 NSCellLightsByContents = 6,
59 NSCellLightsByGray = 7,
60 NSChangeBackgroundCell = 8,
61 NSCellLightsByBackground = 9,
62 NSCellIsBordered = 10,
63 NSCellHasOverlappingImage = 11,
64 NSCellHasImageHorizontal = 12,
65 NSCellHasImageOnLeftOrBottom = 13,
66 NSCellChangesContents = 14,
67 NSCellIsInsetButton = 15,
68 NSCellAllowsMixedState = 16
69 }
70
71 alias NSCellAttribute.NSCellDisabled NSCellDisabled;
72 alias NSCellAttribute.NSCellState NSCellState;
73 alias NSCellAttribute.NSPushInCell NSPushInCell;
74 alias NSCellAttribute.NSCellEditable NSCellEditable;
75 alias NSCellAttribute.NSChangeGrayCell NSChangeGrayCell;
76 alias NSCellAttribute.NSCellHighlighted NSCellHighlighted;
77 alias NSCellAttribute.NSCellLightsByContents NSCellLightsByContents;
78 alias NSCellAttribute.NSCellLightsByGray NSCellLightsByGray;
79 alias NSCellAttribute.NSChangeBackgroundCell NSChangeBackgroundCell;
80 alias NSCellAttribute.NSCellLightsByBackground NSCellLightsByBackground;
81 alias NSCellAttribute.NSCellIsBordered NSCellIsBordered;
82 alias NSCellAttribute.NSCellHasOverlappingImage NSCellHasOverlappingImage;
83 alias NSCellAttribute.NSCellHasImageHorizontal NSCellHasImageHorizontal;
84 alias NSCellAttribute.NSCellHasImageOnLeftOrBottom NSCellHasImageOnLeftOrBottom;
85 alias NSCellAttribute.NSCellChangesContents NSCellChangesContents;
86 alias NSCellAttribute.NSCellIsInsetButton NSCellIsInsetButton;
87 alias NSCellAttribute.NSCellAllowsMixedState NSCellAllowsMixedState;
88
89 enum NSControlTint : NSUInteger
90 {
91 NSDefaultControlTint = 0,
92 NSBlueControlTint = 1,
93 NSGraphiteControlTint = 6,
94 NSClearControlTint = 7
95 }
96
97 alias NSControlTint.NSDefaultControlTint NSDefaultControlTint;
98 alias NSControlTint.NSBlueControlTint NSBlueControlTint;
99 alias NSControlTint.NSGraphiteControlTint NSGraphiteControlTint;
100 alias NSControlTint.NSClearControlTint NSClearControlTint;
101
102 public class NSCell : NSObject
103 {
104
105 public this ()
106 {
107 super();
108 }
109
110 public this (objc.id id)
111 {
112 super(id);
113 }
114
115 public bool acceptsFirstResponder ()
116 {
117 return OS.objc_msgSend(this.id, OS.sel_acceptsFirstResponder) !is null;
118 }
119
120 public objc.SEL action ()
121 {
122 return OS.objc_msgSend(this.id, OS.sel_action);
123 }
124
125 public objc.id alignment ()
126 {
127 return OS.objc_msgSend(this.id, OS.sel_alignment);
128 }
129
130 public bool allowsEditingTextAttributes ()
131 {
132 return OS.objc_msgSend(this.id, OS.sel_allowsEditingTextAttributes) !is null;
133 }
134
135 public bool allowsMixedState ()
136 {
137 return OS.objc_msgSend(this.id, OS.sel_allowsMixedState) !is null;
138 }
139
140 public bool allowsUndo ()
141 {
142 return OS.objc_msgSend(this.id, OS.sel_allowsUndo) !is null;
143 }
144
145 public NSAttributedString attributedStringValue ()
146 {
147 objc.id result = OS.objc_msgSend(this.id, OS.sel_attributedStringValue);
148 return result !is null ? new NSAttributedString(result) : null;
149 }
150
151 public objc.id backgroundStyle ()
152 {
153 return OS.objc_msgSend(this.id, OS.sel_backgroundStyle);
154 }
155
156 public objc.id baseWritingDirection ()
157 {
158 return OS.objc_msgSend(this.id, OS.sel_baseWritingDirection);
159 }
160
161 public void calcDrawInfo (NSRect aRect)
162 {
163 OS.objc_msgSend(this.id, OS.sel_calcDrawInfo_1, aRect);
164 }
165
166 public NSInteger cellAttribute (objc.id aParameter)
167 {
168 return OS.objc_msgSend(this.id, OS.sel_cellAttribute_1, aParameter);
169 }
170
171 public NSSize cellSize ()
172 {
173 NSSize result;
174 OS.objc_msgSend_struct(result, this.id, OS.sel_cellSize);
175 return result;
176 }
177
178 public NSSize cellSizeForBounds (NSRect aRect)
179 {
180 NSSize result;
181 OS.objc_msgSend_stret(result, this.id, OS.sel_cellSizeForBounds_1, aRect);
182 return result;
183 }
184
185 public objc.id compare (id otherCell)
186 {
187 return OS.objc_msgSend(this.id, OS.sel_compare_1, otherCell !is null ? otherCell.id : null);
188 }
189
190 public bool continueTracking (NSPoint lastPoint, NSPoint currentPoint, NSView controlView)
191 {
192 return OS.objc_msgSend(this.id, OS.sel_continueTracking_1at_1inView_1, lastPoint, currentPoint, controlView !is null ? controlView.id : null) !is null;
193 }
194
195 public objc.id controlSize ()
196 {
197 return OS.objc_msgSend(this.id, OS.sel_controlSize);
198 }
199
200 public objc.id controlTint ()
201 {
202 return OS.objc_msgSend(this.id, OS.sel_controlTint);
203 }
204
205 public NSView controlView ()
206 {
207 objc.id result = OS.objc_msgSend(this.id, OS.sel_controlView);
208 return result !is null ? new NSView(result) : null;
209 }
210
211 public static objc.id defaultFocusRingType ()
212 {
213 return OS.objc_msgSend(OS.class_NSCell, OS.sel_defaultFocusRingType);
214 }
215
216 public static NSMenu defaultMenu ()
217 {
218 objc.id result = OS.objc_msgSend(OS.class_NSCell, OS.sel_defaultMenu);
219 return result !is null ? new NSMenu(result) : null;
220 }
221
222 public double doubleValue ()
223 {
224 return OS.objc_msgSend_fpret(this.id, OS.sel_doubleValue);
225 }
226
227 public void drawInteriorWithFrame (NSRect cellFrame, NSView controlView)
228 {
229 OS.objc_msgSend(this.id, OS.sel_drawInteriorWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id : null);
230 }
231
232 public void drawWithExpansionFrame (NSRect cellFrame, NSView view)
233 {
234 OS.objc_msgSend(this.id, OS.sel_drawWithExpansionFrame_1inView_1, cellFrame, view !is null ? view.id : null);
235 }
236
237 public void drawWithFrame (NSRect cellFrame, NSView controlView)
238 {
239 OS.objc_msgSend(this.id, OS.sel_drawWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id : null);
240 }
241
242 public NSRect drawingRectForBounds (NSRect theRect)
243 {
244 NSRect result;
245 OS.objc_msgSend_stret(result, this.id, OS.sel_drawingRectForBounds_1, theRect);
246 return result;
247 }
248
249 public void editWithFrame (NSRect aRect, NSView controlView, NSText textObj, id anObject, NSEvent theEvent)
250 {
251 OS.objc_msgSend(this.id, OS.sel_editWithFrame_1inView_1editor_1delegate_1event_1, aRect, controlView !is null ? controlView.id : null,
252 textObj !is null ? textObj.id : null, anObject !is null ? anObject.id : null, theEvent !is null ? theEvent.id : null);
253 }
254
255 public void endEditing (NSText textObj)
256 {
257 OS.objc_msgSend(this.id, OS.sel_endEditing_1, textObj !is null ? textObj.id : null);
258 }
259
260 public NSInteger entryType ()
261 {
262 return OS.objc_msgSend(this.id, OS.sel_entryType);
263 }
264
265 public NSRect expansionFrameWithFrame (NSRect cellFrame, NSView view)
266 {
267 NSRect result;
268 OS.objc_msgSend_stret(result, this.id, OS.sel_expansionFrameWithFrame_1inView_1, cellFrame, view !is null ? view.id : null);
269 return result;
270 }
271
272 public float floatValue ()
273 {
274 return cast(float) OS.objc_msgSend_fpret(this.id, OS.sel_floatValue);
275 }
276
277 public objc.id focusRingType ()
278 {
279 return OS.objc_msgSend(this.id, OS.sel_focusRingType);
280 }
281
282 public NSFont font ()
283 {
284 objc.id result = OS.objc_msgSend(this.id, OS.sel_font);
285 return result !is null ? new NSFont(result) : null;
286 }
287
288 public id formatter ()
289 {
290 objc.id result = OS.objc_msgSend(this.id, OS.sel_formatter);
291 return result !is null ? new id(result) : null;
292 }
293
294 public void getPeriodicDelay (float* delay, float* interval)
295 {
296 OS.objc_msgSend(this.id, OS.sel_getPeriodicDelay_1interval_1, delay, interval);
297 }
298
299 public bool hasValidObjectValue ()
300 {
301 return OS.objc_msgSend(this.id, OS.sel_hasValidObjectValue) !is null;
302 }
303
304 public void highlight (bool flag, NSRect cellFrame, NSView controlView)
305 {
306 OS.objc_msgSend(this.id, OS.sel_highlight_1withFrame_1inView_1, flag, cellFrame, controlView !is null ? controlView.id : null);
307 }
308
309 public NSColor highlightColorWithFrame (NSRect cellFrame, NSView controlView)
310 {
311 objc.id result = OS.objc_msgSend(this.id, OS.sel_highlightColorWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id : null);
312 return result !is null ? new NSColor(result) : null;
313 }
314
315 public NSUInteger hitTestForEvent (NSEvent event, NSRect cellFrame, NSView controlView)
316 {
317 return OS.objc_msgSend(this.id, OS.sel_hitTestForEvent_1inRect_1ofView_1, event !is null ? event.id : null, cellFrame,
318 controlView !is null ? controlView.id : null);
319 }
320
321 public NSImage image ()
322 {
323 objc.id result = OS.objc_msgSend(this.id, OS.sel_image);
324 return result !is null ? new NSImage(result) : null;
325 }
326
327 public NSRect imageRectForBounds (NSRect theRect)
328 {
329 NSRect result;
330 OS.objc_msgSend_stret(result, this.id, OS.sel_imageRectForBounds_1, theRect);
331 return result;
332 }
333
334 public bool importsGraphics ()
335 {
336 return OS.objc_msgSend(this.id, OS.sel_importsGraphics) !is null;
337 }
338
339 public NSCell initImageCell (NSImage image)
340 {
341 objc.id result = OS.objc_msgSend(this.id, OS.sel_initImageCell_1, image !is null ? image.id : null);
342 return result !is null ? this : null;
343 }
344
345 public NSCell initTextCell (NSString aString)
346 {
347 objc.id result = OS.objc_msgSend(this.id, OS.sel_initTextCell_1, aString !is null ? aString.id : null);
348 return result !is null ? this : null;
349 }
350
351 public int intValue ()
352 {
353 return OS.objc_msgSend(this.id, OS.sel_intValue);
354 }
355
356 public int integerValue ()
357 {
358 return OS.objc_msgSend(this.id, OS.sel_integerValue);
359 }
360
361 public objc.id interiorBackgroundStyle ()
362 {
363 return OS.objc_msgSend(this.id, OS.sel_interiorBackgroundStyle);
364 }
365
366 public bool isBezeled ()
367 {
368 return OS.objc_msgSend(this.id, OS.sel_isBezeled) !is null;
369 }
370
371 public bool isBordered ()
372 {
373 return OS.objc_msgSend(this.id, OS.sel_isBordered) !is null;
374 }
375
376 public bool isContinuous ()
377 {
378 return OS.objc_msgSend(this.id, OS.sel_isContinuous) !is null;
379 }
380
381 public bool isEditable ()
382 {
383 return OS.objc_msgSend(this.id, OS.sel_isEditable) !is null;
384 }
385
386 public bool isEnabled ()
387 {
388 return OS.objc_msgSend(this.id, OS.sel_isEnabled) !is null;
389 }
390
391 public bool isEntryAcceptable (NSString aString)
392 {
393 return OS.objc_msgSend(this.id, OS.sel_isEntryAcceptable_1, aString !is null ? aString.id : null) !is null;
394 }
395
396 public bool isHighlighted ()
397 {
398 return OS.objc_msgSend(this.id, OS.sel_isHighlighted) !is null;
399 }
400
401 public bool isOpaque ()
402 {
403 return OS.objc_msgSend(this.id, OS.sel_isOpaque) !is null;
404 }
405
406 public bool isScrollable ()
407 {
408 return OS.objc_msgSend(this.id, OS.sel_isScrollable) !is null;
409 }
410
411 public bool isSelectable ()
412 {
413 return OS.objc_msgSend(this.id, OS.sel_isSelectable) !is null;
414 }
415
416 public NSString keyEquivalent ()
417 {
418 objc.id result = OS.objc_msgSend(this.id, OS.sel_keyEquivalent);
419 return result !is null ? new NSString(result) : null;
420 }
421
422 public objc.id lineBreakMode ()
423 {
424 return OS.objc_msgSend(this.id, OS.sel_lineBreakMode);
425 }
426
427 public NSMenu menu ()
428 {
429 objc.id result = OS.objc_msgSend(this.id, OS.sel_menu);
430 return result !is null ? new NSMenu(result) : null;
431 }
432
433 public NSMenu menuForEvent (NSEvent event, NSRect cellFrame, NSView view)
434 {
435 objc.id result = OS.objc_msgSend(this.id, OS.sel_menuForEvent_1inRect_1ofView_1, event !is null ? event.id : null, cellFrame,
436 view !is null ? view.id : null);
437 return result !is null ? new NSMenu(result) : null;
438 }
439
440 public NSString mnemonic ()
441 {
442 objc.id result = OS.objc_msgSend(this.id, OS.sel_mnemonic);
443 return result !is null ? new NSString(result) : null;
444 }
445
446 public NSUInteger mnemonicLocation ()
447 {
448 return OS.objc_msgSend(this.id, OS.sel_mnemonicLocation);
449 }
450
451 public NSInteger mouseDownFlags ()
452 {
453 return OS.objc_msgSend(this.id, OS.sel_mouseDownFlags);
454 }
455
456 public NSInteger nextState ()
457 {
458 return OS.objc_msgSend(this.id, OS.sel_nextState);
459 }
460
461 public id objectValue ()
462 {
463 objc.id result = OS.objc_msgSend(this.id, OS.sel_objectValue);
464 return result !is null ? new id(result) : null;
465 }
466
467 public void performClick (id sender)
468 {
469 OS.objc_msgSend(this.id, OS.sel_performClick_1, sender !is null ? sender.id : null);
470 }
471
472 public static bool prefersTrackingUntilMouseUp ()
473 {
474 return OS.objc_msgSend(OS.class_NSCell, OS.sel_prefersTrackingUntilMouseUp) !is null;
475 }
476
477 public bool refusesFirstResponder ()
478 {
479 return OS.objc_msgSend(this.id, OS.sel_refusesFirstResponder) !is null;
480 }
481
482 public id representedObject ()
483 {
484 objc.id result = OS.objc_msgSend(this.id, OS.sel_representedObject);
485 return result !is null ? new id(result) : null;
486 }
487
488 public void resetCursorRect (NSRect cellFrame, NSView controlView)
489 {
490 OS.objc_msgSend(this.id, OS.sel_resetCursorRect_1inView_1, cellFrame, controlView !is null ? controlView.id : null);
491 }
492
493 public void selectWithFrame (NSRect aRect, NSView controlView, NSText textObj, id anObject, NSInteger selStart, NSInteger selLength)
494 {
495 OS.objc_msgSend(this.id, OS.sel_selectWithFrame_1inView_1editor_1delegate_1start_1length_1, aRect,
496 controlView !is null ? controlView.id : null, textObj !is null ? textObj.id : null, anObject !is null ? anObject.id : null, selStart,
497 selLength);
498 }
499
500 public NSInteger sendActionOn (NSInteger mask)
501 {
502 return OS.objc_msgSend(this.id, OS.sel_sendActionOn_1, mask);
503 }
504
505 public bool sendsActionOnEndEditing ()
506 {
507 return OS.objc_msgSend(this.id, OS.sel_sendsActionOnEndEditing) !is null;
508 }
509
510 public void setAction (objc.SEL aSelector)
511 {
512 OS.objc_msgSend(this.id, OS.sel_setAction_1, aSelector);
513 }
514
515 public void setAlignment (objc.id mode)
516 {
517 OS.objc_msgSend(this.id, OS.sel_setAlignment_1, mode);
518 }
519
520 public void setAllowsEditingTextAttributes (bool flag)
521 {
522 OS.objc_msgSend(this.id, OS.sel_setAllowsEditingTextAttributes_1, flag);
523 }
524
525 public void setAllowsMixedState (bool flag)
526 {
527 OS.objc_msgSend(this.id, OS.sel_setAllowsMixedState_1, flag);
528 }
529
530 public void setAllowsUndo (bool allowsUndo)
531 {
532 OS.objc_msgSend(this.id, OS.sel_setAllowsUndo_1, allowsUndo);
533 }
534
535 public void setAttributedStringValue (NSAttributedString obj)
536 {
537 OS.objc_msgSend(this.id, OS.sel_setAttributedStringValue_1, obj !is null ? obj.id : null);
538 }
539
540 public void setBackgroundStyle (objc.id style)
541 {
542 OS.objc_msgSend(this.id, OS.sel_setBackgroundStyle_1, style);
543 }
544
545 public void setBaseWritingDirection (objc.id writingDirection)
546 {
547 OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_1, writingDirection);
548 }
549
550 public void setBezeled (bool flag)
551 {
552 OS.objc_msgSend(this.id, OS.sel_setBezeled_1, flag);
553 }
554
555 public void setBordered (bool flag)
556 {
557 OS.objc_msgSend(this.id, OS.sel_setBordered_1, flag);
558 }
559
560 public void setCellAttribute (NSCellAttribute aParameter, NSInteger value)
561 {
562 OS.objc_msgSend(this.id, OS.sel_setCellAttribute_1to_1, aParameter, value);
563 }
564
565 public void setContinuous (bool flag)
566 {
567 OS.objc_msgSend(this.id, OS.sel_setContinuous_1, flag);
568 }
569
570 public void setControlSize (objc.id size)
571 {
572 OS.objc_msgSend(this.id, OS.sel_setControlSize_1, size);
573 }
574
575 public void setControlTint (objc.id controlTint)
576 {
577 OS.objc_msgSend(this.id, OS.sel_setControlTint_1, controlTint);
578 }
579
580 public void setControlView (NSView view)
581 {
582 OS.objc_msgSend(this.id, OS.sel_setControlView_1, view !is null ? view.id : null);
583 }
584
585 public void setDoubleValue (double aDouble)
586 {
587 OS.objc_msgSend(this.id, OS.sel_setDoubleValue_1, aDouble);
588 }
589
590 public void setEditable (bool flag)
591 {
592 OS.objc_msgSend(this.id, OS.sel_setEditable_1, flag);
593 }
594
595 public void setEnabled (bool flag)
596 {
597 OS.objc_msgSend(this.id, OS.sel_setEnabled_1, flag);
598 }
599
600 public void setEntryType (NSInteger aType)
601 {
602 OS.objc_msgSend(this.id, OS.sel_setEntryType_1, aType);
603 }
604
605 public void setFloatValue (float aFloat)
606 {
607 OS.objc_msgSend(this.id, OS.sel_setFloatValue_1, aFloat);
608 }
609
610 public void setFloatingPointFormat (bool autoRange, NSUInteger leftDigits, NSUInteger rightDigits)
611 {
612 OS.objc_msgSend(this.id, OS.sel_setFloatingPointFormat_1left_1right_1, autoRange, leftDigits, rightDigits);
613 }
614
615 public void setFocusRingType (objc.id focusRingType)
616 {
617 OS.objc_msgSend(this.id, OS.sel_setFocusRingType_1, focusRingType);
618 }
619
620 public void setFont (NSFont fontObj)
621 {
622 OS.objc_msgSend(this.id, OS.sel_setFont_1, fontObj !is null ? fontObj.id : null);
623 }
624
625 public void setFormatter (NSFormatter newFormatter)
626 {
627 OS.objc_msgSend(this.id, OS.sel_setFormatter_1, newFormatter !is null ? newFormatter.id : null);
628 }
629
630 public void setHighlighted (bool flag)
631 {
632 OS.objc_msgSend(this.id, OS.sel_setHighlighted_1, flag);
633 }
634
635 public void setImage (NSImage image)
636 {
637 OS.objc_msgSend(this.id, OS.sel_setImage_1, image !is null ? image.id : null);
638 }
639
640 public void setImportsGraphics (bool flag)
641 {
642 OS.objc_msgSend(this.id, OS.sel_setImportsGraphics_1, flag);
643 }
644
645 public void setIntValue (int anInt)
646 {
647 OS.objc_msgSend(this.id, OS.sel_setIntValue_1, anInt);
648 }
649
650 public void setIntegerValue (int anInteger)
651 {
652 OS.objc_msgSend(this.id, OS.sel_setIntegerValue_1, anInteger);
653 }
654
655 public void setLineBreakMode (objc.id mode)
656 {
657 OS.objc_msgSend(this.id, OS.sel_setLineBreakMode_1, mode);
658 }
659
660 public void setMenu (NSMenu aMenu)
661 {
662 OS.objc_msgSend(this.id, OS.sel_setMenu_1, aMenu !is null ? aMenu.id : null);
663 }
664
665 public void setMnemonicLocation (NSUInteger location)
666 {
667 OS.objc_msgSend(this.id, OS.sel_setMnemonicLocation_1, location);
668 }
669
670 public void setNextState ()
671 {
672 OS.objc_msgSend(this.id, OS.sel_setNextState);
673 }
674
675 public void setObjectValue (id obj)
676 {
677 OS.objc_msgSend(this.id, OS.sel_setObjectValue_1, obj !is null ? obj.id : null);
678 }
679
680 public void setRefusesFirstResponder (bool flag)
681 {
682 OS.objc_msgSend(this.id, OS.sel_setRefusesFirstResponder_1, flag);
683 }
684
685 public void setRepresentedObject (id anObject)
686 {
687 OS.objc_msgSend(this.id, OS.sel_setRepresentedObject_1, anObject !is null ? anObject.id : null);
688 }
689
690 public void setScrollable (bool flag)
691 {
692 OS.objc_msgSend(this.id, OS.sel_setScrollable_1, flag);
693 }
694
695 public void setSelectable (bool flag)
696 {
697 OS.objc_msgSend(this.id, OS.sel_setSelectable_1, flag);
698 }
699
700 public void setSendsActionOnEndEditing (bool flag)
701 {
702 OS.objc_msgSend(this.id, OS.sel_setSendsActionOnEndEditing_1, flag);
703 }
704
705 public void setShowsFirstResponder (bool showFR)
706 {
707 OS.objc_msgSend(this.id, OS.sel_setShowsFirstResponder_1, showFR);
708 }
709
710 public void setState (NSInteger value)
711 {
712 OS.objc_msgSend(this.id, OS.sel_setState_1, value);
713 }
714
715 public void setStringValue (NSString aString)
716 {
717 OS.objc_msgSend(this.id, OS.sel_setStringValue_1, aString !is null ? aString.id : null);
718 }
719
720 public void setTag (NSInteger anInt)
721 {
722 OS.objc_msgSend(this.id, OS.sel_setTag_1, anInt);
723 }
724
725 public void setTarget (id anObject)
726 {
727 OS.objc_msgSend(this.id, OS.sel_setTarget_1, anObject !is null ? anObject.id : null);
728 }
729
730 public void setTitle (NSString aString)
731 {
732 OS.objc_msgSend(this.id, OS.sel_setTitle_1, aString !is null ? aString.id : null);
733 }
734
735 public void setTitleWithMnemonic (NSString StringWithAmpersand)
736 {
737 OS.objc_msgSend(this.id, OS.sel_setTitleWithMnemonic_1, StringWithAmpersand !is null ? StringWithAmpersand.id : null);
738 }
739
740 public void setTruncatesLastVisibleLine (bool flag)
741 {
742 OS.objc_msgSend(this.id, OS.sel_setTruncatesLastVisibleLine_1, flag);
743 }
744
745 public void setType (objc.id aType)
746 {
747 OS.objc_msgSend(this.id, OS.sel_setType_1, aType);
748 }
749
750 public NSText setUpFieldEditorAttributes (NSText textObj)
751 {
752 objc.id result = OS.objc_msgSend(this.id, OS.sel_setUpFieldEditorAttributes_1, textObj !is null ? textObj.id : null);
753 return result !is null ? new NSText(result) : null;
754 }
755
756 public void setWraps (bool flag)
757 {
758 OS.objc_msgSend(this.id, OS.sel_setWraps_1, flag);
759 }
760
761 public bool showsFirstResponder ()
762 {
763 return OS.objc_msgSend(this.id, OS.sel_showsFirstResponder) !is null;
764 }
765
766 public bool startTrackingAt (NSPoint startPoint, NSView controlView)
767 {
768 return OS.objc_msgSend(this.id, OS.sel_startTrackingAt_1inView_1, startPoint, controlView !is null ? controlView.id : null) !is null;
769 }
770
771 public NSInteger state ()
772 {
773 return OS.objc_msgSend(this.id, OS.sel_state);
774 }
775
776 public void stopTracking (NSPoint lastPoint, NSPoint stopPoint, NSView controlView, bool flag)
777 {
778 OS.objc_msgSend(this.id, OS.sel_stopTracking_1at_1inView_1mouseIsUp_1, lastPoint, stopPoint, controlView !is null ? controlView.id : null,
779 flag);
780 }
781
782 public NSString StringValue ()
783 {
784 objc.id result = OS.objc_msgSend(this.id, OS.sel_StringValue);
785 return result !is null ? new NSString(result) : null;
786 }
787
788 public NSInteger tag ()
789 {
790 return OS.objc_msgSend(this.id, OS.sel_tag);
791 }
792
793 public void takeDoubleValueFrom (id sender)
794 {
795 OS.objc_msgSend(this.id, OS.sel_takeDoubleValueFrom_1, sender !is null ? sender.id : null);
796 }
797
798 public void takeFloatValueFrom (id sender)
799 {
800 OS.objc_msgSend(this.id, OS.sel_takeFloatValueFrom_1, sender !is null ? sender.id : null);
801 }
802
803 public void takeIntValueFrom (id sender)
804 {
805 OS.objc_msgSend(this.id, OS.sel_takeIntValueFrom_1, sender !is null ? sender.id : null);
806 }
807
808 public void takeIntegerValueFrom (id sender)
809 {
810 OS.objc_msgSend(this.id, OS.sel_takeIntegerValueFrom_1, sender !is null ? sender.id : null);
811 }
812
813 public void takeObjectValueFrom (id sender)
814 {
815 OS.objc_msgSend(this.id, OS.sel_takeObjectValueFrom_1, sender !is null ? sender.id : null);
816 }
817
818 public void takeStringValueFrom (id sender)
819 {
820 OS.objc_msgSend(this.id, OS.sel_takeStringValueFrom_1, sender !is null ? sender.id : null);
821 }
822
823 public id target ()
824 {
825 objc.id result = OS.objc_msgSend(this.id, OS.sel_target);
826 return result !is null ? new id(result) : null;
827 }
828
829 public NSString title ()
830 {
831 objc.id result = OS.objc_msgSend(this.id, OS.sel_title);
832 return result !is null ? new NSString(result) : null;
833 }
834
835 public NSRect titleRectForBounds (NSRect theRect)
836 {
837 NSRect result;
838 OS.objc_msgSend_stret(result, this.id, OS.sel_titleRectForBounds_1, theRect);
839 return result;
840 }
841
842 public bool trackMouse (NSEvent theEvent, NSRect cellFrame, NSView controlView, bool flag)
843 {
844 return OS.objc_msgSend(this.id, OS.sel_trackMouse_1inRect_1ofView_1untilMouseUp_1, theEvent !is null ? theEvent.id : null, cellFrame,
845 controlView !is null ? controlView.id : null, flag) !is null;
846 }
847
848 public bool truncatesLastVisibleLine ()
849 {
850 return OS.objc_msgSend(this.id, OS.sel_truncatesLastVisibleLine) !is null;
851 }
852
853 public objc.id type ()
854 {
855 return OS.objc_msgSend(this.id, OS.sel_type);
856 }
857
858 public bool wantsNotificationForMarkedText ()
859 {
860 return OS.objc_msgSend(this.id, OS.sel_wantsNotificationForMarkedText) !is null;
861 }
862
863 public bool wraps ()
864 {
865 return OS.objc_msgSend(this.id, OS.sel_wraps) !is null;
866 }
867
868 }