debug: change an example to test added functionality
This commit is contained in:
parent
e07bbebe93
commit
2006af51cc
|
@ -17,6 +17,13 @@ static int onShouldQuit(void *data)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uiEntry *focusable = NULL;
|
||||||
|
static void wideOnClicked(uiButton *b, void *data)
|
||||||
|
{
|
||||||
|
if (focusable)
|
||||||
|
uiControlSetFocus(uiControl(focusable));
|
||||||
|
}
|
||||||
|
|
||||||
static uiControl *makeBasicControlsPage(void)
|
static uiControl *makeBasicControlsPage(void)
|
||||||
{
|
{
|
||||||
uiBox *vbox;
|
uiBox *vbox;
|
||||||
|
@ -42,6 +49,7 @@ static uiControl *makeBasicControlsPage(void)
|
||||||
uiBoxAppend(hbox,
|
uiBoxAppend(hbox,
|
||||||
uiControl(btn),
|
uiControl(btn),
|
||||||
0);
|
0);
|
||||||
|
uiButtonOnClicked(btn, wideOnClicked, NULL);
|
||||||
|
|
||||||
uiBoxAppend(vbox,
|
uiBoxAppend(vbox,
|
||||||
uiControl(uiNewLabel("This is a label. Right now, labels can only span one line.")),
|
uiControl(uiNewLabel("This is a label. Right now, labels can only span one line.")),
|
||||||
|
@ -59,9 +67,12 @@ static uiControl *makeBasicControlsPage(void)
|
||||||
uiFormSetPadded(entryForm, 1);
|
uiFormSetPadded(entryForm, 1);
|
||||||
uiGroupSetChild(group, uiControl(entryForm));
|
uiGroupSetChild(group, uiControl(entryForm));
|
||||||
|
|
||||||
|
|
||||||
|
focusable = uiNewEntry();
|
||||||
|
|
||||||
uiFormAppend(entryForm,
|
uiFormAppend(entryForm,
|
||||||
"Entry",
|
"Entry",
|
||||||
uiControl(uiNewEntry()),
|
uiControl(focusable),
|
||||||
0);
|
0);
|
||||||
uiFormAppend(entryForm,
|
uiFormAppend(entryForm,
|
||||||
"Password Entry",
|
"Password Entry",
|
||||||
|
|
Loading…
Reference in New Issue