2015-05-19 17:07:34 -05:00
|
|
|
// 19 may 2015
|
|
|
|
#include "test.h"
|
|
|
|
|
|
|
|
static uiSpinbox *spinbox;
|
2015-05-19 20:05:18 -05:00
|
|
|
static uiProgressBar *pbar;
|
2015-05-19 17:07:34 -05:00
|
|
|
|
2015-05-19 17:17:30 -05:00
|
|
|
#define CHANGED(what) \
|
|
|
|
static void on ## what ## Changed(ui ## what *this, void *data) \
|
|
|
|
{ \
|
2015-05-19 20:05:18 -05:00
|
|
|
uintmax_t value; \
|
2015-05-19 17:17:30 -05:00
|
|
|
printf("on %s changed\n", #what); \
|
2015-05-19 20:05:18 -05:00
|
|
|
value = ui ## what ## Value(this); \
|
|
|
|
uiProgressBarSetValue(pbar, value); \
|
2015-05-19 17:17:30 -05:00
|
|
|
}
|
|
|
|
CHANGED(Spinbox)
|
|
|
|
|
2015-05-19 17:07:34 -05:00
|
|
|
uiBox *makePage4(void)
|
|
|
|
{
|
|
|
|
uiBox *page4;
|
|
|
|
|
|
|
|
page4 = newVerticalBox();
|
|
|
|
|
|
|
|
spinbox = uiNewSpinbox();
|
2015-05-19 17:17:30 -05:00
|
|
|
uiSpinboxOnChanged(spinbox, onSpinboxChanged, NULL);
|
2015-05-19 17:07:34 -05:00
|
|
|
uiBoxAppend(page4, uiControl(spinbox), 0);
|
|
|
|
|
2015-05-19 20:05:18 -05:00
|
|
|
pbar = uiNewProgressBar();
|
|
|
|
uiBoxAppend(page4, uiControl(pbar), 0);
|
|
|
|
|
2015-05-19 17:07:34 -05:00
|
|
|
return page4;
|
|
|
|
}
|