Updated for change in NSView ivar names; tidyup

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5722 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nico 2000-01-10 02:12:10 +00:00
parent e2dda337ad
commit b3e0fee2ce

View file

@ -1356,11 +1356,11 @@
r.origin.x = n * (_columnSize.width + NSBR_COLUMN_SEP); r.origin.x = n * (_columnSize.width + NSBR_COLUMN_SEP);
else else
r.origin.x = n * _columnSize.width; r.origin.x = n * _columnSize.width;
r.origin.y = frame.size.height - h; r.origin.y = _frame.size.height - h;
// Calculate size // Calculate size
if (column == _lastVisibleColumn) if (column == _lastVisibleColumn)
r.size.width = frame.size.width - r.origin.x; r.size.width = _frame.size.width - r.origin.x;
else else
r.size.width = _columnSize.width; r.size.width = _columnSize.width;
r.size.height = h; r.size.height = h;
@ -1699,7 +1699,7 @@
// Padding : _columnSize.width is rounded in "tile" method // Padding : _columnSize.width is rounded in "tile" method
if (column == _lastVisibleColumn) if (column == _lastVisibleColumn)
r.size.width = frame.size.width - r.origin.x; r.size.width = _frame.size.width - r.origin.x;
if (r.size.width < 0) if (r.size.width < 0)
r.size.width = 0; r.size.width = 0;
@ -1751,13 +1751,13 @@
//#define NSBTRACE_tile //#define NSBTRACE_tile
#if defined NSBTRACE_tile || defined NSBTRACE_all #if defined NSBTRACE_tile || defined NSBTRACE_all
fprintf(stderr, "NSBrowser - (void)tile - num: %d, frame: %s\n", fprintf(stderr, "NSBrowser - (void)tile - num: %d, frame: %s\n",
num, [NSStringFromRect(frame) cString]); num, [NSStringFromRect(_frame) cString]);
#endif #endif
if (num <= 0) if (num <= 0)
return; return;
_columnSize.height = frame.size.height; _columnSize.height = _frame.size.height;
// Titles (there is no real frames to resize) // Titles (there is no real frames to resize)
if (_isTitled) if (_isTitled)
@ -1768,7 +1768,7 @@
{ {
_scrollerRect.origin.x = bs.width; _scrollerRect.origin.x = bs.width;
_scrollerRect.origin.y = bs.height; _scrollerRect.origin.y = bs.height;
_scrollerRect.size.width = frame.size.width - (2 * bs.width); _scrollerRect.size.width = _frame.size.width - (2 * bs.width);
_scrollerRect.size.height = [NSScroller scrollerWidth]; _scrollerRect.size.height = [NSScroller scrollerWidth];
_columnSize.height -= [NSScroller scrollerWidth] + (2 * bs.height) _columnSize.height -= [NSScroller scrollerWidth] + (2 * bs.height)
@ -1781,10 +1781,10 @@
// Columns // Columns
if (_separatesColumns) if (_separatesColumns)
_columnSize.width = (int)((frame.size.width - ((num - 1) * NSBR_COLUMN_SEP)) _columnSize.width = (int)((_frame.size.width - ((num - 1) * NSBR_COLUMN_SEP))
/ (float)num); / (float)num);
else else
_columnSize.width = (int)(frame.size.width / (float)num); _columnSize.width = (int)(_frame.size.width / (float)num);
if (_columnSize.height < 0) if (_columnSize.height < 0)
_columnSize.height = 0; _columnSize.height = 0;
@ -2005,8 +2005,10 @@
} }
// Multiple selection // Multiple selection
else else
{
[self setLastColumn: column]; [self setLastColumn: column];
} }
}
// Send the action to target // Send the action to target
[self sendAction]; [self sendAction];
@ -2125,7 +2127,7 @@
// Horizontal scroller // Horizontal scroller
_scrollerRect.origin.x = bs.width; _scrollerRect.origin.x = bs.width;
_scrollerRect.origin.y = bs.height; _scrollerRect.origin.y = bs.height;
_scrollerRect.size.width = frame.size.width - (2 * bs.width); _scrollerRect.size.width = _frame.size.width - (2 * bs.width);
_scrollerRect.size.height = [NSScroller scrollerWidth]; _scrollerRect.size.height = [NSScroller scrollerWidth];
_horizontalScroller = [[NSScroller alloc] initWithFrame: _scrollerRect]; _horizontalScroller = [[NSScroller alloc] initWithFrame: _scrollerRect];
[_horizontalScroller setTarget: self]; [_horizontalScroller setTarget: self];
@ -2230,7 +2232,7 @@
#endif #endif
NSRectClip(rect); NSRectClip(rect);
[[window backgroundColor] set]; [[_window backgroundColor] set];
NSRectFill(rect); NSRectFill(rect);
// Load the first column if not already done // Load the first column if not already done
@ -2268,8 +2270,8 @@
scrollerBorderRect.size.width += 2 * bs.width; scrollerBorderRect.size.width += 2 * bs.width;
scrollerBorderRect.size.height += 2 * bs.height; scrollerBorderRect.size.height += 2 * bs.height;
if (! NSIsEmptyRect(NSIntersectionRect(scrollerBorderRect, rect)) && if (! NSIsEmptyRect(NSIntersectionRect(scrollerBorderRect, rect))
[self window]) && _window)
{ {
[self lockFocus]; [self lockFocus];
NSDrawGrayBezel(scrollerBorderRect, rect); NSDrawGrayBezel(scrollerBorderRect, rect);
@ -2517,7 +2519,7 @@
- (void)_performLoadOfColumn: (int)column - (void)_performLoadOfColumn: (int)column
{ {
id bc, sc, matrix; id bc, sc, matrix = nil;
NSRect matrixRect = {{0, 0}, {100, 100}}; NSRect matrixRect = {{0, 0}, {100, 100}};
#if defined NSBTRACE__performLoadOfColumn || defined NSBTRACE_all #if defined NSBTRACE__performLoadOfColumn || defined NSBTRACE_all
@ -2714,7 +2716,7 @@
if (_isTitled) if (_isTitled)
{ {
NSRect r = [self titleFrameOfColumn: _firstVisibleColumn]; NSRect r = [self titleFrameOfColumn: _firstVisibleColumn];
r.size.width = frame.size.width; r.size.width = _frame.size.width;
[self setNeedsDisplayInRect: r]; [self setNeedsDisplayInRect: r];
} }
} }