uiBox *makePage13(void) { uiBox *page13; uiRadioButtons *rb; uiButton *b; uiForm *f; uiEntry *e; uiProgressBar *p; page13 = newVerticalBox(); rb = uiNewRadioButtons(); uiRadioButtonsAppend(rb, "Item 1"); uiRadioButtonsAppend(rb, "Item 2"); uiRadioButtonsAppend(rb, "Item 3"); uiBoxAppend(page13, uiControl(rb), 0); rb = uiNewRadioButtons(); uiRadioButtonsAppend(rb, "Item A"); uiRadioButtonsAppend(rb, "Item B"); uiBoxAppend(page13, uiControl(rb), 0); b = uiNewButton("Horizontal"); uiButtonOnClicked(b, buttonClicked, uiNewHorizontalBox); uiBoxAppend(page13, uiControl(b), 0); b = uiNewButton("Vertical"); uiButtonOnClicked(b, buttonClicked, uiNewVerticalBox); uiBoxAppend(page13, uiControl(b), 0); f = newForm(); e = uiNewPasswordEntry(); uiEntryOnChanged(e, entryChanged, "password"); uiFormAppend(f, "Password Entry", uiControl(e), 0); e = uiNewSearchEntry(); uiEntryOnChanged(e, entryChanged, "search"); uiFormAppend(f, "Search Box", uiControl(e), 0); uiFormAppend(f, "MLE", uiControl(uiNewMultilineEntry()), 1); p = uiNewProgressBar(); uiProgressBarSetValue(p, 50); uiBoxAppend(page13, uiControl(p), 0); b = uiNewButton("Toggle Indeterminate"); uiButtonOnClicked(b, setIndeterminate, p); uiBoxAppend(page13, uiControl(b), 0); b = uiNewButton("Show/Hide"); uiButtonOnClicked(b, showHide, e); uiBoxAppend(page13, uiControl(b), 0); b = uiNewButton("Delete First"); uiButtonOnClicked(b, deleteFirst, f); uiBoxAppend(page13, uiControl(b), 0); uiBoxAppend(page13, uiControl(f), 1); return page13; }
static Janet janet_ui_entry_on_changed(int32_t argc, Janet *argv) { janet_fixarity(argc, 2); uiEntry *entry = janet_getuitype(argv, 0, &entry_td); assert_callable(argv, 1); void *handle = janet_ui_to_handler_data(argv[1]); uiEntryOnChanged(entry, on_entry_changed, handle); return argv[0]; }
uiGroup *makePage7a(void) { uiGroup *group; uiBox *box, *box2; handler.ah.Draw = handlerDraw; handler.ah.MouseEvent = handlerMouseEvent; handler.ah.MouseCrossed = handlerMouseCrossed; handler.ah.DragBroken = handlerDragBroken; handler.ah.KeyEvent = handlerKeyEvent; group = newGroup("Arc Test"); box = newVerticalBox(); uiGroupSetChild(group, uiControl(box)); area = uiNewArea((uiAreaHandler *) (&handler)); uiBoxAppend(box, uiControl(area), 1); box2 = newHorizontalBox(); uiBoxAppend(box, uiControl(box2), 0); uiBoxAppend(box2, uiControl(uiNewLabel("Start Angle")), 0); startAngle = uiNewEntry(); uiEntryOnChanged(startAngle, entryChanged, NULL); uiBoxAppend(box2, uiControl(startAngle), 1); box2 = newHorizontalBox(); uiBoxAppend(box, uiControl(box2), 0); uiBoxAppend(box2, uiControl(uiNewLabel("Sweep")), 0); sweep = uiNewEntry(); uiEntryOnChanged(sweep, entryChanged, NULL); uiBoxAppend(box2, uiControl(sweep), 1); negative = uiNewCheckbox("Negative"); uiCheckboxOnToggled(negative, checkboxToggled, NULL); uiBoxAppend(box, uiControl(negative), 0); radians = uiNewCheckbox("Radians"); uiCheckboxOnToggled(radians, checkboxToggled, NULL); uiBoxAppend(box, uiControl(radians), 0); return group; }
uiBox *makePage13(void) { uiBox *page13; uiRadioButtons *rb; uiButton *b; uiForm *f; uiEntry *e; page13 = newVerticalBox(); rb = uiNewRadioButtons(); uiRadioButtonsAppend(rb, "Item 1"); uiRadioButtonsAppend(rb, "Item 2"); uiRadioButtonsAppend(rb, "Item 3"); uiBoxAppend(page13, uiControl(rb), 0); rb = uiNewRadioButtons(); uiRadioButtonsAppend(rb, "Item A"); uiRadioButtonsAppend(rb, "Item B"); uiBoxAppend(page13, uiControl(rb), 0); b = uiNewButton("Horizontal"); uiButtonOnClicked(b, buttonClicked, uiNewHorizontalBox); uiBoxAppend(page13, uiControl(b), 0); b = uiNewButton("Vertical"); uiButtonOnClicked(b, buttonClicked, uiNewVerticalBox); uiBoxAppend(page13, uiControl(b), 0); f = newForm(); uiBoxAppend(page13, uiControl(f), 1); e = uiNewPasswordEntry(); uiEntryOnChanged(e, entryChanged, "password"); uiFormAppend(f, "Password Entry", uiControl(e), 0); e = uiNewSearchEntry(); uiEntryOnChanged(e, entryChanged, "search"); uiFormAppend(f, "Search Box", uiControl(e), 0); uiFormAppend(f, "MLE", uiControl(uiNewMultilineEntry()), 1); return page13; }