MCPcopy Create free account
hub / github.com/Entware/Entware / print_title

Function print_title

scripts/config/lxdialog/util.c:352–361  ·  view source on GitHub ↗

Print the title of the dialog. Center the title and truncate * tile if wider than dialog (- 2 chars). **/

Source from the content-addressed store, hash-verified

350 * tile if wider than dialog (- 2 chars).
351 **/
352void 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

Callers 5

dialog_yesnoFunction · 0.85
dialog_textboxFunction · 0.85
dialog_checklistFunction · 0.85
dialog_menuFunction · 0.85
dialog_inputboxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected