[Mono-osx] Monomac appkit.cs

James Clancey james.clancey at gmail.com
Thu Apr 22 02:37:59 EDT 2010


Here is a build-able copy of the NSTableview with the associated  classes

[BaseType (typeof (NSObject))]
interface NSTableColumn {
[Export ("initWithIdentifier:")]
IntPtr InitWithIdentifier (NSObject identifier);

[Export ("dataCellForRow:")]
NSObject DataCellForRow (int row);

[Export ("sizeToFit")]
void SizeToFit ();


//Detected properties
[Export ("identifier")]
NSObject Identifier { get; set; }

[Export ("tableView")]
NSTableView TableView { get; set; }

[Export ("width")]
float Width { get; set; }

[Export ("minWidth")]
float MinWidth { get; set; }

[Export ("maxWidth")]
float MaxWidth { get; set; }

[Export ("headerCell")]
NSObject HeaderCell { get; set; }

[Export ("dataCell")]
NSObject DataCell { get; set; }

[Export ("editable")]
bool Editable { [Bind ("isEditable")]get; set; }

//[Export ("sortDescriptorPrototype")]
//NSSortDescriptor SortDescriptorPrototype { get; set; }

[Export ("resizingMask")]
uint ResizingMask { get; set; }

[Export ("headerToolTip")]
string HeaderToolTip { get; set; }

[Export ("hidden")]
bool Hidden { [Bind ("isHidden")]get; set; }

}
 [BaseType (typeof (NSControl))]
interface NSTableView {
[Export ("noteHeightOfRowsWithIndexesChanged:")]
void NoteHeightOfRowsWithIndexesChanged (NSIndexSet indexSet );

[Export ("tableColumns")]
NSArray TableColumns ();

[Export ("numberOfColumns")]
int NumberOfColumns ();

[Export ("numberOfRows")]
int NumberOfRows ();

[Export ("addTableColumn:")]
void AddTableColumn (NSTableColumn tableColumn);

[Export ("removeTableColumn:")]
void RemoveTableColumn (NSTableColumn tableColumn);

[Export ("moveColumn:toColumn:")]
void MoveColumntoColumn (int oldIndex, int newIndex);

[Export ("columnWithIdentifier:")]
int ColumnWithIdentifier (NSObject identifier);

[Export ("tableColumnWithIdentifier:")]
NSTableColumn TableColumnWithIdentifier (NSObject identifier);

[Export ("tile")]
void Tile ();

[Export ("sizeToFit")]
void SizeToFit ();

[Export ("sizeLastColumnToFit")]
void SizeLastColumnToFit ();

[Export ("scrollRowToVisible:")]
void ScrollRowToVisible (int row);

[Export ("scrollColumnToVisible:")]
void ScrollColumnToVisible (int column);

[Export ("reloadData")]
void ReloadData ();

[Export ("noteNumberOfRowsChanged")]
void NoteNumberOfRowsChanged ();

[Export ("reloadDataForRowIndexes:columnIndexes:")]
void ReloadDataForRowIndexescolumnIndexes (NSIndexSet rowIndexes, NSIndexSet
columnIndexes );

[Export ("editedColumn")]
int EditedColumn ();

[Export ("editedRow")]
int EditedRow ();

[Export ("clickedColumn")]
int ClickedColumn ();

[Export ("clickedRow")]
int ClickedRow ();

[Export ("setIndicatorImage:inTableColumn:")]
void SetIndicatorImageinTableColumn (NSImage anImage, NSTableColumn
tableColumn);

[Export ("indicatorImageInTableColumn:")]
NSImage IndicatorImageInTableColumn (NSTableColumn tableColumn);

[Export ("canDragRowsWithIndexes:atPoint:")]
bool CanDragRowsWithIndexesatPoint (NSIndexSet rowIndexes, PointF
mouseDownPoint );
 // FIXME: binding, NSPointPointer
//[Export ("dragImageForRowsWithIndexes:tableColumns:event:offset:")]
//NSImage DragImageForRowsWithIndexestableColumnseventoffset (NSIndexSet
dragRows, NSArray tableColumns, NSEvent dragEvent, NSPointPointer
dragImageOffset );

[Export ("setDraggingSourceOperationMask:forLocal:")]
void SetDraggingSourceOperationMaskforLocal (NSDragOperation mask, bool
isLocal );

[Export ("setDropRow:dropOperation:")]
void SetDropRowdropOperation (int row, NSTableViewDropOperation
dropOperation);

[Export ("selectAll:")]
void SelectAll (NSObject sender);

[Export ("deselectAll:")]
void DeselectAll (NSObject sender);

[Export ("selectColumnIndexes:byExtendingSelection:")]
void SelectColumnIndexesbyExtendingSelection (NSIndexSet indexes, bool
extend );

[Export ("selectRowIndexes:byExtendingSelection:")]
void SelectRowIndexesbyExtendingSelection (NSIndexSet indexes, bool extend
);

[Export ("selectedColumnIndexes")]
NSIndexSet SelectedColumnIndexes ();

[Export ("selectedRowIndexes")]
NSIndexSet SelectedRowIndexes ();

[Export ("deselectColumn:")]
void DeselectColumn (int column);

[Export ("deselectRow:")]
void DeselectRow (int row);

[Export ("selectedColumn")]
int SelectedColumn ();

[Export ("selectedRow")]
int SelectedRow ();

[Export ("isColumnSelected:")]
bool IsColumnSelected (int column);

[Export ("isRowSelected:")]
bool IsRowSelected (int row);

[Export ("numberOfSelectedColumns")]
int NumberOfSelectedColumns ();

[Export ("numberOfSelectedRows")]
int NumberOfSelectedRows ();

[Export ("rectOfColumn:")]
RectangleF RectOfColumn (int column);

[Export ("rectOfRow:")]
RectangleF RectOfRow (int row);

[Export ("columnIndexesInRect:")]
NSIndexSet ColumnIndexesInRect (RectangleF rect);

[Export ("rowsInRect:")]
NSRange RowsInRect (RectangleF rect);

[Export ("columnAtPoint:")]
int ColumnAtPoint (PointF point);

[Export ("rowAtPoint:")]
int RowAtPoint (PointF point);

[Export ("frameOfCellAtColumn:row:")]
RectangleF FrameOfCellAtColumnrow (int column, int row);

[Export ("preparedCellAtColumn:row:")]
NSCell PreparedCellAtColumnrow (int column, int row );

[Export ("textShouldBeginEditing:")]
bool TextShouldBeginEditing (NSText textObject);

[Export ("textShouldEndEditing:")]
bool TextShouldEndEditing (NSText textObject);

[Export ("textDidBeginEditing:")]
void TextDidBeginEditing (NSNotification notification);

[Export ("textDidEndEditing:")]
void TextDidEndEditing (NSNotification notification);

[Export ("textDidChange:")]
void TextDidChange (NSNotification notification);

[Export ("shouldFocusCell:atColumn:row:")]
bool ShouldFocusCellatColumnrow (NSCell cell, int column, int row );

[Export ("performClickOnCellAtColumn:row:")]
void PerformClickOnCellAtColumnrow (int column, int row );

[Export ("editColumn:row:withEvent:select:")]
void EditColumnrowwithEventselect (int column, int row, NSEvent theEvent,
bool select);

[Export ("drawRow:clipRect:")]
void DrawRowclipRect (int row, RectangleF clipRect);

[Export ("highlightSelectionInClipRect:")]
void HighlightSelectionInClipRect (RectangleF clipRect);

[Export ("drawGridInClipRect:")]
void DrawGridInClipRect (RectangleF clipRect);

[Export ("drawBackgroundInClipRect:")]
void DrawBackgroundInClipRect (RectangleF clipRect );

//Detected properties
[Export ("dataSource")][NullAllowed]
NSTableViewDataSource DataSource { get; set; }

[Export ("delegate")][NullAllowed]
NSTableViewDelegate Delegate { get; set; }

[Export ("headerView")]
NSTableHeaderView HeaderView { get; set; }

[Export ("cornerView")]
NSView CornerView { get; set; }

[Export ("allowsColumnReordering")]
bool AllowsColumnReordering { get; set; }

[Export ("allowsColumnResizing")]
bool AllowsColumnResizing { get; set; }

[Export ("columnAutoresizingStyle")]
NSTableViewColumnAutoresizingStyle ColumnAutoresizingStyle { get; set; }

[Export ("gridStyleMask")]
uint GridStyleMask { get; set; }

[Export ("intercellSpacing")]
SizeF IntercellSpacing { get; set; }

[Export ("usesAlternatingRowBackgroundColors")]
bool UsesAlternatingRowBackgroundColors { get; set; }

[Export ("backgroundColor")]
NSColor BackgroundColor { get; set; }

[Export ("gridColor")]
NSColor GridColor { get; set; }

[Export ("rowHeight")]
float RowHeight { get; set; }

[Export ("doubleAction")]
Selector DoubleAction { get; set; }

[Export ("sortDescriptors")]
NSArray SortDescriptors { get; set; }

[Export ("highlightedTableColumn")]
NSTableColumn HighlightedTableColumn { get; set; }

[Export ("verticalMotionCanBeginDrag")]
bool VerticalMotionCanBeginDrag { get; set; }

[Export ("allowsMultipleSelection")]
bool AllowsMultipleSelection { get; set; }

[Export ("allowsEmptySelection")]
bool AllowsEmptySelection { get; set; }

[Export ("allowsColumnSelection")]
bool AllowsColumnSelection { get; set; }

[Export ("allowsTypeSelect")]
bool AllowsTypeSelect { get; set; }

[Export ("selectionHighlightStyle")]
NSTableViewSelectionHighlightStyle SelectionHighlightStyle { get; set; }

[Export ("draggingDestinationFeedbackStyle")]
NSTableViewDraggingDestinationFeedbackStyle DraggingDestinationFeedbackStyle
{ get; set; }

[Export ("autosaveName")]
string AutosaveName { get; set; }

[Export ("autosaveTableColumns")]
bool AutosaveTableColumns { get; set; }

[Export ("focusedColumn")]
int FocusedColumn { get; set; }

}

[BaseType (typeof (NSObject))]
[Model]
interface NSTableViewDelegate {
[Export ("tableView:willDispayCell:forTableColumn:row:")]
void TableViewwillDisplayCellforTableColumnrow (NSTableView tableView,
NSObject cell, NSTableColumn tableColumn, int row);

[Export ("tableView:shouldEditTableColumn:row:")]
bool TableViewshouldEditTableColumnrow (NSTableView tableView, NSTableColumn
tableColumn, int row);

[Export ("selectionShouldChangeInTableView:")]
bool SelectionShouldChangeInTableView (NSTableView tableView);

[Export ("tableView:shouldSelectRow:")]
bool TableViewshouldSelectRow (NSTableView tableView, int row);

[Export ("tableView:selectionIndexesForProposedSelection:")]
NSIndexSet TableViewselectionIndexesForProposedSelection (NSTableView
tableView, NSIndexSet proposedSelectionIndexes);

[Export ("tableView:shouldSelectTableColumn:")]
bool TableViewshouldSelectTableColumn (NSTableView tableView, NSTableColumn
tableColumn);

[Export ("tableView:mouseDownInHeaderOfTableColumn:")]
void TableViewmouseDownInHeaderOfTableColumn (NSTableView tableView,
NSTableColumn tableColumn);

[Export ("tableView:didClickTableColumn:")]
void TableViewdidClickTableColumn (NSTableView tableView, NSTableColumn
tableColumn);

[Export ("tableView:didDragTableColumn:")]
void TableViewdidDragTableColumn (NSTableView tableView, NSTableColumn
tableColumn);
 //FIXME: Binding NSRectPointer
//[Export ("tableView:toolTipForCell:rect:tableColumn:row:mouseLocation:")]
//string TableViewtoolTipForCellrecttableColumnrowmouseLocation (NSTableView
tableView, NSCell cell, NSRectPointer rect, NSTableColumn tableColumn, int
row, PointF mouseLocation);

[Export ("tableView:heightOfRow:")]
float TableViewheightOfRow (NSTableView tableView, int row );

[Export ("tableView:typeSelectStringForTableColumn:row:")]
string TableViewtypeSelectStringForTableColumnrow (NSTableView tableView,
NSTableColumn tableColumn, int row );

[Export ("tableView:nextTypeSelectMatchFromRow:toRow:forString:")]
int TableViewnextTypeSelectMatchFromRowtoRowforString (NSTableView
tableView, int startRow, int endRow, string searchString );

[Export ("tableView:shouldTypeSelectForEvent:withCurrentSearchString:")]
bool TableViewshouldTypeSelectForEventwithCurrentSearchString (NSTableView
tableView, NSEvent theEvent, string searchString );

[Export ("tableView:shouldShowCellExpansionForTableColumn:row:")]
bool TableViewshouldShowCellExpansionForTableColumnrow (NSTableView
tableView, NSTableColumn tableColumn, int row );

[Export ("tableView:shouldTrackCell:forTableColumn:row:")]
bool TableViewshouldTrackCellforTableColumnrow (NSTableView tableView,
NSCell cell, NSTableColumn tableColumn, int row );

[Export ("tableView:dataCellForTableColumn:row:")]
NSCell TableViewdataCellForTableColumnrow (NSTableView tableView,
NSTableColumn tableColumn, int row );

[Export ("tableView:isGroupRow:")]
bool TableViewisGroupRow (NSTableView tableView, int row );

[Export ("tableView:sizeToFitWidthOfColumn:")]
float TableViewsizeToFitWidthOfColumn (NSTableView tableView, int column );

[Export ("tableView:shouldReorderColumn:toColumn:")]
bool TableViewshouldReorderColumntoColumn (NSTableView tableView, int
columnIndex, int newColumnIndex );

[Export ("tableViewSelectionDidChange:")]
void TableViewSelectionDidChange (NSNotification notification);

[Export ("tableViewColumnDidMove:")]
void TableViewColumnDidMove (NSNotification notification);

[Export ("tableViewColumnDidResize:")]
void TableViewColumnDidResize (NSNotification notification);

[Export ("tableViewSelectionIsChanging:")]
void TableViewSelectionIsChanging (NSNotification notification);

}

[BaseType (typeof (NSObject))]
[Model]
interface NSTableViewDataSource {
[Export ("numberOfRowsInTableView:")]
int NumberOfRowsInTableView (NSTableView tableView);

[Export ("tableView:objectValueForTableColumn:row:")]
NSObject TableViewobjectValueForTableColumnrow (NSTableView tableView,
NSTableColumn tableColumn, int row);

[Export ("tableView:setObjectValue:forTableColumn:row:")]
void TableViewsetObjectValueforTableColumnrow (NSTableView tableView,
NSObject theObject, NSTableColumn tableColumn, int row);

[Export ("tableView:sortDescriptorsDidChange:")]
void TableViewsortDescriptorsDidChange (NSTableView tableView, NSArray
oldDescriptors );

[Export ("tableView:writeRowsWithIndexes:toPasteboard:")]
bool TableViewwriteRowsWithIndexestoPasteboard (NSTableView tableView,
NSIndexSet rowIndexes, NSPasteboard pboard );

[Export ("tableView:validateDrop:proposedRow:proposedDropOperation:")]
NSDragOperation TableViewvalidateDropproposedRowproposedDropOperation
(NSTableView tableView, NSDraggingInfo info, int row,
NSTableViewDropOperation dropOperation);

[Export ("tableView:acceptDrop:row:dropOperation:")]
bool TableViewacceptDroprowdropOperation (NSTableView tableView,
NSDraggingInfo info, int row, NSTableViewDropOperation dropOperation);

[Export
("tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:")]
NSArray
TableViewnamesOfPromisedFilesDroppedAtDestinationforDraggedRowsWithIndexes
(NSTableView tableView, NSUrl dropDestination, NSIndexSet indexSet );

}
[BaseType (typeof (NSTextFieldCell))]
interface NSTableHeaderCell {
[Export ("drawSortIndicatorWithFrame:inView:ascending:priority:")]
void DrawSortIndicatorWithFrameinViewascendingpriority (RectangleF
cellFrame, NSView controlView, bool ascending, int priority );

[Export ("sortIndicatorRectForBounds:")]
RectangleF SortIndicatorRectForBounds (RectangleF theRect );

}
 [BaseType (typeof (NSView))]
interface NSTableHeaderView {
[Export ("draggedColumn")]
int DraggedColumn ();

[Export ("draggedDistance")]
float DraggedDistance ();

[Export ("resizedColumn")]
int ResizedColumn ();

[Export ("headerRectOfColumn:")]
RectangleF HeaderRectOfColumn (int column);

[Export ("columnAtPoint:")]
int ColumnAtPoint (PointF point);

//Detected properties
[Export ("tableView")]
NSTableView TableView { get; set; }

}
 [BaseType (typeof (NSActionCell))]
interface NSTextFieldCell {
[Export ("setUpFieldEditorAttributes:")]
NSText SetUpFieldEditorAttributes (NSText textObj);

[Export ("setWantsNotificationForMarkedText:")]
void SetWantsNotificationForMarkedText (bool flag);

//Detected properties
[Export ("backgroundColor")]
NSColor BackgroundColor { get; set; }

[Export ("drawsBackground")]
bool DrawsBackground { get; set; }

[Export ("textColor")]
NSColor TextColor { get; set; }

[Export ("bezelStyle")]
NSTextFieldBezelStyle BezelStyle { get; set; }

[Export ("placeholderString")]
string PlaceholderString { get; set; }

[Export ("placeholderAttributedString")]
NSAttributedString PlaceholderAttributedString { get; set; }

[Export ("allowedInputSourceLocales")]
NSArray AllowedInputSourceLocales { get; set; }

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20100421/0a8d11a6/attachment-0001.html 


More information about the Mono-osx mailing list