Print the title of the dialog. Center the title and truncate * tile if wider than dialog (- 2 chars). **/
| 350 | * tile if wider than dialog (- 2 chars). |
| 351 | **/ |
| 352 | void print_title(WINDOW *dialog, const char *title, int width) |
| 353 | { |
| 354 | if (title) { |
| 355 | int tlen = MIN(width - 2, strlen(title)); |
| 356 | wattrset(dialog, dlg.title.atr); |
| 357 | mvwaddch(dialog, 0, (width - tlen) / 2 - 1, ' '); |
| 358 | mvwaddnstr(dialog, 0, (width - tlen)/2, title, tlen); |
| 359 | waddch(dialog, ' '); |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | /* |
| 364 | * Print a string of text in a window, automatically wrap around to the |
no outgoing calls
no test coverage detected