Additional NSScroller implementation.

Fix locking/unlocking of focus for view hierarchy.
Numerous bug fixes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2255 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
netcrep 1997-03-20 19:23:21 +00:00
parent 0a72d4bd4d
commit bf12b45df0
8 changed files with 219 additions and 70 deletions

View file

@ -104,11 +104,12 @@ NSString *NSControlTextDidChangeNotification = @"NSControlTextDidChangeNotificat
- copyWithZone:(NSZone *)zone
{
id c;
c = NSAllocateObject (isa, 0, zone);
c = NSCopyObject (self, 0, zone);
NSLog(@"NSControl: copyWithZone\n");
// make sure the new copy also has a new copy of the cell
[cell retain];
[c setCell: [[cell copy] autorelease]];
return c;
}
@ -296,12 +297,22 @@ right:(unsigned)rightDigits
//
- (void)drawCell:(NSCell *)aCell
{
if (cell == aCell) [cell drawWithFrame:bounds inView:self];
if (cell == aCell)
{
[self lockFocus];
[cell drawWithFrame:bounds inView:self];
[self unlockFocus];
}
}
- (void)drawCellInside:(NSCell *)aCell
{
if (cell == aCell) [cell drawInteriorWithFrame:bounds inView:self];
if (cell == aCell)
{
[self lockFocus];
[cell drawInteriorWithFrame:bounds inView:self];
[self unlockFocus];
}
}
- (void)selectCell:(NSCell *)aCell