5
/* if they try and pack more then 50 buttons, screw 'em */
6
newtGrid newtButtonBarv(char * button1, newtComponent * b1comp, va_list args) {
10
newtComponent * compPtr;
15
buttons[0].name = button1, buttons[0].compPtr = b1comp, num = 1;
17
buttons[num].name = va_arg(args, char *);
18
if (!buttons[num].name) break;
19
buttons[num].compPtr = va_arg(args, newtComponent *);
23
grid = newtCreateGrid(num, 1);
25
for (i = 0; i < num; i++) {
26
*buttons[i].compPtr = newtButton(-1, -1, buttons[i].name);
27
newtGridSetField(grid, i, 0, NEWT_GRID_COMPONENT,
29
num ? 1 : 0, 0, 0, 0, 0, 0);
35
newtGrid newtButtonBar(char * button1, newtComponent * b1comp, ...) {
39
va_start(args, b1comp);
41
grid = newtButtonBarv(button1, b1comp, args);