int main(int argc, char **argv) { Ihandle *dg, *tree, *sbox, *ml, *cv, *sbox2, *vbox, *lb, *sbox3; IupOpen(&argc, &argv); IupControlsOpen(); tree = createtree(); IupSetAttribute(tree, "EXPAND", "YES"); sbox = IupSbox(tree); IupSetAttribute(sbox, "DIRECTION", "EAST"); cv = IupCanvas(NULL); IupSetAttribute(cv, "EXPAND", "YES"); ml = IupMultiLine(""); IupSetAttribute(ml, "EXPAND", "YES"); sbox2 = IupSbox(ml); IupSetAttribute(sbox2, "DIRECTION", "WEST"); vbox = IupHbox(sbox, cv, sbox2, NULL); lb = IupLabel("This is a label"); IupSetAttribute(lb, "EXPAND", "NO"); sbox3 = IupSbox(lb); IupSetAttribute(sbox3, "DIRECTION", "NORTH"); dg = IupDialog(IupVbox(vbox, sbox3, NULL)); IupSetAttribute(dg, "TITLE", "IupSbox Example"); IupShow(dg); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }
int main(int argc, char **argv) { Ihandle *dlg, *bt, *box, *lbl, *ml, *vbox; IupOpen(&argc, &argv); bt = IupButton("Button", NULL); //IupSetAttribute(bt, "EXPAND", "VERTICAL"); /* This is the only necessary EXPAND */ IupSetAttribute(bt, "EXPAND", "YES"); box = IupSbox(bt); IupSetAttribute(box, "DIRECTION", "SOUTH"); /* place at the bottom of the button */ // IupSetAttribute(box, "COLOR", "0 255 0"); ml = IupMultiLine(NULL); IupSetAttribute(ml, "EXPAND", "YES"); IupSetAttribute(ml, "VISIBLELINES", "5"); vbox = IupVbox(box, ml, NULL); lbl = IupLabel("Label"); IupSetAttribute(lbl, "EXPAND", "VERTICAL"); dlg = IupDialog(IupHbox(vbox, lbl, NULL)); IupSetAttribute(dlg, "TITLE", "IupSbox Example"); IupSetAttribute(dlg, "MARGIN", "10x10"); IupSetAttribute(dlg, "GAP", "10"); IupShow(dlg); IupMainLoop(); IupDestroy(dlg); IupClose(); return 1; }
int main(int argc, char **argv) { IupOpen(&argc, &argv); IupControlsOpen(); bt = IupButton("Test", ""); IupSetAttribute(bt, "EXPAND", "YES"); box = IupSbox(bt); IupSetAttribute(box, "DIRECTION", "SOUTH"); ml = IupMultiLine(NULL); IupSetAttribute(ml, IUP_EXPAND, "YES"); vbox = IupVbox(box, ml, NULL); lb = IupLabel("Label"); IupSetAttribute(lb, IUP_EXPAND, "YES"); dg = IupDialog(IupHbox(vbox, IupFrame(lb), NULL)); IupSetAttribute(dg, IUP_MARGIN, "10x20"); //IupSetAttribute(dg,"COMPOSITED", "YES"); //IupSetAttribute(dg,"LAYERED", "YES"); //IupSetAttribute(dg,"LAYERALPHA", "192"); IupShow(dg); IupMainLoop(); IupDestroy(dg); IupControlsClose(); IupClose(); return 1; }
static int Sbox(lua_State *L) { Ihandle *ih = IupSbox(iuplua_checkihandleornil(L, 1)); iuplua_plugstate(L, ih); iuplua_pushihandle_raw(L, ih); return 1; }
static void CreateSbox(void) { int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); lua_pushusertag(IupSbox(iuplua_checkihandle(1)), tag); }