Make tab and shift-tab movement work.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4978 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-10-08 07:17:19 +00:00
parent a25ae95334
commit 84db9a4f0b
5 changed files with 238 additions and 4 deletions

View file

@ -1761,6 +1761,64 @@ static NSRecursiveLock *windowsLock;
return NO;
}
- (void) selectKeyViewFollowingView: (NSView *)aView
{
NSView *theView = nil;
if ([aView isKindOfClass: viewClass])
theView = [aView nextValidKeyView];
if (theView)
[self makeFirstResponder: theView];
}
- (void) selectKeyViewPrecedingView: (NSView *)aView
{
NSView *theView = nil;
if ([aView isKindOfClass: viewClass])
theView = [aView previousValidKeyView];
if (theView)
[self makeFirstResponder: theView];
}
- (void) selectNextKeyView: (id)sender
{
NSView *theView = nil;
if ([first_responder isKindOfClass: viewClass])
theView = [first_responder nextValidKeyView];
if (!theView)
{
if ([_initial_first_responder acceptsFirstResponder])
theView = _initial_first_responder;
else
theView = [_initial_first_responder nextValidKeyView];
}
if (theView)
[self makeFirstResponder: theView];
}
- (void) selectPreviousKeyView: (id)sender
{
NSView *theView = nil;
if ([first_responder isKindOfClass: viewClass])
theView = [first_responder previousValidKeyView];
if (!theView)
{
if ([_initial_first_responder acceptsFirstResponder])
theView = _initial_first_responder;
else
theView = [_initial_first_responder previousValidKeyView];
}
if (theView)
[self makeFirstResponder: theView];
}
/*
* Dragging
*/