static int Split(lua_State *L) { Ihandle *ih = IupSplit(iuplua_checkihandleornil(L, 1), iuplua_checkihandleornil(L, 2)); iuplua_plugstate(L, ih); iuplua_pushihandle_raw(L, ih); return 1; }
void SplitTest(void) { Ihandle *dlg, *bt, *split, *ml, *vbox; bt = IupButton("Button", NULL); IupSetAttribute(bt, "EXPAND", "YES"); ml = IupMultiLine(NULL); IupSetAttribute(ml, "EXPAND", "YES"); IupSetAttribute(ml, "VISIBLELINES", "5"); IupSetAttribute(ml, "VISIBLECOLUMNS", "10"); split = IupSplit(bt, ml); // IupSetAttribute(split, "ORIENTATION", "VERTICAL"); IupSetAttribute(split, "ORIENTATION", "HORIZONTAL"); IupSetAttribute(split, "COLOR", "127 127 255"); vbox = IupVbox(split, NULL); IupSetAttribute(vbox, "MARGIN", "10x10"); IupSetAttribute(vbox, "GAP", "10"); dlg = IupDialog(vbox); IupSetAttribute(dlg, "TITLE", "IupSplit Example"); IupShow(dlg); }
//Image containers placeholder = IupImage(1,1,0); //This is needed for some reason preview = IupLabel(NULL); IupSetAttributeHandle(preview, "IMAGE", placeholder); imgmod = IupGridBox(NULL); IupSetAttributes(imgmod, "GAPLIN=5, GAPCOL=5"); //Horizontal box to contain all but the console Ihandle* hbox = IupHbox( list, IupSplit( IupVbox( IupSetAttributes(IupLabel("Scaled Image"),"ALIGNMENT=ACENTER, EXPAND=HORIZONTAL"), IupScrollBox(preview), NULL ), IupVbox( IupSetAttributes(IupLabel("Resulting Map"),"ALIGNMENT=ACENTER, EXPAND=HORIZONTAL"), IupScrollBox(imgmod), NULL ) ), NULL ); //Status bar Ihandle* statusbar = status_bar_setup(); Ihandle* vbox = IupVbox(hbox, statusbar, NULL); //Create the window, put everything inside, and show it main_window = IupDialog(vbox);