* Print a button */
| 432 | * Print a button |
| 433 | */ |
| 434 | void print_button(WINDOW * win, const char *label, int y, int x, int selected) |
| 435 | { |
| 436 | int i, temp; |
| 437 | |
| 438 | wmove(win, y, x); |
| 439 | wattrset(win, selected ? dlg.button_active.atr |
| 440 | : dlg.button_inactive.atr); |
| 441 | waddstr(win, "<"); |
| 442 | temp = strspn(label, " "); |
| 443 | label += temp; |
| 444 | wattrset(win, selected ? dlg.button_label_active.atr |
| 445 | : dlg.button_label_inactive.atr); |
| 446 | for (i = 0; i < temp; i++) |
| 447 | waddch(win, ' '); |
| 448 | wattrset(win, selected ? dlg.button_key_active.atr |
| 449 | : dlg.button_key_inactive.atr); |
| 450 | waddch(win, label[0]); |
| 451 | wattrset(win, selected ? dlg.button_label_active.atr |
| 452 | : dlg.button_label_inactive.atr); |
| 453 | waddstr(win, (char *)label + 1); |
| 454 | wattrset(win, selected ? dlg.button_active.atr |
| 455 | : dlg.button_inactive.atr); |
| 456 | waddstr(win, ">"); |
| 457 | wmove(win, y, x + temp + 1); |
| 458 | } |
| 459 | |
| 460 | /* |
| 461 | * Draw a rectangular box with line drawing characters |
no outgoing calls
no test coverage detected