| 2359 | } |
| 2360 | |
| 2361 | static void |
| 2362 | MsgUpdate(NhWindow *wind) |
| 2363 | { |
| 2364 | RgnHandle org_clip = NewRgn(), clip = NewRgn(); |
| 2365 | Rect r; |
| 2366 | int l; |
| 2367 | |
| 2368 | GetClip(org_clip); |
| 2369 | GetWindowBounds(wind->its_window, kWindowContentRgn, &r); |
| 2370 | OffsetRect(&r, -r.left, -r.top); |
| 2371 | |
| 2372 | DrawControls(wind->its_window); |
| 2373 | DrawGrowIcon(wind->its_window); |
| 2374 | |
| 2375 | for (l = 0; topl_resp[l]; l++) { |
| 2376 | StringPtr name; |
| 2377 | unsigned char tmp[2]; |
| 2378 | FontInfo font; |
| 2379 | Rect frame; |
| 2380 | topl_resp_rect(l, &frame); |
| 2381 | switch (topl_resp[l]) { |
| 2382 | case 'y': |
| 2383 | name = "\pyes"; |
| 2384 | break; |
| 2385 | case 'n': |
| 2386 | name = "\pno"; |
| 2387 | break; |
| 2388 | case 'N': |
| 2389 | name = "\pNone"; |
| 2390 | break; |
| 2391 | case 'a': |
| 2392 | name = "\pall"; |
| 2393 | break; |
| 2394 | case 'q': |
| 2395 | name = "\pquit"; |
| 2396 | break; |
| 2397 | case CHAR_ANY: |
| 2398 | name = "\pany key"; |
| 2399 | break; |
| 2400 | default: |
| 2401 | tmp[0] = 1; |
| 2402 | tmp[1] = topl_resp[l]; |
| 2403 | name = tmp; |
| 2404 | break; |
| 2405 | } |
| 2406 | TextFont(kFontIDGeneva); |
| 2407 | TextSize(9); |
| 2408 | GetFontInfo(&font); |
| 2409 | MoveTo((frame.left + frame.right - StringWidth(name)) / 2, |
| 2410 | (frame.top + frame.bottom + font.ascent - font.descent |
| 2411 | - font.leading - 1) / 2); |
| 2412 | DrawString(name); |
| 2413 | PenNormal(); |
| 2414 | if (l == topl_def_idx) |
| 2415 | PenSize(2, 2); |
| 2416 | FrameRoundRect(&frame, 4, 4); |
| 2417 | } |
| 2418 |
no test coverage detected