* Find menu item in list given a line number on the window */
| 1498 | * Find menu item in list given a line number on the window |
| 1499 | */ |
| 1500 | static short |
| 1501 | ListCoordinateToItem(NhWindow *aWin, short Row) |
| 1502 | { |
| 1503 | int i, item = -1; |
| 1504 | MacMHMenuItem *mi; |
| 1505 | |
| 1506 | HLock((char **) aWin->menuInfo); |
| 1507 | for (i = 0, mi = *aWin->menuInfo; i < aWin->miLen; i++, mi++) { |
| 1508 | if (mi->line == Row + aWin->scrollPos) { |
| 1509 | item = i; |
| 1510 | break; |
| 1511 | } |
| 1512 | } |
| 1513 | HUnlock((char **) aWin->menuInfo); |
| 1514 | return item; |
| 1515 | } |
| 1516 | |
| 1517 | static pascal void |
| 1518 | MoveScrollBar(ControlHandle theBar, short part) |