Moved the spinbox to a new test page Page 4.

This commit is contained in:
Pietro Gagliardi 2015-05-19 18:07:34 -04:00
parent 31aaf78718
commit 13f926b397
5 changed files with 24 additions and 2 deletions

View File

@ -6,6 +6,7 @@ testCFILES = \
test/page1.c \ test/page1.c \
test/page2.c \ test/page2.c \
test/page3.c \ test/page3.c \
test/page4.c \
test/spaced.c test/spaced.c
testHFILES = \ testHFILES = \

View File

@ -39,7 +39,7 @@ int main(int argc, char *argv[])
int i; int i;
const char *err; const char *err;
uiWindow *w; uiWindow *w;
uiBox *page2, *page3; uiBox *page2, *page3, *page4;
int nomenus = 0; int nomenus = 0;
memset(&o, 0, sizeof (uiInitOptions)); memset(&o, 0, sizeof (uiInitOptions));
@ -84,6 +84,9 @@ int main(int argc, char *argv[])
page3 = makePage3(); page3 = makePage3();
uiTabAppend(mainTab, "Page 3", uiControl(page3)); uiTabAppend(mainTab, "Page 3", uiControl(page3));
page4 = makePage4();
uiTabAppend(mainTab, "Page 4", uiControl(page4));
uiControlShow(uiControl(w)); uiControlShow(uiControl(w));
uiMain(); uiMain();
printf("after uiMain()\n"); printf("after uiMain()\n");

View File

@ -106,7 +106,6 @@ uiBox *makePage2(void)
button = uiNewButton(moveOutText); button = uiNewButton(moveOutText);
uiButtonOnClicked(button, movePage1, NULL); uiButtonOnClicked(button, movePage1, NULL);
uiBoxAppend(hbox, uiControl(button), 0); uiBoxAppend(hbox, uiControl(button), 0);
uiBoxAppend(hbox, uiControl(uiNewSpinbox()), 1);
uiBoxAppend(page2, uiControl(hbox), 0); uiBoxAppend(page2, uiControl(hbox), 0);
moveBack = 0; moveBack = 0;

16
redo/test/page4.c Normal file
View File

@ -0,0 +1,16 @@
// 19 may 2015
#include "test.h"
static uiSpinbox *spinbox;
uiBox *makePage4(void)
{
uiBox *page4;
page4 = newVerticalBox();
spinbox = uiNewSpinbox();
uiBoxAppend(page4, uiControl(spinbox), 0);
return page4;
}

View File

@ -33,3 +33,6 @@ extern uiBox *makePage2(void);
// page3.c // page3.c
extern uiBox *makePage3(void); extern uiBox *makePage3(void);
// page4.c
extern uiBox *makePage4(void);