RRSSWorksheet



Abstract

the RRSSWorksheet class is the control representing the field of cells in an RRSpreadSheet

Discussion

the RRSSWorksheet class is the control representing the field of cells in an RRSpreadSheet

Methods

addColumns:

Abstract: add count number of columns
- (void)addColumns:(int)count; 

description forthcoming

Parameters

NameDescription
countnumber of columns to add

addRows:

Abstract: add count number of rows
- (void)addRows:(int)count; 

description forthcoming

Parameters

NameDescription
countinteger holding the number of new rows to add

allowAutoResize

Abstract: return the autoresize setting
- (BOOL)allowAutoResize; 

Result: returns a BOOL holding the setting for the autoresize flag

beginEditingCell:

Abstract: begin editing a worksheet cell
- (void)beginEditingCell:(NSCell*)aCell; 

description forthcoming

Parameters

NameDescription
aCellthe cell to begin editing

cellClass

Abstract: return the worksheet cell class
+ (Class)cellClass; 

Result: the class used by the spreadsheet when creating new cells

cellPositionForEvent:

Abstract: return an RRPosition holding the row/column position for an event
- (RRPosition*)cellPositionForEvent:(NSEvent*)theEvent; 

description forthcoming

Parameters

NameDescription
theEventthe event you are interested in
Result: an RRPosition object holding the row/column within which theEvent occured

cellSize:

Abstract: return the default cell size
- (NSSize)cellSize; 

description forthcoming

Result: an NSSize holding the default worksheet cell size

cells

Abstract: return all worksheet cells
- (NSMutableDictionary*)cells; 

This method returns a dictionary holding all of the worksheets cells keyed with RRPosition objects

Result: an NSMutableDictionary holding all of the worksheet's cells

clearWorksheet

Abstract: clear all data from the worksheet view
- (void)clearWorksheet; 

description forthcoming


columns

Abstract: return an array holding all of the columns in the worksheet
- (NSArray*)columns; 

description forthcoming

Result: returns and NSArray holding all of the columns in the worksheet

createCellForRow:column:

Abstract: create a new cell for a row/column
- (id)createCellForRow:(int)row column:(int)column; 

description forthcoming

Parameters

NameDescription
rowworksheet row index
columnworksheet column
Result: returns the newly created cell object

dataSource

Abstract: return the datasource for this worksheet
- (id)dataSource; 

This method retuns the current datasource object for this worksheet

Result: the worksheet's current datasource object

deselectAllCells

Abstract: deselect all currently selected cells
- (void)deselectAllCells; 

description forthcoming


deselectCellAtRow:column:

Abstract: deselect a cell by row/column
- (void)deselectCellAtRow:(int)row column:(int)column; 

description forthcoming

Parameters

NameDescription
rowinteger row index
columninteger column index

deselectColumn:

Abstract: deselect all cells in a column
- (void)deselectColumn:(int)column; 

description forthcoming

Parameters

NameDescription
columninteger column index

deselectRow:

Abstract: deselect all cells in a row
- (void)deselectRow:(int)row; 

description forthcoming

Parameters

NameDescription
rowinteger row index

deselectSelectedCell

Abstract: deselect the last selected cell
- (void)deselectSelectedCell; 

description forthcoming


dirtyColumnRange

Abstract: return the range of dirty columns
- (NSRange)dirtyColumnRange; 

description forthcoming


dirtyRowRange

Abstract: return the range of dirty rows
- (NSRange)dirtyRowRange; 

description forthcoming


heightForRow:

Abstract: return the row height
- (float)heightForRow:(unsigned int)row; 

description forthcoming

Parameters

NameDescription
rowinteger index of the row

indexOfObjectInArray:forLocation:

Abstract: return the index of a row/column in an array based on its location
- (int)indexOfObjectInArray:(NSArray*)array forLocation:(float)location; 

description forthcoming


initWithFrame:cellSize:

Abstract: class initialization method.
- (id)initWithFrame:(NSRect)rect cellSize:(NSSize)size; 

class initialization method. This is the default initialization method for the class

Parameters

NameDescription
rectan NSRect holding the new control's frame
sizethe default cell size for the worksheet
Result: returns the initialized object, or nil

insertColumn:

Abstract: insert column at index
- (void)insertColumn:(unsigned int)index; 

NOT IMPLEMENTED YET

Parameters

NameDescription
indexinteger for new column index

insertRow:

Abstract: insert a row at index
- (void)insertRow:(unsigned int)row; 

NOT IMPLEMENTED YET

Parameters

NameDescription
rowinteger holding the index for the inserted row

rangeForArray:inFloatRange

Abstract: return the range of row/column indecies that cover the viewable range
- (NSRange)rangeForArray:(NSArray*)array inFloatRange:(RRFloatRange)range; 

This method returns the range of row or column indicies which are known to cover the visible bounds specified in range. This method is used to determine which rows or columns are currently visible.

Parameters

NameDescription
arrayan array holding either the list of row or column headers
rangethe visible range we are interested in
Result: NSRange with the range of headers covering range

reloadCellDataAtRow:column:

Abstract: reload the data for a cell
- (void)reloadCellDataAtRow:(int)row column:(int)column; 

This method causes the worksheet to poll its data source for the contents of cell row/column and display the value received.

Parameters

NameDescription
rowinteger row index
columninteger column index

reloadWorksheetData

Abstract: reload all worksheet cells
- (void)reloadWorksheetData; 

This method causes the worksheet to query its data source for the object values for all its cells and redisplay


removeAllColumns

Abstract: remove all columns in worksheet
- (void)removeAllColumns; 

description forthcoming


removeAllRows

Abstract: remove all rows in the worksheet
- (void)removeAllRows; 

description forthcoming


removeColumn:

Abstract: remove column at column
- (void)removeColumn:(unsigned int)column; 

description forthcoming

Parameters

NameDescription
columninteger index of column to remove

removeRow:

Abstract: remove row at index
- (void)removeRow:(unsigned int)row; 

description forthcoming

Parameters

NameDescription
rowinteger index of row to remove

resizeColumn:range:

Abstract: resize column to new range
- (void)resizeColumn:(unsigned int)column range:(RRFloatRange)range; 

description forthcoming

Parameters

NameDescription
columninteger index of column to resize
rangeRRFloatRange holding new location and length for column

resizeRow:range:

Abstract: resize a row vertically
- (void)resizeRow:(unsigned int)index range:(RRFloatRange)range; 

description forthcoming

Parameters

NameDescription
indexindex of the row to resize
rangean RRFloatRange holding the new location and length of the row

rows

Abstract: return all rows in the worksheet
- (NSArray*)rows; 

description forthcoming

Result: an NSArray holding all of the rows in the worksheet

selectCell:

Abstract: deselect a cell
- (void)deselectCell:(NSCell*)aCell; 

description forthcoming

Parameters

NameDescription
aCellcell to deselect

selectCellAtRow:column:

Abstract: select a cell in the worksheet by row/column
- (void)selectCellAtRow:(int)row column:(int)column; 

description forthcoming

Parameters

NameDescription
rowinteger row index
columninteger column index

selectColumn:

Abstract: select an entire column
- (void)selectColumn:(int)column; 

description forthcoming

Parameters

NameDescription
columninteger column index

selectRow:

Abstract: select an entire row
- (void)selectRow:(int)row; 

description forthcoming

Parameters

NameDescription
rowinteger row index

selectedCells

Abstract: return all selected cells in the worksheet
- (NSArray*)selectedCells; 

description forthcoming

Result: returns an array of all selected cells in the worksheet

setAllowAutoResize:

Abstract: set the worksheet's auto resizing parameter
- (void)setAllowAutoResize:(BOOL)allow; 

the method determines whether the worksheet automatically adds rows and columns to fill the spreadsheet view

Parameters

NameDescription
allowYES = allow the worksheet to resize automatically, NO = do not allow the worksheet to automatically resize

setCellClass:

Abstract: set the worksheet cell class
+ (void)setCellClass:(Class)cellClass; 

set the prototype class for the worksheet. This class will be used for all of the worksheet cells

Parameters

NameDescription
cellClassthe cell class

setCellSize:

Abstract: set the default cell size
- (void)setCellSize:(NSSize)size; 

description forthcoming

Parameters

NameDescription
sizethe new default cell size

setColumns:

Abstract: set the columns of the worksheet
- (void)setColumns:(NSMutableArray*)array; 

description forthcoming

Parameters

NameDescription
arrayarray holding the new RRSSHeader columns of the worksheet

setDatasource:

Abstract: the the worksheet datasource
- (void)setDatasource:(id)ds; 

set the data source for the worksheet. The datasource must implement the RRSpreadSheetDataSource as defined in RRSpreadSheet

Parameters

NameDescription
dsthe new worksheet data source

setRows:

Abstract: set the rows of the worksheet
- (void)setRows:(NSMutableArray*)array; 

description forthcoming

Parameters

NameDescription
arrayan array of RRSSHeaders holding the new rows of the worksheet

setRulerForSelectionFocus:

Abstract: sets the ruler that should have selection focus
- (void)setRulerForSelectionFocus:(RRSSRulerView*)ruler; 

description forthcoming

Parameters

NameDescription
rulerthe ruler to receive selection focus

spreadsheet

Abstract: return the enclosing spreadsheet for this worksheet
- (id)spreadsheet; 

Result: returns the enclosing spreadsheet object

updateDirtyRangesForRect:

Abstract: compute the row/column ranges within rect
- (void)updateDirtyRangesForRect:(NSRect)rect; 

description forthcoming

Parameters

NameDescription
rectdirty NSRect

updateMarkers

Abstract: get the worksheet to update the ruler markers
- (void)updateMarkers; 

description forthcoming


updateVisibleRangesForRect:

Abstract: compute the visible rows/columns inthe worksheet
- (void)updateVisibleRangesForRect:(NSRect)rect; 

description forthcoming

Parameters

NameDescription
rectvisible NSRect

visibleCellPositions

Abstract: return the visible cell positions
- (NSArray*)visibleCellPositions; 

description forthcoming


visibleColumnRange

Abstract: return the range of visible columns
- (NSRange)visibleColumnRange; 

description forthcoming


visibleColumns

Abstract: return the visible columns
- (NSArray*)visibleColumns; 

description forthcoming


visibleFrameForRect:

Abstract: return the visible portion of a rectangle
- (NSRect)visibleFrameForRect:(NSRect)rect; 

description forthcoming


visibleRowRange

Abstract: return the range of visible rows
- (NSRange)visibleRowRange; 

description forthcoming


visibleRows

Abstract: return the visible rows
- (NSArray*)visibleRows; 

description forthcoming


widthForColumn

Abstract: return the width of a column
- (float)widthForColumn:(unsigned int)column; 

description forthcoming

Parameters

NameDescription
columninteger index of column
Result: width of the column

(Last Updated 4/30/2002)