diff dstep/appkit/NSTableView.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents
children b9de51448c6b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/appkit/NSTableView.d	Sun Jan 03 22:06:11 2010 +0100
@@ -0,0 +1,870 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Sep 24, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.appkit.NSTableView;
+
+import dstep.appkit.AppKitDefines;
+import dstep.appkit.NSCell;
+import dstep.appkit.NSColor;
+import dstep.appkit.NSControl;
+import dstep.appkit.NSDragging;
+import dstep.appkit.NSEvent;
+import dstep.appkit.NSImage;
+import dstep.appkit.NSTableColumn;
+import dstep.appkit.NSTableHeaderView;
+import dstep.appkit.NSText;
+import dstep.appkit.NSUserInterfaceValidation;
+import dstep.appkit.NSView;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.foundation.NSArray;
+import dstep.foundation.NSGeometry;
+import dstep.foundation.NSIndexSet;
+import dstep.foundation.NSNotification;
+import dstep.foundation.NSObjCRuntime;
+import dstep.foundation.NSRange;
+import dstep.foundation.NSString;
+import dstep.objc.bridge.Bridge;
+import dstep.objc.objc;
+
+import bindings = dstep.appkit.NSTableView_bindings;
+
+typedef NSUInteger NSTableViewDropOperation;
+typedef NSUInteger NSTableViewColumnAutoresizingStyle;
+typedef NSInteger NSTableViewSelectionHighlightStyle;
+
+private
+{
+	NSString NSTableViewSelectionDidChangeNotification_;
+	NSString NSTableViewColumnDidMoveNotification_;
+	NSString NSTableViewColumnDidResizeNotification_;
+	NSString NSTableViewSelectionIsChangingNotification_;
+}
+
+NSString NSTableViewSelectionDidChangeNotification ()
+{
+	if (NSTableViewSelectionDidChangeNotification_)
+		return NSTableViewSelectionDidChangeNotification_;
+
+	return NSTableViewSelectionDidChangeNotification_ = new NSString(bindings.NSTableViewSelectionDidChangeNotification);
+}
+
+NSString NSTableViewColumnDidMoveNotification ()
+{
+	if (NSTableViewColumnDidMoveNotification_)
+		return NSTableViewColumnDidMoveNotification_;
+
+	return NSTableViewColumnDidMoveNotification_ = new NSString(bindings.NSTableViewColumnDidMoveNotification);
+}
+
+NSString NSTableViewColumnDidResizeNotification ()
+{
+	if (NSTableViewColumnDidResizeNotification_)
+		return NSTableViewColumnDidResizeNotification_;
+
+	return NSTableViewColumnDidResizeNotification_ = new NSString(bindings.NSTableViewColumnDidResizeNotification);
+}
+
+NSString NSTableViewSelectionIsChangingNotification ()
+{
+	if (NSTableViewSelectionIsChangingNotification_)
+		return NSTableViewSelectionIsChangingNotification_;
+
+	return NSTableViewSelectionIsChangingNotification_ = new NSString(bindings.NSTableViewSelectionIsChangingNotification);
+}
+
+enum : NSUInteger
+{
+	NSTableViewDropOn,
+	NSTableViewDropAbove
+}
+
+enum : NSUInteger
+{
+	NSTableViewNoColumnAutoresizing = 0,
+	NSTableViewUniformColumnAutoresizingStyle,
+	NSTableViewSequentialColumnAutoresizingStyle,
+	NSTableViewReverseSequentialColumnAutoresizingStyle,
+	NSTableViewLastColumnOnlyAutoresizingStyle,
+	NSTableViewFirstColumnOnlyAutoresizingStyle
+}
+
+enum
+{
+	NSTableViewGridNone = 0,
+	NSTableViewSolidVerticalGridLineMask = 1 << 0,
+	NSTableViewSolidHorizontalGridLineMask = 1 << 1
+}
+
+enum : NSInteger
+{
+	NSTableViewSelectionHighlightStyleRegular = 0,
+	NSTableViewSelectionHighlightStyleSourceList = 1
+}
+
+struct _TvFlags
+{
+	uint refusesFirstResponder;
+	uint movedPostingDisableCount;
+	uint selectionPostingDisableCount;
+	uint dataSourceSetObjectValue;
+	uint oldAutoresizesAllColumnsToFit;
+	uint delegateSelectionShouldChangeInTableView;
+	uint delegateShouldSelectTableColumn;
+	uint delegateShouldSelectRow;
+	uint delegateShouldEditTableColumn;
+	uint delegateWillDisplayCell;
+	uint compareWidthWithSuperview;
+	uint changingLayout;
+	uint selectionType;
+	uint allowsColumnSelection;
+	uint allowsMultipleSelection;
+	uint allowsEmptySelection;
+	uint oldDrawsGridFlag;
+	uint allowsColumnResizing;
+	uint allowsColumnReordering;
+}
+
+class NSTableView : NSControl, INSUserInterfaceValidations
+{
+	mixin (ObjcWrap);
+
+	void setDataSource (Object aSource)
+	{
+		return invokeObjcSelf!(void, "setDataSource:", Object)(aSource);
+	}
+
+	Object dataSource ()
+	{
+		return invokeObjcSelf!(Object, "dataSource");
+	}
+
+	void setDelegate (Object delegate_)
+	{
+		return invokeObjcSelf!(void, "setDelegate:", Object)(delegate_);
+	}
+
+	Object delegate_ ()
+	{
+		return invokeObjcSelf!(Object, "delegate");
+	}
+
+	void setHeaderView (NSTableHeaderView headerView)
+	{
+		return invokeObjcSelf!(void, "setHeaderView:", NSTableHeaderView)(headerView);
+	}
+
+	NSTableHeaderView headerView ()
+	{
+		return invokeObjcSelf!(NSTableHeaderView, "headerView");
+	}
+
+	void setCornerView (NSView cornerView)
+	{
+		return invokeObjcSelf!(void, "setCornerView:", NSView)(cornerView);
+	}
+
+	NSView cornerView ()
+	{
+		return invokeObjcSelf!(NSView, "cornerView");
+	}
+
+	void setAllowsColumnReordering (bool flag)
+	{
+		return invokeObjcSelf!(void, "setAllowsColumnReordering:", bool)(flag);
+	}
+
+	bool allowsColumnReordering ()
+	{
+		return invokeObjcSelf!(bool, "allowsColumnReordering");
+	}
+
+	void setAllowsColumnResizing (bool flag)
+	{
+		return invokeObjcSelf!(void, "setAllowsColumnResizing:", bool)(flag);
+	}
+
+	bool allowsColumnResizing ()
+	{
+		return invokeObjcSelf!(bool, "allowsColumnResizing");
+	}
+
+	void setColumnAutoresizingStyle (uint style)
+	{
+		return invokeObjcSelf!(void, "setColumnAutoresizingStyle:", uint)(style);
+	}
+
+	uint columnAutoresizingStyle ()
+	{
+		return invokeObjcSelf!(uint, "columnAutoresizingStyle");
+	}
+
+	void setGridStyleMask (NSUInteger gridType)
+	{
+		return invokeObjcSelf!(void, "setGridStyleMask:", NSUInteger)(gridType);
+	}
+
+	NSUInteger gridStyleMask ()
+	{
+		return invokeObjcSelf!(NSUInteger, "gridStyleMask");
+	}
+
+	void setIntercellSpacing (NSSize aSize)
+	{
+		return invokeObjcSelf!(void, "setIntercellSpacing:", NSSize)(aSize);
+	}
+
+	NSSize intercellSpacing ()
+	{
+		return invokeObjcSelf!(NSSize, "intercellSpacing");
+	}
+
+	void setUsesAlternatingRowBackgroundColors (bool useAlternatingRowColors)
+	{
+		return invokeObjcSelf!(void, "setUsesAlternatingRowBackgroundColors:", bool)(useAlternatingRowColors);
+	}
+
+	bool usesAlternatingRowBackgroundColors ()
+	{
+		return invokeObjcSelf!(bool, "usesAlternatingRowBackgroundColors");
+	}
+
+	void setBackgroundColor (NSColor color)
+	{
+		return invokeObjcSelf!(void, "setBackgroundColor:", NSColor)(color);
+	}
+
+	NSColor backgroundColor ()
+	{
+		return invokeObjcSelf!(NSColor, "backgroundColor");
+	}
+
+	void setGridColor (NSColor color)
+	{
+		return invokeObjcSelf!(void, "setGridColor:", NSColor)(color);
+	}
+
+	NSColor gridColor ()
+	{
+		return invokeObjcSelf!(NSColor, "gridColor");
+	}
+
+	void setRowHeight (CGFloat rowHeight)
+	{
+		return invokeObjcSelf!(void, "setRowHeight:", CGFloat)(rowHeight);
+	}
+
+	CGFloat rowHeight ()
+	{
+		return invokeObjcSelf!(CGFloat, "rowHeight");
+	}
+
+	void noteHeightOfRowsWithIndexesChanged (NSIndexSet indexSet)
+	{
+		return invokeObjcSelf!(void, "noteHeightOfRowsWithIndexesChanged:", NSIndexSet)(indexSet);
+	}
+
+	NSArray tableColumns ()
+	{
+		return invokeObjcSelf!(NSArray, "tableColumns");
+	}
+
+	NSInteger numberOfColumns ()
+	{
+		return invokeObjcSelf!(NSInteger, "numberOfColumns");
+	}
+
+	NSInteger numberOfRows ()
+	{
+		return invokeObjcSelf!(NSInteger, "numberOfRows");
+	}
+
+	void addTableColumn (NSTableColumn column)
+	{
+		return invokeObjcSelf!(void, "addTableColumn:", NSTableColumn)(column);
+	}
+
+	void removeTableColumn (NSTableColumn column)
+	{
+		return invokeObjcSelf!(void, "removeTableColumn:", NSTableColumn)(column);
+	}
+
+	NSInteger columnWithIdentifier (Object identifier)
+	{
+		return invokeObjcSelf!(NSInteger, "columnWithIdentifier:", Object)(identifier);
+	}
+
+	NSTableColumn tableColumnWithIdentifier (Object identifier)
+	{
+		return invokeObjcSelf!(NSTableColumn, "tableColumnWithIdentifier:", Object)(identifier);
+	}
+
+	void tile ()
+	{
+		return invokeObjcSelf!(void, "tile");
+	}
+
+	void sizeToFit ()
+	{
+		return invokeObjcSelf!(void, "sizeToFit");
+	}
+
+	void sizeLastColumnToFit ()
+	{
+		return invokeObjcSelf!(void, "sizeLastColumnToFit");
+	}
+
+	void scrollRowToVisible (NSInteger row)
+	{
+		return invokeObjcSelf!(void, "scrollRowToVisible:", NSInteger)(row);
+	}
+
+	void scrollColumnToVisible (NSInteger column)
+	{
+		return invokeObjcSelf!(void, "scrollColumnToVisible:", NSInteger)(column);
+	}
+
+	void moveColumn (NSInteger column, NSInteger newIndex)
+	{
+		return invokeObjcSelf!(void, "moveColumn:toColumn:", NSInteger, NSInteger)(column, newIndex);
+	}
+
+	void reloadData ()
+	{
+		return invokeObjcSelf!(void, "reloadData");
+	}
+
+	void noteNumberOfRowsChanged ()
+	{
+		return invokeObjcSelf!(void, "noteNumberOfRowsChanged");
+	}
+
+	NSInteger editedColumn ()
+	{
+		return invokeObjcSelf!(NSInteger, "editedColumn");
+	}
+
+	NSInteger editedRow ()
+	{
+		return invokeObjcSelf!(NSInteger, "editedRow");
+	}
+
+	NSInteger clickedColumn ()
+	{
+		return invokeObjcSelf!(NSInteger, "clickedColumn");
+	}
+
+	NSInteger clickedRow ()
+	{
+		return invokeObjcSelf!(NSInteger, "clickedRow");
+	}
+
+	void setDoubleAction (SEL aSelector)
+	{
+		return invokeObjcSelf!(void, "setDoubleAction:", SEL)(aSelector);
+	}
+
+	SEL doubleAction ()
+	{
+		return invokeObjcSelf!(SEL, "doubleAction");
+	}
+
+	void setSortDescriptors (NSArray array)
+	{
+		return invokeObjcSelf!(void, "setSortDescriptors:", NSArray)(array);
+	}
+
+	NSArray sortDescriptors ()
+	{
+		return invokeObjcSelf!(NSArray, "sortDescriptors");
+	}
+
+	void setIndicatorImage (NSImage anImage, NSTableColumn tc)
+	{
+		return invokeObjcSelf!(void, "setIndicatorImage:inTableColumn:", NSImage, NSTableColumn)(anImage, tc);
+	}
+
+	NSImage indicatorImageInTableColumn (NSTableColumn tc)
+	{
+		return invokeObjcSelf!(NSImage, "indicatorImageInTableColumn:", NSTableColumn)(tc);
+	}
+
+	void setHighlightedTableColumn (NSTableColumn tc)
+	{
+		return invokeObjcSelf!(void, "setHighlightedTableColumn:", NSTableColumn)(tc);
+	}
+
+	NSTableColumn highlightedTableColumn ()
+	{
+		return invokeObjcSelf!(NSTableColumn, "highlightedTableColumn");
+	}
+
+	void setVerticalMotionCanBeginDrag (bool flag)
+	{
+		return invokeObjcSelf!(void, "setVerticalMotionCanBeginDrag:", bool)(flag);
+	}
+
+	bool verticalMotionCanBeginDrag ()
+	{
+		return invokeObjcSelf!(bool, "verticalMotionCanBeginDrag");
+	}
+
+	bool canDragRowsWithIndexes (NSIndexSet rowIndexes, NSPoint mouseDownPoint)
+	{
+		return invokeObjcSelf!(bool, "canDragRowsWithIndexes:atPoint:", NSIndexSet, NSPoint)(rowIndexes, mouseDownPoint);
+	}
+
+	NSImage dragImageForRowsWithIndexes (NSIndexSet dragRows, NSArray tableColumns, NSEvent dragEvent, NSPointPointer dragImageOffset)
+	{
+		return invokeObjcSelf!(NSImage, "dragImageForRowsWithIndexes:tableColumns:event:offset:", NSIndexSet, NSArray, NSEvent, NSPointPointer)(dragRows, tableColumns, dragEvent, dragImageOffset);
+	}
+
+	void setDraggingSourceOperationMask (uint mask, bool isLocal)
+	{
+		return invokeObjcSelf!(void, "setDraggingSourceOperationMask:forLocal:", uint, bool)(mask, isLocal);
+	}
+
+	void setDropRow (NSInteger row, uint op)
+	{
+		return invokeObjcSelf!(void, "setDropRow:dropOperation:", NSInteger, uint)(row, op);
+	}
+
+	void setAllowsMultipleSelection (bool flag)
+	{
+		return invokeObjcSelf!(void, "setAllowsMultipleSelection:", bool)(flag);
+	}
+
+	bool allowsMultipleSelection ()
+	{
+		return invokeObjcSelf!(bool, "allowsMultipleSelection");
+	}
+
+	void setAllowsEmptySelection (bool flag)
+	{
+		return invokeObjcSelf!(void, "setAllowsEmptySelection:", bool)(flag);
+	}
+
+	bool allowsEmptySelection ()
+	{
+		return invokeObjcSelf!(bool, "allowsEmptySelection");
+	}
+
+	void setAllowsColumnSelection (bool flag)
+	{
+		return invokeObjcSelf!(void, "setAllowsColumnSelection:", bool)(flag);
+	}
+
+	bool allowsColumnSelection ()
+	{
+		return invokeObjcSelf!(bool, "allowsColumnSelection");
+	}
+
+	void selectAll (Object sender)
+	{
+		return invokeObjcSelf!(void, "selectAll:", Object)(sender);
+	}
+
+	void deselectAll (Object sender)
+	{
+		return invokeObjcSelf!(void, "deselectAll:", Object)(sender);
+	}
+
+	void selectColumnIndexes (NSIndexSet indexes, bool extend)
+	{
+		return invokeObjcSelf!(void, "selectColumnIndexes:byExtendingSelection:", NSIndexSet, bool)(indexes, extend);
+	}
+
+	void selectRowIndexes (NSIndexSet indexes, bool extend)
+	{
+		return invokeObjcSelf!(void, "selectRowIndexes:byExtendingSelection:", NSIndexSet, bool)(indexes, extend);
+	}
+
+	NSIndexSet selectedColumnIndexes ()
+	{
+		return invokeObjcSelf!(NSIndexSet, "selectedColumnIndexes");
+	}
+
+	NSIndexSet selectedRowIndexes ()
+	{
+		return invokeObjcSelf!(NSIndexSet, "selectedRowIndexes");
+	}
+
+	void deselectColumn (NSInteger column)
+	{
+		return invokeObjcSelf!(void, "deselectColumn:", NSInteger)(column);
+	}
+
+	void deselectRow (NSInteger row)
+	{
+		return invokeObjcSelf!(void, "deselectRow:", NSInteger)(row);
+	}
+
+	NSInteger selectedColumn ()
+	{
+		return invokeObjcSelf!(NSInteger, "selectedColumn");
+	}
+
+	NSInteger selectedRow ()
+	{
+		return invokeObjcSelf!(NSInteger, "selectedRow");
+	}
+
+	bool isColumnSelected (NSInteger column)
+	{
+		return invokeObjcSelf!(bool, "isColumnSelected:", NSInteger)(column);
+	}
+
+	bool isRowSelected (NSInteger row)
+	{
+		return invokeObjcSelf!(bool, "isRowSelected:", NSInteger)(row);
+	}
+
+	NSInteger numberOfSelectedColumns ()
+	{
+		return invokeObjcSelf!(NSInteger, "numberOfSelectedColumns");
+	}
+
+	NSInteger numberOfSelectedRows ()
+	{
+		return invokeObjcSelf!(NSInteger, "numberOfSelectedRows");
+	}
+
+	bool allowsTypeSelect ()
+	{
+		return invokeObjcSelf!(bool, "allowsTypeSelect");
+	}
+
+	void setAllowsTypeSelect (bool value)
+	{
+		return invokeObjcSelf!(void, "setAllowsTypeSelect:", bool)(value);
+	}
+
+	int selectionHighlightStyle ()
+	{
+		return invokeObjcSelf!(int, "selectionHighlightStyle");
+	}
+
+	void setSelectionHighlightStyle (int selectionHighlightStyle)
+	{
+		return invokeObjcSelf!(void, "setSelectionHighlightStyle:", int)(selectionHighlightStyle);
+	}
+
+	NSRect rectOfColumn (NSInteger column)
+	{
+		return invokeObjcSelf!(NSRect, "rectOfColumn:", NSInteger)(column);
+	}
+
+	NSRect rectOfRow (NSInteger row)
+	{
+		return invokeObjcSelf!(NSRect, "rectOfRow:", NSInteger)(row);
+	}
+
+	NSIndexSet columnIndexesInRect (NSRect rect)
+	{
+		return invokeObjcSelf!(NSIndexSet, "columnIndexesInRect:", NSRect)(rect);
+	}
+
+	NSRange rowsInRect (NSRect rect)
+	{
+		return invokeObjcSelf!(NSRange, "rowsInRect:", NSRect)(rect);
+	}
+
+	NSInteger columnAtPoint (NSPoint point)
+	{
+		return invokeObjcSelf!(NSInteger, "columnAtPoint:", NSPoint)(point);
+	}
+
+	NSInteger rowAtPoint (NSPoint point)
+	{
+		return invokeObjcSelf!(NSInteger, "rowAtPoint:", NSPoint)(point);
+	}
+
+	NSRect frameOfCellAtColumn (NSInteger column, NSInteger row)
+	{
+		return invokeObjcSelf!(NSRect, "frameOfCellAtColumn:row:", NSInteger, NSInteger)(column, row);
+	}
+
+	NSCell preparedCellAtColumn (NSInteger column, NSInteger row)
+	{
+		return invokeObjcSelf!(NSCell, "preparedCellAtColumn:row:", NSInteger, NSInteger)(column, row);
+	}
+
+	bool textShouldBeginEditing (NSText textObject)
+	{
+		return invokeObjcSelf!(bool, "textShouldBeginEditing:", NSText)(textObject);
+	}
+
+	bool textShouldEndEditing (NSText textObject)
+	{
+		return invokeObjcSelf!(bool, "textShouldEndEditing:", NSText)(textObject);
+	}
+
+	void textDidBeginEditing (NSNotification notification)
+	{
+		return invokeObjcSelf!(void, "textDidBeginEditing:", NSNotification)(notification);
+	}
+
+	void textDidEndEditing (NSNotification notification)
+	{
+		return invokeObjcSelf!(void, "textDidEndEditing:", NSNotification)(notification);
+	}
+
+	void textDidChange (NSNotification notification)
+	{
+		return invokeObjcSelf!(void, "textDidChange:", NSNotification)(notification);
+	}
+
+	void setAutosaveName (NSString name)
+	{
+		return invokeObjcSelf!(void, "setAutosaveName:", NSString)(name);
+	}
+
+	NSString autosaveName ()
+	{
+		return invokeObjcSelf!(NSString, "autosaveName");
+	}
+
+	void setAutosaveTableColumns (bool save)
+	{
+		return invokeObjcSelf!(void, "setAutosaveTableColumns:", bool)(save);
+	}
+
+	bool autosaveTableColumns ()
+	{
+		return invokeObjcSelf!(bool, "autosaveTableColumns");
+	}
+
+	void editColumn (NSInteger column, NSInteger row, NSEvent theEvent, bool select)
+	{
+		return invokeObjcSelf!(void, "editColumn:row:withEvent:select:", NSInteger, NSInteger, NSEvent, bool)(column, row, theEvent, select);
+	}
+
+	void drawRow (NSInteger row, NSRect clipRect)
+	{
+		return invokeObjcSelf!(void, "drawRow:clipRect:", NSInteger, NSRect)(row, clipRect);
+	}
+
+	void highlightSelectionInClipRect (NSRect clipRect)
+	{
+		return invokeObjcSelf!(void, "highlightSelectionInClipRect:", NSRect)(clipRect);
+	}
+
+	void drawGridInClipRect (NSRect clipRect)
+	{
+		return invokeObjcSelf!(void, "drawGridInClipRect:", NSRect)(clipRect);
+	}
+
+	void drawBackgroundInClipRect (NSRect clipRect)
+	{
+		return invokeObjcSelf!(void, "drawBackgroundInClipRect:", NSRect)(clipRect);
+	}
+
+	bool validateUserInterfaceItem (INSValidatedUserInterfaceItem anItem)
+	{
+		return invokeObjcSelf!(bool, "validateUserInterfaceItem:", INSValidatedUserInterfaceItem)(anItem);
+	}
+}
+
+const TNSTableViewNotifications = `
+
+	void tableViewSelectionDidChange (NSNotification notification)
+	{
+		return invokeObjcSelf!(void, "tableViewSelectionDidChange:", NSNotification)(notification);
+	}
+
+	void tableViewColumnDidMove (NSNotification notification)
+	{
+		return invokeObjcSelf!(void, "tableViewColumnDidMove:", NSNotification)(notification);
+	}
+
+	void tableViewColumnDidResize (NSNotification notification)
+	{
+		return invokeObjcSelf!(void, "tableViewColumnDidResize:", NSNotification)(notification);
+	}
+
+	void tableViewSelectionIsChanging (NSNotification notification)
+	{
+		return invokeObjcSelf!(void, "tableViewSelectionIsChanging:", NSNotification)(notification);
+	}
+
+	//mixin ObjcBindMethod!(tableViewSelectionDidChange, "tableViewSelectionDidChange:");
+	//mixin ObjcBindMethod!(tableViewColumnDidMove, "tableViewColumnDidMove:");
+	//mixin ObjcBindMethod!(tableViewColumnDidResize, "tableViewColumnDidResize:");
+	//mixin ObjcBindMethod!(tableViewSelectionIsChanging, "tableViewSelectionIsChanging:");
+
+`;
+
+const TNSTableDataSource = `
+
+	NSInteger numberOfRowsInTableView (NSTableView tableView)
+	{
+		return invokeObjcSelf!(NSInteger, "numberOfRowsInTableView:", NSTableView)(tableView);
+	}
+
+	Object tableView (NSTableView tableView, NSTableColumn tableColumn, NSInteger row)
+	{
+		return invokeObjcSelf!(Object, "tableView:objectValueForTableColumn:row:", NSTableView, NSTableColumn, NSInteger)(tableView, tableColumn, row);
+	}
+
+	void tableView (NSTableView tableView, Object object, NSTableColumn tableColumn, NSInteger row)
+	{
+		return invokeObjcSelf!(void, "tableView:setObjectValue:forTableColumn:row:", NSTableView, Object, NSTableColumn, NSInteger)(tableView, object, tableColumn, row);
+	}
+
+	void tableView (NSTableView tableView, NSArray oldDescriptors)
+	{
+		return invokeObjcSelf!(void, "tableView:sortDescriptorsDidChange:", NSTableView, NSArray)(tableView, oldDescriptors);
+	}
+
+	bool tableView (NSTableView tableView, NSIndexSet rowIndexes, NSPasteboard pboard)
+	{
+		return invokeObjcSelf!(bool, "tableView:writeRowsWithIndexes:toPasteboard:", NSTableView, NSIndexSet, NSPasteboard)(tableView, rowIndexes, pboard);
+	}
+
+	uint tableView (NSTableView tableView, INSDraggingInfo info, NSInteger row, uint dropOperation)
+	{
+		return invokeObjcSelf!(uint, "tableView:validateDrop:proposedRow:proposedDropOperation:", NSTableView, INSDraggingInfo, NSInteger, uint)(tableView, info, row, dropOperation);
+	}
+
+	bool tableView (NSTableView tableView, INSDraggingInfo info, NSInteger row, uint dropOperation)
+	{
+		return invokeObjcSelf!(bool, "tableView:acceptDrop:row:dropOperation:", NSTableView, INSDraggingInfo, NSInteger, uint)(tableView, info, row, dropOperation);
+	}
+
+	NSArray tableView (NSTableView tableView, NSURL dropDestination, NSIndexSet indexSet)
+	{
+		return invokeObjcSelf!(NSArray, "tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:", NSTableView, NSURL, NSIndexSet)(tableView, dropDestination, indexSet);
+	}
+
+	bool tableView (NSTableView tableView, NSArray rows, NSPasteboard pboard)
+	{
+		return invokeObjcSelf!(bool, "tableView:writeRows:toPasteboard:", NSTableView, NSArray, NSPasteboard)(tableView, rows, pboard);
+	}
+
+	//mixin ObjcBindMethod!(numberOfRowsInTableView, "numberOfRowsInTableView:");
+	//mixin ObjcBindMethod!(tableView, "tableView:objectValueForTableColumn:row:");
+	//mixin ObjcBindMethod!(tableView, "tableView:setObjectValue:forTableColumn:row:");
+	//mixin ObjcBindMethod!(tableView, "tableView:sortDescriptorsDidChange:");
+	//mixin ObjcBindMethod!(tableView, "tableView:writeRowsWithIndexes:toPasteboard:");
+	//mixin ObjcBindMethod!(tableView, "tableView:validateDrop:proposedRow:proposedDropOperation:");
+	//mixin ObjcBindMethod!(tableView, "tableView:acceptDrop:row:dropOperation:");
+	//mixin ObjcBindMethod!(tableView, "tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:");
+	//mixin ObjcBindMethod!(tableView, "tableView:writeRows:toPasteboard:");
+
+`;
+
+const TNSTableViewDelegate = `
+
+	void tableView (NSTableView tableView, Object cell, NSTableColumn tableColumn, NSInteger row)
+	{
+		return invokeObjcSelf!(void, "tableView:willDisplayCell:forTableColumn:row:", NSTableView, Object, NSTableColumn, NSInteger)(tableView, cell, tableColumn, row);
+	}
+
+	bool tableView (NSTableView tableView, NSTableColumn tableColumn, NSInteger row)
+	{
+		return invokeObjcSelf!(bool, "tableView:shouldEditTableColumn:row:", NSTableView, NSTableColumn, NSInteger)(tableView, tableColumn, row);
+	}
+
+	bool selectionShouldChangeInTableView (NSTableView tableView)
+	{
+		return invokeObjcSelf!(bool, "selectionShouldChangeInTableView:", NSTableView)(tableView);
+	}
+
+	bool tableView (NSTableView tableView, NSInteger row)
+	{
+		return invokeObjcSelf!(bool, "tableView:shouldSelectRow:", NSTableView, NSInteger)(tableView, row);
+	}
+
+	NSIndexSet tableView (NSTableView tableView, NSIndexSet proposedSelectionIndexes)
+	{
+		return invokeObjcSelf!(NSIndexSet, "tableView:selectionIndexesForProposedSelection:", NSTableView, NSIndexSet)(tableView, proposedSelectionIndexes);
+	}
+
+	bool tableView (NSTableView tableView, NSTableColumn tableColumn)
+	{
+		return invokeObjcSelf!(bool, "tableView:shouldSelectTableColumn:", NSTableView, NSTableColumn)(tableView, tableColumn);
+	}
+
+	void tableView (NSTableView tableView, NSTableColumn tableColumn)
+	{
+		return invokeObjcSelf!(void, "tableView:mouseDownInHeaderOfTableColumn:", NSTableView, NSTableColumn)(tableView, tableColumn);
+	}
+
+	void tableView (NSTableView tableView, NSTableColumn tableColumn)
+	{
+		return invokeObjcSelf!(void, "tableView:didClickTableColumn:", NSTableView, NSTableColumn)(tableView, tableColumn);
+	}
+
+	void tableView (NSTableView tableView, NSTableColumn tableColumn)
+	{
+		return invokeObjcSelf!(void, "tableView:didDragTableColumn:", NSTableView, NSTableColumn)(tableView, tableColumn);
+	}
+
+	NSString tableView (NSTableView tableView, NSCell cell, NSRectPointer rect, NSTableColumn tableColumn, NSInteger row, NSPoint mouseLocation)
+	{
+		return invokeObjcSelf!(NSString, "tableView:toolTipForCell:rect:tableColumn:row:mouseLocation:", NSTableView, NSCell, NSRectPointer, NSTableColumn, NSInteger, NSPoint)(tableView, cell, rect, tableColumn, row, mouseLocation);
+	}
+
+	CGFloat tableView (NSTableView tableView, NSInteger row)
+	{
+		return invokeObjcSelf!(CGFloat, "tableView:heightOfRow:", NSTableView, NSInteger)(tableView, row);
+	}
+
+	NSString tableView (NSTableView tableView, NSTableColumn tableColumn, NSInteger row)
+	{
+		return invokeObjcSelf!(NSString, "tableView:typeSelectStringForTableColumn:row:", NSTableView, NSTableColumn, NSInteger)(tableView, tableColumn, row);
+	}
+
+	NSInteger tableView (NSTableView tableView, NSInteger startRow, NSInteger endRow, NSString searchString)
+	{
+		return invokeObjcSelf!(NSInteger, "tableView:nextTypeSelectMatchFromRow:toRow:forString:", NSTableView, NSInteger, NSInteger, NSString)(tableView, startRow, endRow, searchString);
+	}
+
+	bool tableView (NSTableView tableView, NSEvent event, NSString searchString)
+	{
+		return invokeObjcSelf!(bool, "tableView:shouldTypeSelectForEvent:withCurrentSearchString:", NSTableView, NSEvent, NSString)(tableView, event, searchString);
+	}
+
+	bool tableView (NSTableView tableView, NSTableColumn tableColumn, NSInteger row)
+	{
+		return invokeObjcSelf!(bool, "tableView:shouldShowCellExpansionForTableColumn:row:", NSTableView, NSTableColumn, NSInteger)(tableView, tableColumn, row);
+	}
+
+	bool tableView (NSTableView tableView, NSCell cell, NSTableColumn tableColumn, NSInteger row)
+	{
+		return invokeObjcSelf!(bool, "tableView:shouldTrackCell:forTableColumn:row:", NSTableView, NSCell, NSTableColumn, NSInteger)(tableView, cell, tableColumn, row);
+	}
+
+	NSCell tableView (NSTableView tableView, NSTableColumn tableColumn, NSInteger row)
+	{
+		return invokeObjcSelf!(NSCell, "tableView:dataCellForTableColumn:row:", NSTableView, NSTableColumn, NSInteger)(tableView, tableColumn, row);
+	}
+
+	bool tableView (NSTableView tableView, NSInteger row)
+	{
+		return invokeObjcSelf!(bool, "tableView:isGroupRow:", NSTableView, NSInteger)(tableView, row);
+	}
+
+	//mixin ObjcBindMethod!(tableView, "tableView:willDisplayCell:forTableColumn:row:");
+	//mixin ObjcBindMethod!(tableView, "tableView:shouldEditTableColumn:row:");
+	//mixin ObjcBindMethod!(selectionShouldChangeInTableView, "selectionShouldChangeInTableView:");
+	//mixin ObjcBindMethod!(tableView, "tableView:shouldSelectRow:");
+	//mixin ObjcBindMethod!(tableView, "tableView:selectionIndexesForProposedSelection:");
+	//mixin ObjcBindMethod!(tableView, "tableView:shouldSelectTableColumn:");
+	//mixin ObjcBindMethod!(tableView, "tableView:mouseDownInHeaderOfTableColumn:");
+	//mixin ObjcBindMethod!(tableView, "tableView:didClickTableColumn:");
+	//mixin ObjcBindMethod!(tableView, "tableView:didDragTableColumn:");
+	//mixin ObjcBindMethod!(tableView, "tableView:toolTipForCell:rect:tableColumn:row:mouseLocation:");
+	//mixin ObjcBindMethod!(tableView, "tableView:heightOfRow:");
+	//mixin ObjcBindMethod!(tableView, "tableView:typeSelectStringForTableColumn:row:");
+	//mixin ObjcBindMethod!(tableView, "tableView:nextTypeSelectMatchFromRow:toRow:forString:");
+	//mixin ObjcBindMethod!(tableView, "tableView:shouldTypeSelectForEvent:withCurrentSearchString:");
+	//mixin ObjcBindMethod!(tableView, "tableView:shouldShowCellExpansionForTableColumn:row:");
+	//mixin ObjcBindMethod!(tableView, "tableView:shouldTrackCell:forTableColumn:row:");
+	//mixin ObjcBindMethod!(tableView, "tableView:dataCellForTableColumn:row:");
+	//mixin ObjcBindMethod!(tableView, "tableView:isGroupRow:");
+
+`;
+