Fix some bugs

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2516 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Scott Christley 1997-10-16 19:55:54 +00:00
parent fda03efc14
commit 139d69efb8
5 changed files with 20 additions and 7 deletions

View file

@ -1,3 +1,11 @@
Thu Oct 16 12:28:00 1997 Scott Christley <scottc@stetson.net-community.com>
* config.mak.in: Delete.
* Headers/gnustep/gui/NSScrollView.h: Correct datatype.
* Headers/gnustep/gui/NSWindow.h: Declare NSMutableArray.
* Source/NSMenu.m (-drawRect:): Handle rounding errors.
* Source/NSScrollView.m: Correct datatype.
Mon Oct 13 16:17:45 1997 Ovidiu Predescu <ovidiu@net-community.com>
* Source/NSMatrix.m: Removed commented out portions of code.

View file

@ -77,8 +77,8 @@
- (NSBorderType)borderType;
/* Managing the scrolled views */
- (void)setContentView:(NSClipView*)aView;
- (NSClipView*)contentView;
- (void)setContentView:(NSView*)aView;
- (NSView*)contentView;
- (void)setDocumentView:(NSView*)aView;
- (id)documentView;
- (void)setDocumentCursor:(NSCursor*)aCursor;

View file

@ -36,6 +36,7 @@
@class NSString;
@class NSArray;
@class NSMutableArray;
@class NSData;
@class NSDictionary;
@class NSNotification;

View file

@ -37,6 +37,7 @@
#include <AppKit/NSEvent.h>
#include <AppKit/NSFont.h>
#include <AppKit/NSMenu.h>
#include <math.h>
#define ASSIGN(variable, value) \
[value retain]; \
@ -207,12 +208,15 @@ static NSFont* menuFont = nil;
int max, howMany;
NSRect intRect = {{0, 0}, {0, 0}};
max = count - rect.origin.y / (cellSize.height + INTERCELL_SPACE);
howMany = rect.size.height / (cellSize.height + INTERCELL_SPACE);
// If there are no cells then just return
if (count == 0) return;
max = ceil((float)count - rect.origin.y / (cellSize.height + INTERCELL_SPACE));
howMany = ceil(rect.size.height / (cellSize.height + INTERCELL_SPACE));
intRect.origin.y = (count - max) * (cellSize.height + INTERCELL_SPACE);
intRect.size = cellSize;
for (i = max - 1; howMany >= 0; i--, howMany--) {
for (i = max - 1; howMany > 0; i--, howMany--) {
id aCell = [cells objectAtIndex:i];
[aCell drawWithFrame:intRect inView:self];

View file

@ -117,7 +117,7 @@ static Class rulerViewClass = nil;
[super dealloc];
}
- (void)setContentView:(NSClipView*)aView
- (void)setContentView:(NSView*)aView
{
ASSIGN(_contentView, aView);
[self addSubview:_contentView];
@ -407,7 +407,7 @@ static Class rulerViewClass = nil;
- (BOOL)hasVerticalScroller { return _hasVertScroller; }
- (BOOL)hasHorizontalRuler { return _hasHorizRuler; }
- (NSSize)contentSize { return [_contentView bounds].size; }
- (NSClipView*)contentView { return _contentView; }
- (NSView*)contentView { return _contentView; }
- (NSRulerView*)horizontalRulerView { return _horizRuler; }
- (BOOL)hasVerticalRuler { return _hasVertRuler; }
- (NSRulerView*)verticalRulerView { return _vertRuler; }