* Routine used to select and de-select elements in a menu window, used by * KeyMenu, * ClickMenu, and UpdateMenu. Takes the NhWindow and a line ref relative to * the scrollbar. */
| 1440 | * the scrollbar. |
| 1441 | */ |
| 1442 | static void |
| 1443 | ToggleMenuSelect(NhWindow *aWin, int line) |
| 1444 | { |
| 1445 | Rect r; |
| 1446 | |
| 1447 | GetWindowBounds(aWin->its_window, kWindowContentRgn, &r); |
| 1448 | OffsetRect(&r, -r.left, -r.top); |
| 1449 | if (aWin->scrollBar) |
| 1450 | r.right -= SBARWIDTH; |
| 1451 | r.top = line * aWin->row_height; |
| 1452 | r.bottom = r.top + aWin->row_height; |
| 1453 | |
| 1454 | LMSetHiliteMode((UInt8)(LMGetHiliteMode() & 0x7F)); |
| 1455 | InvertRect(&r); |
| 1456 | } |
| 1457 | |
| 1458 | /* |
| 1459 | * Check to see if given item is selected, return index if it is |
no outgoing calls
no test coverage detected