Cleanup of unused or commented out methods

This commit is contained in:
Gregory John Casamento 2024-08-08 17:48:16 -04:00
parent 0ab960e6fc
commit 854af0901e
3 changed files with 0 additions and 108 deletions

View file

@ -4849,87 +4849,6 @@ This method is deprecated, use -columnIndexesInRect:. */
[self tile];
}
/*
- (void) sizeToFit
{
NSCell *cell;
NSEnumerator *enumerator;
NSTableColumn *tb;
float table_width;
float width;
float candidate_width;
int row;
_tilingDisabled = YES;
// First Step
// Resize Each Column to its Minimum Width
table_width = _bounds.origin.x;
enumerator = [_tableColumns objectEnumerator];
while ((tb = [enumerator nextObject]) != nil)
{
// Compute min width of column
width = [[tb headerCell] cellSize].width;
for (row = 0; row < _numberOfRows; row++)
{
cell = [self preparedCellAtColumn: [_tableColumns indexOfObject: tb]
row: row];
[cell setObjectValue: [_dataSource tableView: self
objectValueForTableColumn: tb
row: row]];
[self _willDisplayCell: cell
forTableColumn: tb
row: row];
candidate_width = [cell cellSize].width;
if (_drawsGrid)
candidate_width += 4;
if (candidate_width > width)
{
width = candidate_width;
}
}
width += _intercellSpacing.width;
[tb setWidth: width];
// It is necessary to ask the column for the width, since it might have
// been changed by the column to constrain it to a min or max width
table_width += [tb width];
}
// Second Step
// If superview (clipview) is bigger than that, divide remaining space
// between all columns
if ((_super_view != nil) && (_numberOfColumns > 0))
{
float excess_width;
excess_width = NSMaxX ([self convertRect: [_super_view bounds]
fromView: _super_view]);
excess_width -= table_width;
// Since we resized each column at its minimum width,
// it's useless to try shrinking more: we can't
if (excess_width <= 0)
{
_tilingDisabled = NO;
[self tile];
NSLog(@"exiting sizeToFit");
return;
}
excess_width = excess_width / _numberOfColumns;
enumerator = [_tableColumns objectEnumerator];
while ((tb = [enumerator nextObject]) != nil)
{
[tb setWidth: ([tb width] + excess_width)];
}
}
_tilingDisabled = NO;
[self tile];
NSLog(@"exiting sizeToFit");
}
*/
- (void) noteNumberOfRowsChanged
{