예제 #1
0
void maketestui(void)
{
    muiObject *l1, *l2, *l3, *b1, *b2, *b3, *b4, *t;
    int xmin, ymin, xmax, ymax;

    muiNewUIList(1);
    l1 = muiNewBoldLabel(10, 475, "Directory:");
    muiAddToUIList(1, l1);
    l4 = muiNewLabel(80, 475, "./");
    muiAddToUIList(1, l4);
    l2 = muiNewBoldLabel(10, 430, "Set directory:");
    muiAddToUIList(1, l2);
    b1 = muiNewButton(10, 100, 390, 415);
    muiLoadButton(b1, "Up");
    muiAddToUIList(1, b1);
    muiSetCallback(b1, handleupdir);
    b2 = muiNewButton(10, 100, 355, 380);
    muiLoadButton(b2, "Original");
    muiAddToUIList(1, b2);
    muiSetCallback(b2, handleoriginal);
    tl = muiNewTextList(120, 80, 370, 22);
    muiAddToUIList(1, tl);
    muiGetObjectSize(tl, &xmin, &ymin, &xmax, &ymax);
    vs = muiNewVSlider(xmax, ymin+2, ymax, 0, THUMBHEIGHT);
    muiSetVSValue(vs, 1.0);
    muiSetVSArrowDelta(vs, 10);
    muiAddToUIList(1, vs);
    t = muiNewTextbox(120, 390, 40);
    muiSetActive(t, 1);
    muiAddToUIList(1, t);
    muiSetCallback(t, handletextbox);
    l3 = muiNewBoldLabel(40, 50, "Open File:");
    muiAddToUIList(1, l3);
    b3 = muiNewButton(130, 230, 9, 34);
    muiLoadButton(b3, "Accept");
    muiSetCallback(b3, handleaccept);
    muiAddToUIList(1, b3);
    b4 = muiNewButton(250, 350, 9, 34);
    muiLoadButton(b4, "Cancel");
    muiSetCallback(b4, handlecancel);
    muiAddToUIList(1, b4);
    muiSetCallback(vs, controltltop);
    muiSetCallback(tl, handlefileselection);
    
    cd(directory);
    strcpy(originaldir, directory);
}
예제 #2
0
void maketestui(void)
{
    int xmin, ymin, xmax, ymax;

    maketestmenus();
    muiNewUIList(1);	/* makes an MUI display list (number 1) */
    b1 = muiNewButton(10, 100, 10, 35);
    b2 = muiNewButton(10, 100, 40, 65);
    b3 = muiNewButton(10, 100, 70, 95);
    rb1 = muiNewRadioButton(10, 380);
    muiLoadButton(rb1, "Radio1");
    rb2 = muiNewRadioButton(10, 350);
    muiLoadButton(rb2, "Radio2");
    rb3 = muiNewRadioButton(10, 320);
    muiLoadButton(rb3, "Radio3");
    muiLinkButtons(rb1, rb2);
    muiLinkButtons(rb2, rb3);
    trb1 = muiNewTinyRadioButton(10, 450);
    muiLoadButton(trb1, "TRadio1");
    trb2 = muiNewTinyRadioButton(10, 430);
    muiLoadButton(trb2, "TRadio2");
    trb3 = muiNewTinyRadioButton(10, 410);
    muiLoadButton(trb3, "TRadio3");
    muiLinkButtons(trb1, trb2);
    muiLinkButtons(trb2, trb3);
    t = muiNewTextbox(110, 250, 50);
    muiSetActive(t, 1);
    t1 = muiNewTextbox(110, 270, 20);
    l = muiNewLabel(110, 85, "Label");
    l1 = muiNewBoldLabel(110, 110, "Bold Label");
    tl = muiNewTextList(20, 120, 200, 9);
    muiGetObjectSize(tl, &xmin, &ymin, &xmax, &ymax);
    vs = muiNewVSlider(xmax, ymin+2, ymax, 0, THUMBHEIGHT);
    hs = muiNewHSlider(20, 290, 280, 0, THUMBHEIGHT);
    muiSetVSValue(vs, 1.0);
    muiSetVSArrowDelta(vs, (ymax-ymin-10-THUMBHEIGHT-ARROWSPACE)/((sizeof strs)/(sizeof (char *))-9));
    muiLoadButton(b1, "Test");
    muiLoadButton(b2, "Test22");
    muiLoadButton(b3, "Test3");
    muiSetCallback(b3, bcallback);
    pd = muiNewPulldown();
    muiAddPulldownEntry(pd, "File", M1, 0);
    muiAddPulldownEntry(pd, "Edit", M2, 0);
    muiAddPulldownEntry(pd, "Help", M3, 1);
    muiSetTLStrings(tl, strs);
    muiSetCallback(vs, controltltop);
}