예제 #1
0
파일: grid.c 프로젝트: 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);
}
예제 #2
0
파일: grid.c 프로젝트: 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);
}
예제 #3
0
파일: grid.c 프로젝트: DrakXtools/drakx
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);
}