2003-07-31 23:52:10 +00:00
|
|
|
/*
|
|
|
|
NSTableView.h
|
|
|
|
|
|
|
|
The table class.
|
|
|
|
|
|
|
|
Copyright (C) 2000 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Author: Nicola Pero <n.pero@mi.flashnet.it>
|
|
|
|
Date: March 2000
|
|
|
|
|
|
|
|
This file is part of the GNUstep GUI Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-10-29 21:16:17 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
2003-07-31 23:52:10 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-10 04:01:49 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
2007-10-29 21:16:17 +00:00
|
|
|
|
2003-07-31 23:52:10 +00:00
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-10-29 21:16:17 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
2003-07-31 23:52:10 +00:00
|
|
|
|
2007-10-29 21:16:17 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2003-07-31 23:52:10 +00:00
|
|
|
License along with this library; see the file COPYING.LIB.
|
2007-10-29 21:16:17 +00:00
|
|
|
If not, see <http://www.gnu.org/licenses/> or write to the
|
|
|
|
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
2006-11-06 13:58:37 +00:00
|
|
|
Boston, MA 02110-1301, USA.
|
2003-07-31 23:52:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GNUstep_H_NSTableView
|
|
|
|
#define _GNUstep_H_NSTableView
|
|
|
|
|
2010-03-31 08:14:50 +00:00
|
|
|
#import <AppKit/NSControl.h>
|
|
|
|
#import <AppKit/NSDragging.h>
|
|
|
|
#import <AppKit/NSUserInterfaceValidation.h>
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
@class NSArray;
|
2004-03-02 22:20:36 +00:00
|
|
|
@class NSIndexSet;
|
2004-03-27 17:48:00 +00:00
|
|
|
@class NSMutableIndexSet;
|
2003-07-31 23:52:10 +00:00
|
|
|
@class NSTableColumn;
|
|
|
|
@class NSTableHeaderView;
|
|
|
|
@class NSText;
|
|
|
|
@class NSImage;
|
2011-03-30 08:17:00 +00:00
|
|
|
@class NSURL;
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
typedef enum _NSTableViewDropOperation {
|
|
|
|
NSTableViewDropOn,
|
|
|
|
NSTableViewDropAbove
|
|
|
|
} NSTableViewDropOperation;
|
|
|
|
|
2004-03-02 22:20:36 +00:00
|
|
|
enum {
|
|
|
|
NSTableViewGridNone = 0,
|
|
|
|
NSTableViewSolidVerticalGridLineMask = 1,
|
|
|
|
NSTableViewSolidHorizontalGridLineMask = 2
|
|
|
|
};
|
|
|
|
|
2007-12-01 22:15:48 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
|
|
|
typedef enum _NSTableViewColumnAutoresizingStyle
|
|
|
|
{
|
|
|
|
NSTableViewNoColumnAutoresizing = 0,
|
|
|
|
NSTableViewUniformColumnAutoresizingStyle,
|
|
|
|
NSTableViewSequentialColumnAutoresizingStyle,
|
|
|
|
NSTableViewReverseSequentialColumnAutoresizingStyle,
|
|
|
|
NSTableViewLastColumnOnlyAutoresizingStyle,
|
|
|
|
NSTableViewFirstColumnOnlyAutoresizingStyle
|
|
|
|
} NSTableViewColumnAutoresizingStyle;
|
|
|
|
#endif
|
|
|
|
|
2004-03-02 22:20:36 +00:00
|
|
|
@interface NSTableView : NSControl <NSUserInterfaceValidations>
|
2003-07-31 23:52:10 +00:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Real Ivars
|
|
|
|
*/
|
|
|
|
id _dataSource;
|
|
|
|
NSMutableArray *_tableColumns;
|
|
|
|
BOOL _drawsGrid;
|
|
|
|
NSColor *_gridColor;
|
|
|
|
NSColor *_backgroundColor;
|
|
|
|
float _rowHeight;
|
|
|
|
NSSize _intercellSpacing;
|
|
|
|
id _delegate;
|
|
|
|
NSTableHeaderView *_headerView;
|
|
|
|
NSView *_cornerView;
|
|
|
|
SEL _action;
|
|
|
|
SEL _doubleAction;
|
|
|
|
id _target;
|
|
|
|
int _clickedRow;
|
|
|
|
int _clickedColumn;
|
|
|
|
NSTableColumn *_highlightedTableColumn;
|
2004-03-27 17:48:00 +00:00
|
|
|
NSMutableIndexSet *_selectedColumns;
|
|
|
|
NSMutableIndexSet *_selectedRows;
|
2003-07-31 23:52:10 +00:00
|
|
|
int _selectedColumn;
|
|
|
|
int _selectedRow;
|
|
|
|
BOOL _allowsMultipleSelection;
|
|
|
|
BOOL _allowsEmptySelection;
|
|
|
|
BOOL _allowsColumnSelection;
|
|
|
|
BOOL _allowsColumnResizing;
|
|
|
|
BOOL _allowsColumnReordering;
|
|
|
|
BOOL _autoresizesAllColumnsToFit;
|
|
|
|
BOOL _selectingColumns;
|
|
|
|
NSText *_textObject;
|
|
|
|
int _editedRow;
|
|
|
|
int _editedColumn;
|
|
|
|
NSCell *_editedCell;
|
|
|
|
BOOL _autosaveTableColumns;
|
|
|
|
NSString *_autosaveName;
|
2006-11-10 13:40:28 +00:00
|
|
|
BOOL _verticalMotionDrag;
|
2010-01-16 14:45:13 +00:00
|
|
|
NSArray *_sortDescriptors;
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Ivars Acting as Cache
|
|
|
|
*/
|
|
|
|
int _numberOfRows;
|
|
|
|
int _numberOfColumns;
|
|
|
|
/* YES if _delegate responds to
|
|
|
|
tableView:willDisplayCell:forTableColumn:row: */
|
|
|
|
BOOL _del_responds;
|
|
|
|
/* YES if _dataSource responds to
|
|
|
|
tableView:setObjectValue:forTableColumn:row: */
|
|
|
|
BOOL _dataSource_editable;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* We cache column origins (precisely, the x coordinate of the left
|
|
|
|
* origin of each column). When a column width is changed through
|
|
|
|
* [NSTableColumn setWidth:], then [NSTableView tile] gets called,
|
|
|
|
* which updates the cache. */
|
|
|
|
float *_columnOrigins;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* We keep the superview's width in order to know when to
|
|
|
|
* size the last column to fit
|
|
|
|
*/
|
|
|
|
float _superview_width;
|
|
|
|
|
|
|
|
/* if YES [which happens only during a sizeToFit], we are doing
|
|
|
|
computations on sizes so we ignore tile (produced for example by
|
|
|
|
the NSTableColumns) during the computation. We perform a global
|
|
|
|
tile at the end */
|
2007-12-01 22:15:48 +00:00
|
|
|
BOOL _tilingDisabled;
|
|
|
|
|
2010-12-22 16:16:14 +00:00
|
|
|
NSDragOperation _draggingSourceOperationMaskForLocal;
|
|
|
|
NSDragOperation _draggingSourceOperationMaskForRemote;
|
2003-07-31 23:52:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Data Source */
|
|
|
|
- (void) setDataSource: (id)anObject;
|
|
|
|
- (id) dataSource;
|
|
|
|
|
|
|
|
/* Loading data */
|
|
|
|
- (void) reloadData;
|
|
|
|
|
|
|
|
/* Target-action */
|
|
|
|
- (void) setDoubleAction: (SEL)aSelector;
|
|
|
|
- (SEL) doubleAction;
|
|
|
|
- (int) clickedColumn;
|
|
|
|
- (int) clickedRow;
|
|
|
|
|
|
|
|
/* Configuration */
|
|
|
|
- (void) setAllowsColumnReordering: (BOOL)flag;
|
|
|
|
- (BOOL) allowsColumnReordering;
|
|
|
|
- (void) setAllowsColumnResizing: (BOOL)flag;
|
|
|
|
- (BOOL) allowsColumnResizing;
|
|
|
|
- (void) setAllowsMultipleSelection: (BOOL)flag;
|
|
|
|
- (BOOL) allowsMultipleSelection;
|
|
|
|
- (void) setAllowsEmptySelection: (BOOL)flag;
|
|
|
|
- (BOOL) allowsEmptySelection;
|
|
|
|
- (void) setAllowsColumnSelection: (BOOL)flag;
|
|
|
|
- (BOOL) allowsColumnSelection;
|
|
|
|
|
|
|
|
/* Drawing Attributes */
|
|
|
|
- (void) setIntercellSpacing: (NSSize)aSize;
|
|
|
|
- (NSSize) intercellSpacing;
|
|
|
|
- (void) setRowHeight: (float)rowHeight;
|
|
|
|
- (float) rowHeight;
|
|
|
|
- (void) setBackgroundColor: (NSColor *)aColor;
|
|
|
|
- (NSColor *) backgroundColor;
|
2007-12-01 22:15:48 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
2004-03-02 22:20:36 +00:00
|
|
|
- (void) setUsesAlternatingRowBackgroundColors: (BOOL)useAlternatingRowColors;
|
|
|
|
- (BOOL) usesAlternatingRowBackgroundColors;
|
2007-12-01 22:15:48 +00:00
|
|
|
#endif
|
2004-03-02 22:20:36 +00:00
|
|
|
|
|
|
|
/* Columns */
|
|
|
|
- (void) addTableColumn: (NSTableColumn *)aColumn;
|
|
|
|
- (void) removeTableColumn: (NSTableColumn *)aColumn;
|
|
|
|
- (void) moveColumn: (int)columnIndex toColumn: (int)newIndex;
|
|
|
|
- (NSArray *) tableColumns;
|
|
|
|
- (int) columnWithIdentifier: (id)identifier;
|
|
|
|
- (NSTableColumn *) tableColumnWithIdentifier: (id)anObject;
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
/* Selecting Columns and Rows */
|
|
|
|
- (void) selectColumn: (int) columnIndex byExtendingSelection: (BOOL)flag;
|
|
|
|
- (void) selectRow: (int) rowIndex byExtendingSelection: (BOOL)flag;
|
2004-03-02 22:20:36 +00:00
|
|
|
- (void) selectColumnIndexes: (NSIndexSet *)indexes byExtendingSelection: (BOOL)extend;
|
|
|
|
- (void) selectRowIndexes: (NSIndexSet *)indexes byExtendingSelection: (BOOL)extend;
|
|
|
|
- (NSIndexSet *) selectedColumnIndexes;
|
|
|
|
- (NSIndexSet *) selectedRowIndexes;
|
2003-07-31 23:52:10 +00:00
|
|
|
- (void) deselectColumn: (int)columnIndex;
|
|
|
|
- (void) deselectRow: (int)rowIndex;
|
|
|
|
- (int) numberOfSelectedColumns;
|
|
|
|
- (int) numberOfSelectedRows;
|
|
|
|
- (int) selectedColumn;
|
|
|
|
- (int) selectedRow;
|
|
|
|
- (BOOL) isColumnSelected: (int)columnIndex;
|
|
|
|
- (BOOL) isRowSelected: (int)rowIndex;
|
|
|
|
- (NSEnumerator *) selectedColumnEnumerator;
|
|
|
|
- (NSEnumerator *) selectedRowEnumerator;
|
|
|
|
- (void) selectAll: (id)sender;
|
|
|
|
- (void) deselectAll: (id)sender;
|
|
|
|
|
2004-03-02 22:20:36 +00:00
|
|
|
/* Table Dimensions */
|
|
|
|
- (int) numberOfColumns;
|
|
|
|
- (int) numberOfRows;
|
|
|
|
|
2003-07-31 23:52:10 +00:00
|
|
|
/* Grid Drawing attributes */
|
|
|
|
- (void) setDrawsGrid: (BOOL)flag;
|
|
|
|
- (BOOL) drawsGrid;
|
|
|
|
- (void) setGridColor: (NSColor *)aColor;
|
|
|
|
- (NSColor *) gridColor;
|
2007-12-01 22:15:48 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
2004-03-02 22:20:36 +00:00
|
|
|
- (void) setGridStyleMask: (unsigned int)gridType;
|
|
|
|
- (unsigned int) gridStyleMask;
|
2007-12-01 22:15:48 +00:00
|
|
|
#endif
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
/* Editing Cells */
|
|
|
|
/* ALL TODOS */
|
|
|
|
- (void) editColumn: (int)columnIndex
|
2007-12-01 22:15:48 +00:00
|
|
|
row: (int)rowIndex
|
|
|
|
withEvent: (NSEvent *)theEvent
|
|
|
|
select: (BOOL)flag;
|
2003-07-31 23:52:10 +00:00
|
|
|
- (int) editedRow;
|
|
|
|
- (int) editedColumn;
|
|
|
|
|
|
|
|
/* Auxiliary Components */
|
|
|
|
- (void) setHeaderView: (NSTableHeaderView*)aHeaderView;
|
|
|
|
- (NSTableHeaderView*) headerView;
|
|
|
|
- (void) setCornerView: (NSView*)aView;
|
|
|
|
- (NSView*) cornerView;
|
|
|
|
|
|
|
|
/* Layout */
|
|
|
|
- (NSRect) rectOfColumn: (int)columnIndex;
|
|
|
|
- (NSRect) rectOfRow: (int)rowIndex;
|
2009-12-27 16:05:48 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
|
|
|
- (NSIndexSet *) columnIndexesInRect: (NSRect)aRect;
|
|
|
|
#endif
|
2003-07-31 23:52:10 +00:00
|
|
|
- (NSRange) columnsInRect: (NSRect)aRect;
|
|
|
|
- (NSRange) rowsInRect: (NSRect)aRect;
|
|
|
|
- (int) columnAtPoint: (NSPoint)aPoint;
|
|
|
|
- (int) rowAtPoint: (NSPoint)aPoint;
|
|
|
|
- (NSRect) frameOfCellAtColumn: (int)columnIndex
|
|
|
|
row: (int)rowIndex;
|
|
|
|
- (void) setAutoresizesAllColumnsToFit: (BOOL)flag;
|
|
|
|
- (BOOL) autoresizesAllColumnsToFit;
|
|
|
|
- (void) sizeLastColumnToFit;
|
|
|
|
- (void) noteNumberOfRowsChanged;
|
|
|
|
- (void) tile;
|
2007-12-01 22:15:48 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
|
|
|
- (NSTableViewColumnAutoresizingStyle) columnAutoresizingStyle;
|
|
|
|
- (void) setColumnAutoresizingStyle: (NSTableViewColumnAutoresizingStyle)style;
|
|
|
|
- (void) noteHeightOfRowsWithIndexesChanged: (NSIndexSet*)indexes;
|
|
|
|
#endif
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
/* Drawing */
|
|
|
|
- (void) drawRow: (int)rowIndex clipRect: (NSRect)clipRect;
|
|
|
|
- (void) drawGridInClipRect: (NSRect)aRect;
|
|
|
|
- (void) highlightSelectionInClipRect: (NSRect)clipRect;
|
2007-12-01 22:15:48 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
2004-03-02 22:21:18 +00:00
|
|
|
- (void) drawBackgroundInClipRect: (NSRect)clipRect;
|
2007-12-01 22:15:48 +00:00
|
|
|
#endif
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
/* Scrolling */
|
|
|
|
- (void) scrollRowToVisible: (int)rowIndex;
|
|
|
|
- (void) scrollColumnToVisible: (int)columnIndex;
|
|
|
|
|
|
|
|
/* Text delegate methods */
|
|
|
|
- (BOOL) textShouldBeginEditing: (NSText *)textObject;
|
|
|
|
- (void) textDidBeginEditing: (NSNotification *)aNotification;
|
|
|
|
- (void) textDidChange: (NSNotification *)aNotification;
|
|
|
|
- (BOOL) textShouldEndEditing: (NSText *)textObject;
|
|
|
|
- (void) textDidEndEditing: (NSNotification *)aNotification;
|
|
|
|
|
|
|
|
/* Persistence */
|
|
|
|
- (NSString *) autosaveName;
|
|
|
|
- (BOOL) autosaveTableColumns;
|
|
|
|
- (void) setAutosaveName: (NSString *)name;
|
|
|
|
- (void) setAutosaveTableColumns: (BOOL)flag;
|
|
|
|
|
|
|
|
/* Delegate */
|
|
|
|
- (void) setDelegate: (id)anObject;
|
|
|
|
- (id) delegate;
|
|
|
|
|
|
|
|
/* indicator image */
|
|
|
|
/* NB: ALL TODOS */
|
|
|
|
- (NSImage *) indicatorImageInTableColumn: (NSTableColumn *)aTableColumn;
|
|
|
|
- (void) setIndicatorImage: (NSImage *)anImage
|
|
|
|
inTableColumn: (NSTableColumn *)aTableColumn;
|
|
|
|
|
|
|
|
/* highlighting columns */
|
|
|
|
/* NB: ALL TODOS */
|
|
|
|
- (NSTableColumn *) highlightedTableColumn;
|
|
|
|
- (void) setHighlightedTableColumn: (NSTableColumn *)aTableColumn;
|
|
|
|
|
|
|
|
/* dragging rows */
|
|
|
|
/* NB: ALL TODOS */
|
|
|
|
- (NSImage*) dragImageForRows: (NSArray*)dragRows
|
2007-12-01 22:15:48 +00:00
|
|
|
event: (NSEvent*)dragEvent
|
|
|
|
dragImageOffset: (NSPoint*)dragImageOffset;
|
2003-07-31 23:52:10 +00:00
|
|
|
- (void) setDropRow: (int)row
|
|
|
|
dropOperation: (NSTableViewDropOperation)operation;
|
|
|
|
- (void) setVerticalMotionCanBeginDrag: (BOOL)flag;
|
|
|
|
- (BOOL) verticalMotionCanBeginDrag;
|
2007-12-01 22:15:48 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
|
|
|
- (BOOL) canDragRowsWithIndexes: (NSIndexSet*)indexes
|
|
|
|
atPoint: (NSPoint)point;
|
|
|
|
- (NSImage *) dragImageForRowsWithIndexes: (NSIndexSet*)rows
|
|
|
|
tableColumns: (NSArray*)cols
|
|
|
|
event: (NSEvent*)event
|
|
|
|
offset: (NSPoint*)offset;
|
2010-12-22 16:16:14 +00:00
|
|
|
- (void) setDraggingSourceOperationMask: (NSDragOperation)mask
|
2007-12-01 22:15:48 +00:00
|
|
|
forLocal: (BOOL)isLocal;
|
|
|
|
#endif
|
2003-07-31 23:52:10 +00:00
|
|
|
|
2004-03-02 22:21:18 +00:00
|
|
|
/* sorting */
|
2010-01-16 14:45:13 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
2004-03-02 22:21:18 +00:00
|
|
|
- (void) setSortDescriptors: (NSArray *)array;
|
2004-03-02 22:23:08 +00:00
|
|
|
- (NSArray *) sortDescriptors;
|
2010-01-16 14:45:13 +00:00
|
|
|
#endif
|
2004-03-02 22:21:18 +00:00
|
|
|
|
2003-07-31 23:52:10 +00:00
|
|
|
@end /* interface of NSTableView */
|
|
|
|
|
|
|
|
@interface NSTableView (GNUPrivate)
|
|
|
|
- (void) _sendDoubleActionForColumn: (int)columnIndex;
|
|
|
|
- (void) _selectColumn: (int)columnIndex
|
|
|
|
modifiers: (unsigned int)modifiers;
|
|
|
|
@end
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Informal protocol NSTableDataSource
|
|
|
|
*/
|
|
|
|
|
|
|
|
@interface NSObject (NSTableDataSource)
|
|
|
|
|
2011-03-09 10:37:54 +00:00
|
|
|
/**
|
|
|
|
* Returns the number of records that the data source manages for <em>aTableView</em>.
|
|
|
|
*/
|
2003-07-31 23:52:10 +00:00
|
|
|
- (int) numberOfRowsInTableView: (NSTableView *)aTableView;
|
|
|
|
- (id) tableView: (NSTableView *)aTableView
|
|
|
|
objectValueForTableColumn: (NSTableColumn *)aTableColumn
|
|
|
|
row: (int)rowIndex;
|
|
|
|
- (void) tableView: (NSTableView *)aTableView
|
|
|
|
setObjectValue: (id)anObject
|
|
|
|
forTableColumn: (NSTableColumn *)aTableColumn
|
|
|
|
row: (int)rowIndex;
|
|
|
|
|
|
|
|
/* Dragging */
|
|
|
|
- (BOOL) tableView: (NSTableView*)tableView
|
2007-12-01 22:15:48 +00:00
|
|
|
acceptDrop: (id <NSDraggingInfo>)info
|
|
|
|
row: (int)row
|
2003-07-31 23:52:10 +00:00
|
|
|
dropOperation: (NSTableViewDropOperation)operation;
|
|
|
|
- (NSDragOperation) tableView: (NSTableView*)tableView
|
2007-12-01 22:15:48 +00:00
|
|
|
validateDrop: (id <NSDraggingInfo>)info
|
|
|
|
proposedRow: (int)row
|
2003-07-31 23:52:10 +00:00
|
|
|
proposedDropOperation: (NSTableViewDropOperation)operation;
|
2007-12-02 20:43:32 +00:00
|
|
|
- (BOOL) tableView: (NSTableView*)tableView
|
2007-12-01 22:15:48 +00:00
|
|
|
writeRows: (NSArray*)rows
|
2003-07-31 23:52:10 +00:00
|
|
|
toPasteboard: (NSPasteboard*)pboard;
|
2011-03-30 08:17:00 +00:00
|
|
|
|
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
|
|
|
- (void) tableView: (NSTableView*)tableView
|
|
|
|
sortDescriptorsDidChange: (NSArray *)oldSortDescriptors;
|
|
|
|
#endif
|
|
|
|
|
2007-12-02 20:43:32 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
|
|
|
- (BOOL) tableView: (NSTableView*)tableView
|
|
|
|
writeRowsWithIndexes: (NSIndexSet*)rows
|
|
|
|
toPasteboard: (NSPasteboard*)pboard;
|
2011-03-30 08:17:00 +00:00
|
|
|
- (NSArray *) tableView: (NSTableView *)aTableView
|
|
|
|
namesOfPromisedFilesDroppedAtDestination: (NSURL *)dropDestination
|
|
|
|
forDraggedRowsWithIndexes: (NSIndexSet *)indexSet;
|
2007-12-02 20:43:32 +00:00
|
|
|
#endif
|
2003-07-31 23:52:10 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
APPKIT_EXPORT NSString *NSTableViewColumnDidMoveNotification;
|
|
|
|
APPKIT_EXPORT NSString *NSTableViewColumnDidResizeNotification;
|
|
|
|
APPKIT_EXPORT NSString *NSTableViewSelectionDidChangeNotification;
|
|
|
|
APPKIT_EXPORT NSString *NSTableViewSelectionIsChangingNotification;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Methods Implemented by the Delegate
|
|
|
|
*/
|
|
|
|
|
|
|
|
@interface NSObject (NSTableViewDelegate)
|
|
|
|
|
|
|
|
- (BOOL) selectionShouldChangeInTableView: (NSTableView *)aTableView;
|
2010-01-16 14:45:13 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
2003-07-31 23:52:10 +00:00
|
|
|
- (void) tableView: (NSTableView*)tableView
|
|
|
|
didClickTableColumn: (NSTableColumn *)tableColumn;
|
|
|
|
- (void) tableView: (NSTableView*)tableView
|
|
|
|
didDragTableColumn: (NSTableColumn *)tableColumn;
|
|
|
|
- (void) tableView: (NSTableView*)tableView
|
|
|
|
mouseDownInHeaderOfTableColumn: (NSTableColumn *)tableColumn;
|
2010-01-16 14:45:13 +00:00
|
|
|
#endif
|
2003-07-31 23:52:10 +00:00
|
|
|
- (BOOL)tableView: (NSTableView *)aTableView
|
|
|
|
shouldEditTableColumn: (NSTableColumn *)aTableColumn
|
|
|
|
row: (int)rowIndex;
|
|
|
|
- (BOOL) tableView: (NSTableView *)aTableView
|
|
|
|
shouldSelectRow: (int)rowIndex;
|
|
|
|
- (BOOL) tableView: (NSTableView *)aTableView
|
|
|
|
shouldSelectTableColumn: (NSTableColumn *)aTableColumn;
|
|
|
|
- (void) tableView: (NSTableView *)aTableView
|
|
|
|
willDisplayCell: (id)aCell
|
|
|
|
forTableColumn: (NSTableColumn *)aTableColumn
|
|
|
|
row: (int)rowIndex;
|
|
|
|
- (void) tableViewColumnDidMove: (NSNotification *)aNotification;
|
|
|
|
- (void) tableViewColumnDidResize: (NSNotification *)aNotification;
|
|
|
|
- (void) tableViewSelectionDidChange: (NSNotification *)aNotification;
|
|
|
|
- (void) tableViewSelectionIsChanging: (NSNotification *)aNotification;
|
2007-12-01 22:15:48 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
|
|
|
- (float) tableView: (NSTableView *)tableView
|
|
|
|
heightOfRow: (int)row;
|
|
|
|
- (NSString *) tableView: (NSTableView *)tableView
|
|
|
|
toolTipForCell: (NSCell *)cell
|
|
|
|
rect: (NSRect *)rect
|
|
|
|
tableColumn: (NSTableColumn *)col
|
|
|
|
row: (int)row
|
|
|
|
mouseLocation: (NSPoint)mouse;
|
|
|
|
#endif
|
2003-07-31 23:52:10 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* _GNUstep_H_NSTableView */
|