Exemplo n.º 1
0
Arquivo: grid.c Projeto: gitpan/Newt
void newtGridWrappedWindow(newtGrid grid, char * title) {
    int width, height;

    newtGridGetSize(grid, &width, &height);
    newtCenteredWindow(width + 2, height + 2, title);
    newtGridPlace(grid, 1, 1);
}
Exemplo n.º 2
0
Arquivo: grid.c Projeto: gitpan/Newt
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);
}
Exemplo n.º 3
0
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);
}