void newtGridWrappedWindow(newtGrid grid, char * title) { int width, height; newtGridGetSize(grid, &width, &height); newtCenteredWindow(width + 2, height + 2, title); newtGridPlace(grid, 1, 1); }
void newtGridWrappedWindowAt(newtGrid grid, char * title, int left, int top) { int width, height; newtGridGetSize(grid, &width, &height); newtOpenWindow(left, top, width + 2, height + 2, title); newtGridPlace(grid, 1, 1); }
void newtGridWrappedWindow(newtGrid grid, char * title) { int w, width, height, offset = 0; newtGridGetSize(grid, &width, &height); w = wstrlen(title,-1); if (width < w + 2) { offset = ((w + 2) - width) / 2; width = w + 2; } newtCenteredWindow(width + 2, height + 2, title); newtGridPlace(grid, 1 + offset, 1); }