#include "test.h"
static uiBox *makeSet(int omit, int hidden, int stretch)
{
uiBox *hbox;
uiButton *buttons[4];
hbox = (*newhbox)();
uiBoxSetPadded(hbox, 1);
if (omit != 0) {
buttons[0] = uiNewButton("First");
uiBoxAppend(hbox, uiControl(buttons[0]), stretch);
}
if (omit != 1) {
buttons[1] = uiNewButton("Second");
uiBoxAppend(hbox, uiControl(buttons[1]), stretch);
}
if (omit != 2) {
buttons[2] = uiNewButton("Third");
uiBoxAppend(hbox, uiControl(buttons[2]), stretch);
}
if (omit != 3) {
buttons[3] = uiNewButton("Fourth");
uiBoxAppend(hbox, uiControl(buttons[3]), stretch);
}
if (hidden != -1)
uiControlHide(uiControl(buttons[hidden]));
return hbox;
}
uiBox *makePage3(void)
{
uiBox *page3;
uiBox *hbox;
uiBox *hbox2;
uiBox *vbox;
int hidden;
page3 = newVerticalBox();
for (hidden = 0; hidden < 4; hidden++) {
hbox2 = (*newhbox)();
vbox = (*newvbox)();
hbox = makeSet(hidden, -1, 0);
uiBoxAppend(vbox, uiControl(hbox), 0);
hbox = makeSet(-1, hidden, 0);
uiBoxAppend(vbox, uiControl(hbox), 0);
uiBoxAppend(hbox2, uiControl(vbox), 0);
uiBoxAppend(hbox2, uiControl(uiNewButton("Right Margin Test")), 1);
uiBoxAppend(page3, uiControl(hbox2), 0);
}
for (hidden = 0; hidden < 4; hidden++) {
hbox = makeSet(-1, hidden, 1);
uiBoxAppend(page3, uiControl(hbox), 0);
}
return page3;
}