mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 22:50:59 +00:00
Added method [acceptsFirstResponder], which asks the cell if it
accepts first responder. Added [becomeFirstResponder] and [resignFirstResponder] that redraw if the cell may change apprearance. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16178 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a3580a4caf
commit
247d0a905b
1 changed files with 27 additions and 0 deletions
|
@ -479,6 +479,33 @@ static Class actionCellClass;
|
||||||
[[self selectedCell] setRefusesFirstResponder: flag];
|
[[self selectedCell] setRefusesFirstResponder: flag];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL) acceptsFirstResponder
|
||||||
|
{
|
||||||
|
return [[self selectedCell] acceptsFirstResponder];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL) becomeFirstResponder
|
||||||
|
{
|
||||||
|
if ([[self selectedCell] showsFirstResponder])
|
||||||
|
{
|
||||||
|
// As this may add a dotted border round our cell, redraw.
|
||||||
|
[self setNeedsDisplay: YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL) resignFirstResponder
|
||||||
|
{
|
||||||
|
if ([[self selectedCell] showsFirstResponder])
|
||||||
|
{
|
||||||
|
// As this may remove the dotted border round our cell, redraw.
|
||||||
|
[self setNeedsDisplay: YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tracking the Mouse
|
* Tracking the Mouse
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue