comparison dwt/internal/cocoa/NSTableView.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.NSTableView;
15
16 import dwt.internal.cocoa.CGFloat;
17 import dwt.internal.cocoa.id;
18 import dwt.internal.cocoa.NSArray;
19 import dwt.internal.cocoa.NSCell;
20 import dwt.internal.cocoa.NSColor;
21 import dwt.internal.cocoa.NSControl;
22 import dwt.internal.cocoa.NSDragOperation;
23 import dwt.internal.cocoa.NSEnumerator;
24 import dwt.internal.cocoa.NSEvent;
25 import dwt.internal.cocoa.NSImage;
26 import dwt.internal.cocoa.NSIndexSet;
27 import dwt.internal.cocoa.NSInteger;
28 import dwt.internal.cocoa.NSNotification;
29 import dwt.internal.cocoa.NSPoint;
30 import dwt.internal.cocoa.NSRange;
31 import dwt.internal.cocoa.NSRect;
32 import dwt.internal.cocoa.NSSize;
33 import dwt.internal.cocoa.NSString;
34 import dwt.internal.cocoa.NSTableColumn;
35 import dwt.internal.cocoa.NSTableHeaderView;
36 import dwt.internal.cocoa.NSText;
37 import dwt.internal.cocoa.NSView;
38 import dwt.internal.cocoa.OS;
39 import objc = dwt.internal.objc.runtime;
40
41 enum NSTableViewColumnAutoresizingStyle : NSUInteger
42 {
43 NSTableViewNoColumnAutoresizing = 0,
44 NSTableViewUniformColumnAutoresizingStyle,
45 NSTableViewSequentialColumnAutoresizingStyle,
46 NSTableViewReverseSequentialColumnAutoresizingStyle,
47 NSTableViewLastColumnOnlyAutoresizingStyle,
48 NSTableViewFirstColumnOnlyAutoresizingStyle
49 }
50
51 alias NSTableViewColumnAutoresizingStyle.NSTableViewNoColumnAutoresizing NSTableViewNoColumnAutoresizing;
52 alias NSTableViewColumnAutoresizingStyle.NSTableViewUniformColumnAutoresizingStyle NSTableViewUniformColumnAutoresizingStyle;
53 alias NSTableViewColumnAutoresizingStyle.NSTableViewSequentialColumnAutoresizingStyle NSTableViewSequentialColumnAutoresizingStyle;
54 alias NSTableViewColumnAutoresizingStyle.NSTableViewReverseSequentialColumnAutoresizingStyle NSTableViewReverseSequentialColumnAutoresizingStyle;
55 alias NSTableViewColumnAutoresizingStyle.NSTableViewLastColumnOnlyAutoresizingStyle NSTableViewLastColumnOnlyAutoresizingStyle;
56 alias NSTableViewColumnAutoresizingStyle.NSTableViewFirstColumnOnlyAutoresizingStyle NSTableViewFirstColumnOnlyAutoresizingStyle;
57
58 enum NSTableViewSelectionHighlightStyle : NSInteger
59 {
60 NSTableViewSelectionHighlightStyleRegular = 0,
61 NSTableViewSelectionHighlightStyleSourceList = 1,
62 }
63
64 alias NSTableViewSelectionHighlightStyle.NSTableViewSelectionHighlightStyleRegular NSTableViewSelectionHighlightStyleRegular;
65 alias NSTableViewSelectionHighlightStyle.NSTableViewSelectionHighlightStyleSourceList NSTableViewSelectionHighlightStyleSourceList;
66
67 enum NSTableViewDropOperation : NSUInteger
68 {
69 NSTableViewDropOn,
70 NSTableViewDropAbove
71 }
72
73 alias NSTableViewDropOperation.NSTableViewDropOn NSTableViewDropOn;
74 alias NSTableViewDropOperation.NSTableViewDropAbove NSTableViewDropAbove;
75
76 public class NSTableView : NSControl
77 {
78
79 public this ()
80 {
81 super();
82 }
83
84 public this (objc.id id)
85 {
86 super(id);
87 }
88
89 public void addTableColumn (NSTableColumn column)
90 {
91 OS.objc_msgSend(this.id, OS.sel_addTableColumn_1, column !is null ? column.id : null);
92 }
93
94 public bool allowsColumnReordering ()
95 {
96 return OS.objc_msgSend(this.id, OS.sel_allowsColumnReordering) !is null;
97 }
98
99 public bool allowsColumnResizing ()
100 {
101 return OS.objc_msgSend(this.id, OS.sel_allowsColumnResizing) !is null;
102 }
103
104 public bool allowsColumnSelection ()
105 {
106 return OS.objc_msgSend(this.id, OS.sel_allowsColumnSelection) !is null;
107 }
108
109 public bool allowsEmptySelection ()
110 {
111 return OS.objc_msgSend(this.id, OS.sel_allowsEmptySelection) !is null;
112 }
113
114 public bool allowsMultipleSelection ()
115 {
116 return OS.objc_msgSend(this.id, OS.sel_allowsMultipleSelection) !is null;
117 }
118
119 public bool allowsTypeSelect ()
120 {
121 return OS.objc_msgSend(this.id, OS.sel_allowsTypeSelect) !is null;
122 }
123
124 public bool autoresizesAllColumnsToFit ()
125 {
126 return OS.objc_msgSend(this.id, OS.sel_autoresizesAllColumnsToFit) !is null;
127 }
128
129 public NSString autosaveName ()
130 {
131 objc.id result = OS.objc_msgSend(this.id, OS.sel_autosaveName);
132 return result !is null ? new NSString(result) : null;
133 }
134
135 public bool autosaveTableColumns ()
136 {
137 return OS.objc_msgSend(this.id, OS.sel_autosaveTableColumns) !is null;
138 }
139
140 public NSColor backgroundColor ()
141 {
142 objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor);
143 return result !is null ? new NSColor(result) : null;
144 }
145
146 public bool canDragRowsWithIndexes (NSIndexSet rowIndexes, NSPoint mouseDownPoint)
147 {
148 return OS.objc_msgSend(this.id, OS.sel_canDragRowsWithIndexes_1atPoint_1, rowIndexes !is null ? rowIndexes.id : null, mouseDownPoint) !is null;
149 }
150
151 public NSInteger clickedColumn ()
152 {
153 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_clickedColumn);
154 }
155
156 public NSInteger clickedRow ()
157 {
158 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_clickedRow);
159 }
160
161 public NSTableViewColumnAutoresizingStyle columnAtPoint (NSPoint point)
162 {
163 return cast(NSTableViewColumnAutoresizingStyle) OS.objc_msgSend(this.id, OS.sel_columnAtPoint_1, point);
164 }
165
166 public NSInteger columnAutoresizingStyle ()
167 {
168 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_columnAutoresizingStyle);
169 }
170
171 public NSIndexSet columnIndexesInRect (NSRect rect)
172 {
173 objc.id result = OS.objc_msgSend(this.id, OS.sel_columnIndexesInRect_1, rect);
174 return result !is null ? new NSIndexSet(result) : null;
175 }
176
177 public NSInteger columnWithIdentifier (id identifier)
178 {
179 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_columnWithIdentifier_1, identifier !is null ? identifier.id : null);
180 }
181
182 public NSRange columnsInRect (NSRect rect)
183 {
184 NSRange result;
185 OS.objc_msgSend_stret(result, this.id, OS.sel_columnsInRect_1, rect);
186 return result;
187 }
188
189 public NSView cornerView ()
190 {
191 objc.id result = OS.objc_msgSend(this.id, OS.sel_cornerView);
192 return result !is null ? new NSView(result) : null;
193 }
194
195 public id dataSource ()
196 {
197 objc.id result = OS.objc_msgSend(this.id, OS.sel_dataSource);
198 return result !is null ? new id(result) : null;
199 }
200
201 public id delegatee ()
202 {
203 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate);
204 return result !is null ? new id(result) : null;
205 }
206
207 public void deselectAll (id sender)
208 {
209 OS.objc_msgSend(this.id, OS.sel_deselectAll_1, sender !is null ? sender.id : null);
210 }
211
212 public void deselectColumn (NSInteger column)
213 {
214 OS.objc_msgSend(this.id, OS.sel_deselectColumn_1, column);
215 }
216
217 public void deselectRow (NSInteger row)
218 {
219 OS.objc_msgSend(this.id, OS.sel_deselectRow_1, row);
220 }
221
222 public objc.SEL doubleAction ()
223 {
224 return cast(objc.SEL) OS.objc_msgSend(this.id, OS.sel_doubleAction);
225 }
226
227 public NSImage dragImageForRows (NSArray dragRows, NSEvent dragEvent, NSPointPointer dragImageOffset)
228 {
229 objc.id result = OS.objc_msgSend(this.id, OS.sel_dragImageForRows_1event_1dragImageOffset_1, dragRows !is null ? dragRows.id : null,
230 dragEvent !is null ? dragEvent.id : null, dragImageOffset);
231 return result !is null ? new NSImage(result) : null;
232 }
233
234 public NSImage dragImageForRowsWithIndexes (NSIndexSet dragRows, NSArray tableColumns, NSEvent dragEvent, NSPointPointer dragImageOffset)
235 {
236 objc.id result = OS.objc_msgSend(this.id, OS.sel_dragImageForRowsWithIndexes_1tableColumns_1event_1offset_1,
237 dragRows !is null ? dragRows.id : null, tableColumns !is null ? tableColumns.id : null, dragEvent !is null ? dragEvent.id : null,
238 dragImageOffset);
239 return result !is null ? new NSImage(result) : null;
240 }
241
242 public void drawBackgroundInClipRect (NSRect clipRect)
243 {
244 OS.objc_msgSend(this.id, OS.sel_drawBackgroundInClipRect_1, clipRect);
245 }
246
247 public void drawGridInClipRect (NSRect clipRect)
248 {
249 OS.objc_msgSend(this.id, OS.sel_drawGridInClipRect_1, clipRect);
250 }
251
252 public void drawRow (NSInteger row, NSRect clipRect)
253 {
254 OS.objc_msgSend(this.id, OS.sel_drawRow_1clipRect_1, row, clipRect);
255 }
256
257 public bool drawsGrid ()
258 {
259 return OS.objc_msgSend(this.id, OS.sel_drawsGrid) !is null;
260 }
261
262 public void editColumn (NSInteger column, NSInteger row, NSEvent theEvent, bool select)
263 {
264 OS.objc_msgSend(this.id, OS.sel_editColumn_1row_1withEvent_1select_1, column, row, theEvent !is null ? theEvent.id : null, select);
265 }
266
267 public NSInteger editedColumn ()
268 {
269 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_editedColumn);
270 }
271
272 public NSInteger editedRow ()
273 {
274 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_editedRow);
275 }
276
277 public NSRect frameOfCellAtColumn (NSInteger column, NSInteger row)
278 {
279 NSRect result;
280 OS.objc_msgSend_stret(result, this.id, OS.sel_frameOfCellAtColumn_1row_1, column, row);
281 return result;
282 }
283
284 public NSColor gridColor ()
285 {
286 objc.id result = OS.objc_msgSend(this.id, OS.sel_gridColor);
287 return result !is null ? new NSColor(result) : null;
288 }
289
290 public NSUInteger gridStyleMask ()
291 {
292 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_gridStyleMask);
293 }
294
295 public NSTableHeaderView headerView ()
296 {
297 objc.id result = OS.objc_msgSend(this.id, OS.sel_headerView);
298 return result !is null ? new NSTableHeaderView(result) : null;
299 }
300
301 public void highlightSelectionInClipRect (NSRect clipRect)
302 {
303 OS.objc_msgSend(this.id, OS.sel_highlightSelectionInClipRect_1, clipRect);
304 }
305
306 public NSTableColumn highlightedTableColumn ()
307 {
308 objc.id result = OS.objc_msgSend(this.id, OS.sel_highlightedTableColumn);
309 return result !is null ? new NSTableColumn(result) : null;
310 }
311
312 public NSImage indicatorImageInTableColumn (NSTableColumn tc)
313 {
314 objc.id result = OS.objc_msgSend(this.id, OS.sel_indicatorImageInTableColumn_1, tc !is null ? tc.id : null);
315 return result !is null ? new NSImage(result) : null;
316 }
317
318 public NSSize intercellSpacing ()
319 {
320 NSSize result;
321 OS.objc_msgSend_stret(result, this.id, OS.sel_intercellSpacing);
322 return result;
323 }
324
325 public bool isColumnSelected (NSInteger column)
326 {
327 return OS.objc_msgSend(this.id, OS.sel_isColumnSelected_1, column) !is null;
328 }
329
330 public bool isRowSelected (NSInteger row)
331 {
332 return OS.objc_msgSend(this.id, OS.sel_isRowSelected_1, row) !is null;
333 }
334
335 public void moveColumn (NSInteger column, NSInteger newIndex)
336 {
337 OS.objc_msgSend(this.id, OS.sel_moveColumn_1toColumn_1, column, newIndex);
338 }
339
340 public void noteHeightOfRowsWithIndexesChanged (NSIndexSet indexSet)
341 {
342 OS.objc_msgSend(this.id, OS.sel_noteHeightOfRowsWithIndexesChanged_1, indexSet !is null ? indexSet.id : null);
343 }
344
345 public void noteNumberOfRowsChanged ()
346 {
347 OS.objc_msgSend(this.id, OS.sel_noteNumberOfRowsChanged);
348 }
349
350 public NSInteger numberOfColumns ()
351 {
352 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfColumns);
353 }
354
355 public NSInteger numberOfRows ()
356 {
357 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfRows);
358 }
359
360 public NSInteger numberOfSelectedColumns ()
361 {
362 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfSelectedColumns);
363 }
364
365 public NSInteger numberOfSelectedRows ()
366 {
367 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfSelectedRows);
368 }
369
370 public NSCell preparedCellAtColumn (NSInteger column, NSInteger row)
371 {
372 objc.id result = OS.objc_msgSend(this.id, OS.sel_preparedCellAtColumn_1row_1, column, row);
373 return result !is null ? new NSCell(result) : null;
374 }
375
376 public NSRect rectOfColumn (NSInteger column)
377 {
378 NSRect result;
379 OS.objc_msgSend_stret(result, this.id, OS.sel_rectOfColumn_1, column);
380 return result;
381 }
382
383 public NSRect rectOfRow (NSInteger row)
384 {
385 NSRect result;
386 OS.objc_msgSend_stret(result, this.id, OS.sel_rectOfRow_1, row);
387 return result;
388 }
389
390 public void reloadData ()
391 {
392 OS.objc_msgSend(this.id, OS.sel_reloadData);
393 }
394
395 public void removeTableColumn (NSTableColumn column)
396 {
397 OS.objc_msgSend(this.id, OS.sel_removeTableColumn_1, column !is null ? column.id : null);
398 }
399
400 public NSInteger rowAtPoint (NSPoint point)
401 {
402 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_rowAtPoint_1, point);
403 }
404
405 public CGFloat rowHeight ()
406 {
407 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_rowHeight);
408 }
409
410 public NSRange rowsInRect (NSRect rect)
411 {
412 NSRange result;
413 OS.objc_msgSend_stret(result, this.id, OS.sel_rowsInRect_1, rect);
414 return result;
415 }
416
417 public void scrollColumnToVisible (NSInteger column)
418 {
419 OS.objc_msgSend(this.id, OS.sel_scrollColumnToVisible_1, column);
420 }
421
422 public void scrollRowToVisible (NSInteger row)
423 {
424 OS.objc_msgSend(this.id, OS.sel_scrollRowToVisible_1, row);
425 }
426
427 public void selectAll (id sender)
428 {
429 OS.objc_msgSend(this.id, OS.sel_selectAll_1, sender !is null ? sender.id : null);
430 }
431
432 public void selectColumn (NSInteger column, bool extend)
433 {
434 OS.objc_msgSend(this.id, OS.sel_selectColumn_1byExtendingSelection_1, column, extend);
435 }
436
437 public void selectColumnIndexes (NSIndexSet indexes, bool extend)
438 {
439 OS.objc_msgSend(this.id, OS.sel_selectColumnIndexes_1byExtendingSelection_1, indexes !is null ? indexes.id : null, extend);
440 }
441
442 public void selectRow (NSInteger row, bool extend)
443 {
444 OS.objc_msgSend(this.id, OS.sel_selectRow_1byExtendingSelection_1, row, extend);
445 }
446
447 public void selectRowIndexes (NSIndexSet indexes, bool extend)
448 {
449 OS.objc_msgSend(this.id, OS.sel_selectRowIndexes_1byExtendingSelection_1, indexes !is null ? indexes.id : null, extend);
450 }
451
452 public NSInteger selectedColumn ()
453 {
454 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_selectedColumn);
455 }
456
457 public NSEnumerator selectedColumnEnumerator ()
458 {
459 objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedColumnEnumerator);
460 return result !is null ? new NSEnumerator(result) : null;
461 }
462
463 public NSIndexSet selectedColumnIndexes ()
464 {
465 objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedColumnIndexes);
466 return result !is null ? new NSIndexSet(result) : null;
467 }
468
469 public NSInteger selectedRow ()
470 {
471 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_selectedRow);
472 }
473
474 public NSEnumerator selectedRowEnumerator ()
475 {
476 objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedRowEnumerator);
477 return result !is null ? new NSEnumerator(result) : null;
478 }
479
480 public NSIndexSet selectedRowIndexes ()
481 {
482 objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedRowIndexes);
483 return result !is null ? new NSIndexSet(result) : null;
484 }
485
486 public NSTableViewSelectionHighlightStyle selectionHighlightStyle ()
487 {
488 return cast(NSTableViewSelectionHighlightStyle) OS.objc_msgSend(this.id, OS.sel_selectionHighlightStyle);
489 }
490
491 public void setAllowsColumnReordering (bool flag)
492 {
493 OS.objc_msgSend(this.id, OS.sel_setAllowsColumnReordering_1, flag);
494 }
495
496 public void setAllowsColumnResizing (bool flag)
497 {
498 OS.objc_msgSend(this.id, OS.sel_setAllowsColumnResizing_1, flag);
499 }
500
501 public void setAllowsColumnSelection (bool flag)
502 {
503 OS.objc_msgSend(this.id, OS.sel_setAllowsColumnSelection_1, flag);
504 }
505
506 public void setAllowsEmptySelection (bool flag)
507 {
508 OS.objc_msgSend(this.id, OS.sel_setAllowsEmptySelection_1, flag);
509 }
510
511 public void setAllowsMultipleSelection (bool flag)
512 {
513 OS.objc_msgSend(this.id, OS.sel_setAllowsMultipleSelection_1, flag);
514 }
515
516 public void setAllowsTypeSelect (bool value)
517 {
518 OS.objc_msgSend(this.id, OS.sel_setAllowsTypeSelect_1, value);
519 }
520
521 public void setAutoresizesAllColumnsToFit (bool flag)
522 {
523 OS.objc_msgSend(this.id, OS.sel_setAutoresizesAllColumnsToFit_1, flag);
524 }
525
526 public void setAutosaveName (NSString name)
527 {
528 OS.objc_msgSend(this.id, OS.sel_setAutosaveName_1, name !is null ? name.id : null);
529 }
530
531 public void setAutosaveTableColumns (bool save)
532 {
533 OS.objc_msgSend(this.id, OS.sel_setAutosaveTableColumns_1, save);
534 }
535
536 public void setBackgroundColor (NSColor color)
537 {
538 OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null);
539 }
540
541 public void setColumnAutoresizingStyle (NSTableViewColumnAutoresizingStyle style)
542 {
543 OS.objc_msgSend(this.id, OS.sel_setColumnAutoresizingStyle_1, style);
544 }
545
546 public void setCornerView (NSView cornerView)
547 {
548 OS.objc_msgSend(this.id, OS.sel_setCornerView_1, cornerView !is null ? cornerView.id : null);
549 }
550
551 public void setDataSource (id aSource)
552 {
553 OS.objc_msgSend(this.id, OS.sel_setDataSource_1, aSource !is null ? aSource.id : null);
554 }
555
556 public void setDelegate (id delegatee)
557 {
558 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id : null);
559 }
560
561 public void setDoubleAction (objc.SEL aSelector)
562 {
563 OS.objc_msgSend(this.id, OS.sel_setDoubleAction_1, aSelector);
564 }
565
566 public void setDraggingSourceOperationMask (NSDragOperation mask, bool isLocal)
567 {
568 OS.objc_msgSend(this.id, OS.sel_setDraggingSourceOperationMask_1forLocal_1, mask, isLocal);
569 }
570
571 public void setDrawsGrid (bool flag)
572 {
573 OS.objc_msgSend(this.id, OS.sel_setDrawsGrid_1, flag);
574 }
575
576 public void setDropRow (NSInteger row, NSTableViewDropOperation op)
577 {
578 OS.objc_msgSend(this.id, OS.sel_setDropRow_1dropOperation_1, row, op);
579 }
580
581 public void setGridColor (NSColor color)
582 {
583 OS.objc_msgSend(this.id, OS.sel_setGridColor_1, color !is null ? color.id : null);
584 }
585
586 public void setGridStyleMask (NSUInteger gridType)
587 {
588 OS.objc_msgSend(this.id, OS.sel_setGridStyleMask_1, gridType);
589 }
590
591 public void setHeaderView (NSTableHeaderView headerView)
592 {
593 OS.objc_msgSend(this.id, OS.sel_setHeaderView_1, headerView !is null ? headerView.id : null);
594 }
595
596 public void setHighlightedTableColumn (NSTableColumn tc)
597 {
598 OS.objc_msgSend(this.id, OS.sel_setHighlightedTableColumn_1, tc !is null ? tc.id : null);
599 }
600
601 public void setIndicatorImage (NSImage anImage, NSTableColumn tc)
602 {
603 OS.objc_msgSend(this.id, OS.sel_setIndicatorImage_1inTableColumn_1, anImage !is null ? anImage.id : null, tc !is null ? tc.id : null);
604 }
605
606 public void setIntercellSpacing (NSSize aSize)
607 {
608 OS.objc_msgSend(this.id, OS.sel_setIntercellSpacing_1, aSize);
609 }
610
611 public void setRowHeight (CGFloat rowHeight)
612 {
613 OS.objc_msgSend(this.id, OS.sel_setRowHeight_1, rowHeight);
614 }
615
616 public void setSelectionHighlightStyle (NSTableViewSelectionHighlightStyle selectionHighlightStyle)
617 {
618 OS.objc_msgSend(this.id, OS.sel_setSelectionHighlightStyle_1, selectionHighlightStyle);
619 }
620
621 public void setSortDescriptors (NSArray array)
622 {
623 OS.objc_msgSend(this.id, OS.sel_setSortDescriptors_1, array !is null ? array.id : null);
624 }
625
626 public void setUsesAlternatingRowBackgroundColors (bool useAlternatingRowColors)
627 {
628 OS.objc_msgSend(this.id, OS.sel_setUsesAlternatingRowBackgroundColors_1, useAlternatingRowColors);
629 }
630
631 public void setVerticalMotionCanBeginDrag (bool flag)
632 {
633 OS.objc_msgSend(this.id, OS.sel_setVerticalMotionCanBeginDrag_1, flag);
634 }
635
636 public void sizeLastColumnToFit ()
637 {
638 OS.objc_msgSend(this.id, OS.sel_sizeLastColumnToFit);
639 }
640
641 public void sizeToFit ()
642 {
643 OS.objc_msgSend(this.id, OS.sel_sizeToFit);
644 }
645
646 public NSArray sortDescriptors ()
647 {
648 objc.id result = OS.objc_msgSend(this.id, OS.sel_sortDescriptors);
649 return result !is null ? new NSArray(result) : null;
650 }
651
652 public NSTableColumn tableColumnWithIdentifier (id identifier)
653 {
654 objc.id result = OS.objc_msgSend(this.id, OS.sel_tableColumnWithIdentifier_1, identifier !is null ? identifier.id : null);
655 return result !is null ? new NSTableColumn(result) : null;
656 }
657
658 public NSArray tableColumns ()
659 {
660 objc.id result = OS.objc_msgSend(this.id, OS.sel_tableColumns);
661 return result !is null ? new NSArray(result) : null;
662 }
663
664 public void textDidBeginEditing (NSNotification notification)
665 {
666 OS.objc_msgSend(this.id, OS.sel_textDidBeginEditing_1, notification !is null ? notification.id : null);
667 }
668
669 public void textDidChange (NSNotification notification)
670 {
671 OS.objc_msgSend(this.id, OS.sel_textDidChange_1, notification !is null ? notification.id : null);
672 }
673
674 public void textDidEndEditing (NSNotification notification)
675 {
676 OS.objc_msgSend(this.id, OS.sel_textDidEndEditing_1, notification !is null ? notification.id : null);
677 }
678
679 public bool textShouldBeginEditing (NSText textObject)
680 {
681 return OS.objc_msgSend(this.id, OS.sel_textShouldBeginEditing_1, textObject !is null ? textObject.id : null) !is null;
682 }
683
684 public bool textShouldEndEditing (NSText textObject)
685 {
686 return OS.objc_msgSend(this.id, OS.sel_textShouldEndEditing_1, textObject !is null ? textObject.id : null) !is null;
687 }
688
689 public void tile ()
690 {
691 OS.objc_msgSend(this.id, OS.sel_tile);
692 }
693
694 public bool usesAlternatingRowBackgroundColors ()
695 {
696 return OS.objc_msgSend(this.id, OS.sel_usesAlternatingRowBackgroundColors) !is null;
697 }
698
699 public bool verticalMotionCanBeginDrag ()
700 {
701 return OS.objc_msgSend(this.id, OS.sel_verticalMotionCanBeginDrag) !is null;
702 }
703
704 }