Implement NSMatrix -setEnabled:. It enables or disables all cells as

in Cocoa.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31823 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2011-01-03 07:51:11 +00:00
parent f107c5484a
commit eeb4161156
2 changed files with 20 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2011-01-03 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSMatrix.m (-setEnabled:): Implement method. It enables
or disables all cells as in Cocoa.
2011-01-01 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSTextAttachment.m (-trackMouse:inRect:ofView:...): Call

View file

@ -3162,6 +3162,21 @@ static SEL getSel;
return _errorAction;
}
/**<p> Enables or disables all cells of the receiver. </p>
*/
- (void) setEnabled: (BOOL)flag
{
int i, j;
for (i = 0; i < _numRows; i++)
{
for (j = 0; j < _numCols; j++)
{
[_cells[i][j] setEnabled: flag];
}
}
}
/**<p> Sets a flag to indicate whether the matrix should permit empty
selections or should force one or mor cells to be selected at all times.
</p><p>See Also: -allowsEmptySelection</p>