--- gui.orig/Source/NSProgressIndicator.m Mon Apr 14 02:03:09 2003 +++ gui.mod/Source/NSProgressIndicator.m Sun Apr 20 19:24:36 2003 @@ -27,6 +27,7 @@ #include #include #include +#include @implementation NSProgressIndicator @@ -223,6 +224,7 @@ - (void)drawRect:(NSRect)rect { NSRect r; + int offset=0; // Draw the Bezel if (_isBezeled) @@ -232,6 +234,7 @@ NSDrawGrayBezel(_bounds, rect); // Calc the inside rect to be drawn r = NSInsetRect(_bounds, borderSize.width, borderSize.height); + offset=2; } else r = _bounds; @@ -258,11 +261,71 @@ r = NSIntersectionRect(r,rect); if (!NSIsEmptyRect(r)) { - [fillColour set]; - NSRectFill(r); + //Draws the stippled Progressbar + + NSImage* stippledImage = [NSImage imageNamed: @"common_Stippled"]; + if (stippledImage != nil) { + float posX = r.origin.x; + float posY = r.origin.y; + float max = r.origin.x + r.size.width+1; + float maxY = r.origin.y + r.size.height-1; + float height = [stippledImage size].height; + float width = [stippledImage size].width; + + + RETAIN(stippledImage); + + while (posY < maxY) { + while (posX < max) + { + [stippledImage compositeToPoint: NSMakePoint (posX,posY) fromRect: NSMakeRect(0, 0, r.size.width-posX+offset+1, r.size.height-posY+offset) operation: NSCompositeCopy]; + posX += width; + } + posX = r.origin.x; + posY += height; + } + RELEASE(stippledImage); + } + } } + + } + + //Draws the Marks + double perc, step; + int count; + + if ((rect.size.height >= 15) && (rect.size.width >= 79)) { + step = ((rect.size.width) / 100.0) * 5.0; + + perc = ( _doubleValue - _minValue) * 100 / (_maxValue - _minValue); + + [[NSColor darkGrayColor] set]; + + for (count = 1; count < 20; count++) { + + if (count == 10) { + // 50% Mark + [[NSColor blackColor] set]; + NSRectFill (NSMakeRect(count*step, offset, 1, r.size.height/1.5)); + [[NSColor darkGrayColor] set]; + } + else if (( count % 2) == 0) + // 10% Marks + NSRectFill (NSMakeRect(count*step,offset, 1, r.size.height/2)); + else + // 5% Marks + NSRectFill (NSMakeRect(count*step, offset, 1, r.size.height/4)); + + } + } + + //Draws the Marker + + [[NSColor blackColor] set]; + NSRectFill (NSMakeRect(r.size.width+offset, offset, 1, r.size.height)); } // It does not seem that Gnustep has a copyWithZone: on NSView, it is private --- gui.orig/Source/NSScroller.m Mon Apr 14 01:45:39 2003 +++ gui.mod/Source/NSScroller.m Sun Apr 20 19:22:15 2003 @@ -827,17 +827,37 @@ - (void) drawKnobSlot { static NSRect rect; - + + NSImage* stippledImage = [NSImage imageNamed: @"common_Stippled"]; if (_cacheValid == NO) { rect = [self rectForPart: NSScrollerKnobSlot]; } - if ((_usableParts == NSOnlyScrollerArrows) || (_usableParts == NSNoScrollerParts)) - [[_window backgroundColor] set]; - else - [scrollBarColor set]; - NSRectFill (rect); + + //tiles the stippled Image on the Background + + if (stippledImage != nil) { + float posX = rect.origin.x; + float posY = rect.origin.y; + float maxX = rect.origin.x + rect.size.width; + float maxY = rect.origin.y + rect.size.height; + float height = [stippledImage size].height; + float width = [stippledImage size].width; + RETAIN(stippledImage); + + while (posY <= maxY) { + while (posX <= maxX) + { + [stippledImage compositeToPoint: NSMakePoint (posX,posY) fromRect: NSMakeRect(0,0, maxX-posX, maxY-posY) operation: NSCompositeCopy]; + posX += width; + } + posX = rect.origin.x; + posY += height; + } + RELEASE(stippledImage); + } + } - (void) highlight: (BOOL)flag --- gui.orig/Source/NSSliderCell.m Sat Feb 1 06:10:00 2003 +++ gui.mod/Source/NSSliderCell.m Sun Apr 20 19:22:55 2003 @@ -96,8 +96,30 @@ only.

*/ - (void) drawBarInside: (NSRect)rect flipped: (BOOL)flipped { - [[NSColor scrollBarColor] set]; - NSRectFill(rect); + NSImage* stippledImage = [NSImage imageNamed: @"common_Stippled"]; + + // tiles the stippled Image on the Background + + if (stippledImage != nil) { + float posX = rect.origin.x; + float posY = rect.origin.y; + float maxX = rect.origin.x + rect.size.width; + float maxY = rect.origin.y + rect.size.height; + float height = [stippledImage size].height; + float width = [stippledImage size].width; + RETAIN(stippledImage); + + while (posY <= maxY) { + while (posX <= maxX) + { + [stippledImage compositeToPoint: NSMakePoint (posX,posY) fromRect: NSMakeRect(0,0, maxX-posX, maxY-posY) operation: NSCompositeCopy]; + posX += width; + } + posX = rect.origin.x; + posY += height; + } + RELEASE(stippledImage); + } } /**