mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 02:20:48 +00:00
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:
parent
a25ae95334
commit
84db9a4f0b
5 changed files with 238 additions and 4 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue