* Draw a rectangular box with line drawing characters */
| 461 | * Draw a rectangular box with line drawing characters |
| 462 | */ |
| 463 | void |
| 464 | draw_box(WINDOW * win, int y, int x, int height, int width, |
| 465 | chtype box, chtype border) |
| 466 | { |
| 467 | int i, j; |
| 468 | |
| 469 | wattrset(win, 0); |
| 470 | for (i = 0; i < height; i++) { |
| 471 | wmove(win, y + i, x); |
| 472 | for (j = 0; j < width; j++) |
| 473 | if (!i && !j) |
| 474 | waddch(win, border | ACS_ULCORNER); |
| 475 | else if (i == height - 1 && !j) |
| 476 | waddch(win, border | ACS_LLCORNER); |
| 477 | else if (!i && j == width - 1) |
| 478 | waddch(win, box | ACS_URCORNER); |
| 479 | else if (i == height - 1 && j == width - 1) |
| 480 | waddch(win, box | ACS_LRCORNER); |
| 481 | else if (!i) |
| 482 | waddch(win, border | ACS_HLINE); |
| 483 | else if (i == height - 1) |
| 484 | waddch(win, box | ACS_HLINE); |
| 485 | else if (!j) |
| 486 | waddch(win, border | ACS_VLINE); |
| 487 | else if (j == width - 1) |
| 488 | waddch(win, box | ACS_VLINE); |
| 489 | else |
| 490 | waddch(win, box | ' '); |
| 491 | } |
| 492 | } |
| 493 | |
| 494 | /* |
| 495 | * Draw shadows along the right and bottom edge to give a more 3D look |
no outgoing calls
no test coverage detected