new routine: BOOL setFirstSelectableRow

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@600 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Giles Williams 2006-06-21 10:09:56 +00:00
parent 2f069e02b0
commit 337dd332b5
2 changed files with 17 additions and 0 deletions

View File

@ -137,6 +137,7 @@ extern int debug;
- (int) selectedRow;
- (BOOL) setSelectedRow:(int) row;
- (BOOL) setNextRow:(int) direction;
- (BOOL) setFirstSelectableRow;
- (void) setNoSelectedRow;
- (NSString *) selectedRowText;
- (NSString *) selectedRowKey;

View File

@ -280,6 +280,22 @@ Your fair use and other rights are in no way affected by the above.
return NO;
}
- (BOOL) setFirstSelectableRow
{
int row = selectableRange.location;
while ((row >= selectableRange.location) && (row < selectableRange.location+selectableRange.length))
{
if (![[rowKey objectAtIndex:row] isEqual:GUI_KEY_SKIP])
{
selectedRow = row;
return YES;
}
row++;
}
selectedRow = -1;
return NO;
}
- (void) setNoSelectedRow
{
selectedRow = -1;