void main(int argc, char* argv[]) { Ihandle* dlg = NULL; Ihandle* cells = NULL; IupOpen(&argc, &argv); IupControlsOpen(); cells = create(); dlg = IupDialog(cells); IupSetAttribute(dlg, "RASTERSIZE", "400x400"); IupSetAttribute(dlg, "TITLE", "IupCells"); IupShowXY(dlg, IUP_CENTER, IUP_CENTER) ; IupSetAttribute(dlg, "RASTERSIZE", NULL); IupMainLoop() ; IupDestroy(dlg); IupClose(); return 0; }
int main() #endif { gViewerThread = nullptr; gRunThread.clear(); lua_State* L = luaL_newstate(); luaL_openlibs(L); IupOpen(nullptr, nullptr); IupControlsOpen(); iuplua_open(L); iupcontrolslua_open(L); TER::LoadFunctions(L); ZON::LoadFunctions(L); MOD::LoadFunctions(L); WLD::LoadFunctions(L); Viewer::LoadFunctions(L); Util::LoadFunctions(L); if (luaL_loadfile(L, "gui/main.lua") != 0) { ShowError("Could not load GUI script:\n%s\n", lua_tostring(L, -1)); } else if (lua_pcall(L, 0, 0, 0) != 0) { ShowError("Runtime error:\n%s\n", lua_tostring(L, -1)); } lua_close(L); return 0; }
int main(int argc, char **argv) { int X=100, Y=200; FILE *fp; Ihandle *dlg, *mat; fp = fopen("test.dat", "r"); if (fp != NULL) { fread(&X,sizeof(int),1,fp); fread(&Y,sizeof(int),1,fp); fclose(fp); } printf("X,Y=%d,%d\n", X, Y); IupOpen(&argc, &argv); IupControlsOpen (); mat = create_mat(); dlg = IupDialog(mat); IupSetAttribute(dlg,"SHRINK","YES"); IupSetAttribute(dlg, "TITLE", "IupMatrix"); IupSetCallback(dlg, "RESIZE_CB", (Icallback) resize_cb); IupSetCallback(dlg, "CLOSE_CB", (Icallback) close_cb); IupShowXY (dlg,X,Y); IupMainLoop (); IupClose (); return EXIT_SUCCESS; }
VALUE rb_IupTabsv(int argc,VALUE *argv,VALUE self) { extern VALUE rb_cIupTabs; Ihandle* v; Ihandle* params[100]; int i; VALUE node; VALUE v_params,v_hash; rb_scan_args(argc,argv,"11",&v_params,&v_hash); for(i=0;i<RARRAY_LEN(v_params) && i<100;i++) { node = RARRAY_PTR(v_params)[i]; if(node==Qnil) params[i] = NULL; else params[i] = (Ihandle*)NUM2ULONG(rb_iv_get(node,"@ihandle")); } params[i] = NULL; IupControlsOpen(); v = IupTabsv(params); if(TYPE(v_hash)==T_HASH) rb_set_attribute(v,v_hash); if(v) return rb_funcall(rb_cIupTabs,rb_intern("new"),1,ULONG2NUM((unsigned long)v)); return Qnil; }
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; }
/* main program */ int main(int argc, char **argv) { char *error=NULL; /* IUP initialization */ IupOpen(&argc, &argv); IupControlsOpen () ; /* loads LED */ if((error = IupLoad("vbox.led"))) { IupMessage("LED error", error); return 1 ; } dlg = IupGetHandle("Alinhav"); /* sets callbacks */ // IupSetFunction( "acao_pausa", (Icallback) btn_pause_cb ); /* shows dialog */ // IupShowXY(dlg,IUP_CENTER,IUP_CENTER); IupShow(dlg); /* main loop */ IupMainLoop(); IupDestroy(dlg); /* ends IUP */ IupControlsClose() ; IupClose(); return 0 ; }
int main(int argc, char* argv[]) { int i, count = sizeof(test_list)/sizeof(TestItems); char str[50]; Ihandle *dlg, *list; IupOpen(&argc, &argv); IupControlsOpen(); // IupSetGlobal("LANGUAGE", "PORTUGUESE"); dlg = IupDialog(IupVbox(list = IupList(NULL), NULL)); IupSetAttribute(dlg, "MARGIN", "10x10"); IupSetAttribute(dlg, "TITLE", "IupTests"); IupSetCallback(dlg, "CLOSE_CB", close_cb); IupSetAttribute(list, "VISIBLELINES", "15"); IupSetAttribute(list, "EXPAND", "YES"); IupSetCallback(list, "DBLCLICK_CB", (Icallback)dblclick_cb); IupSetCallback(list, "K_CR", k_enter_cb); for (i=0; i<count; i++) { sprintf(str, "%d", i+1); IupSetAttribute(list, str, test_list[i].title); } IupShowXY(dlg, 100, IUP_CENTER); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }
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; }
VALUE rb_IupColorbar(VALUE self) { extern VALUE rb_cIupColorbar; Ihandle* v; IupControlsOpen(); v = IupColorbar(); if(v) return rb_funcall(rb_cIupColorbar,rb_intern("new"),1,ULONG2NUM((unsigned long)v)); return Qnil; }
int main(int argc, char **argv) { IupOpen(&argc, &argv); IupControlsOpen(); func_1(); IupShowXY(IupGetHandle("dlg"),IUP_CENTER,IUP_CENTER); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }
/* Main program */ int main(int argc, char **argv) { Ihandle *dlg, *cb; /* Initializes IUP */ IupOpen(&argc, &argv); IupControlsOpen(); /* Creates a canvas associated with the redraw action */ cnvs = IupCanvas(NULL); IupSetCallback(cnvs, "ACTION", (Icallback)redraw_cb); /* Sets size, minimum and maximum values, position and size of the thumb */ /* of the horizontal scrollbar of the canvas */ IupSetAttributes(cnvs, "RASTERSIZE=200x300"); cb = IupColorbar(); IupSetAttribute(cb, "RASTERSIZE", "70x"); IupSetAttribute(cb, "EXPAND", "VERTICAL"); IupSetAttribute(cb, "NUM_PARTS", "2"); IupSetAttribute(cb, "SHOW_SECONDARY", "YES"); IupSetCallback(cb, "SELECT_CB", (Icallback)select_cb); IupSetCallback(cb, "CELL_CB", (Icallback)cell_cb); IupSetCallback(cb, "SWITCH_CB", (Icallback)switch_cb); // IupSetAttribute(cb, "SQUARED", "NO"); IupSetAttribute(cb, "PREVIEW_SIZE", "60"); /* Creates a dialog with a vbox containing the canvas and the colorbar. */ dlg = IupDialog(IupHbox(cnvs, cb, NULL)); /* Sets the dialog's title, so that it is mapped properly */ IupSetAttribute(dlg, "TITLE", "IupColorbar"); /* Maps the dialog. This must be done before the creation of the CD canvas */ IupMap(dlg); /* Creates a CD canvas of type CD_IUP */ cdcanvas = cdCreateCanvas(CD_IUP, cnvs); /* Shows dialog on the center of the screen */ IupShow(dlg); /* Initializes IUP main loop */ IupMainLoop(); /* Finishes IUP */ IupClose(); /* Program finished successfully */ return EXIT_SUCCESS; }
VALUE rb_IupTree(int argc,VALUE *argv,VALUE self) { extern VALUE rb_cIupTree; Ihandle* v; IupControlsOpen(); v = IupTree(); if(argc==1 && TYPE(argv[0])==T_HASH) rb_set_attribute(v,argv[0]); if(v) return rb_funcall(rb_cIupTree,rb_intern("new"),1,ULONG2NUM((unsigned long)v)); return Qnil; }
int main(int argc, char* argv[]) { IupOpen(&argc, &argv); IupControlsOpen(); CellsCheckboardTest(); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }
int main(int argc, char* argv[]) { IupOpen(&argc, &argv); IupControlsOpen(); MatrixCbModeTest(); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }
int main(int argc, char* argv[]) { IupOpen(&argc, &argv); IupControlsOpen(); ScrollBoxTest(); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }
int main(int argc, char **argv) { IupOpen(&argc, &argv); IupControlsOpen(); func_1(); IupShowXY(IupGetHandle("dlg"),IUP_CENTER,IUP_CENTER); IupMainLoop(); IupDestroy(IupGetHandle("img1")); IupDestroy(IupGetHandle("img2")); IupDestroy(IupGetHandle("dlg")); IupControlsClose(); IupClose(); return 0; }
int main(int argc, char **argv) { unsigned char r, g, b; IupOpen(&argc, &argv); IupControlsOpen () ; if(IupGetColor(100, 100, &r, &g, &b)) printf("RGB = %.2X%.2X%.2X", r, g, b); IupControlsClose() ; IupClose(); return 1; }
/* Main program */ int main(int argc, char **argv) { Ihandle *dlg; IupOpen(&argc, &argv); IupControlsOpen (); dlg = IupDialog(create_mat()); IupSetAttribute(dlg, "TITLE", "IupMatrix"); IupShowXY (dlg,IUP_CENTER,IUP_CENTER); IupMainLoop (); IupClose (); return EXIT_SUCCESS; }
int main(int argc, char* argv[]) { IupOpen(&argc, &argv); IupControlsOpen(); #ifdef USE_OPENGL IupGLCanvasOpen(); #endif PreDialogsTest(); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }
int iupcontrolslua_open(lua_State * L) { if (iuplua_opencall_internal(L)) IupControlsOpen(); iuplua_get_env(L); iupgaugelua_open(L); iupmatrixlua_open(L); iupmasklua_open(L); iupdiallua_open(L); iupcolorbrowserlua_open(L); iupcellslua_open(L); iupcolorbarlua_open(L); iupmatrixlistlua_open(L); return 0; }
static void factoryCache_Init() { InitializeCriticalSection(&cs_factoryCache); #ifdef IUP /* iup initialization */ IupOpen(); #ifndef NO_CPICONTROLS IupGLCanvasOpen(); IupControlsOpen(); #endif #ifdef SPEECH_SDK IupSpeechOpen(); #endif #endif factoryCache = luaL_newstate(); lua_newtable(factoryCache); lua_setglobal(factoryCache,"factories"); }
/* Main program */ int main(int argc, char **argv) { Ihandle *dlg; IupOpen(&argc, &argv); IupControlsOpen(); IupSetFunction("removeline", (Icallback)removeline); IupSetFunction("addline", (Icallback)addline); IupSetFunction("removecol", (Icallback)removecol); IupSetFunction("addcol", (Icallback)addcol); IupSetFunction("redraw", (Icallback)redraw); createmenu(); dlg = IupDialog( IupTabs( IupSetAttributes( IupVbox((create_mat()), IupText(""), IupLabel("Label Text"), IupVal("HORIZONTAL"), NULL), "MARGIN=10x10, GAP=10, TABTITLE=Test1"), IupSetAttributes( IupVbox(IupFrame(create_mat()), IupText(""), IupLabel("Label Text"), IupVal("HORIZONTAL"), // NULL), "BGCOLOR=\"0 255 255\", MARGIN=10x10, GAP=10, TABTITLE=Test2,FONT=HELVETICA_ITALIC_14"), NULL), "FONT=HELVETICA_NORMAL_12, BGCOLOR=\"0 255 255\", MARGIN=10x10, GAP=10, TABTITLE=Test2"), NULL)); IupSetAttribute(dlg,IUP_TITLE, "IupMatrix"); IupSetAttribute(dlg,IUP_MENU, "mymenu"); // IupSetAttribute(dlg,"BGCOLOR", "255 0 255"); //IupSetAttribute(dlg,"COMPOSITED", "YES"); //IupSetAttribute(dlg,"LAYERED", "YES"); //IupSetAttribute(dlg,"LAYERALPHA", "192"); IupShowXY(dlg,IUP_CENTER,IUP_CENTER) ; IupMainLoop(); iupmaskMatRemove(IupGetHandle("mat1"), 2, 1) ; iupmaskMatRemove(IupGetHandle("mat2"), 2, 1) ; IupDestroy(dlg); IupControlsClose(); IupClose(); return 0; }
int main(int argc, char* argv[]) { IupOpen(&argc, &argv); IupControlsOpen(); IupSetGlobal("SINGLEINSTANCE", "Iup Sample"); if (!IupGetGlobal("SINGLEINSTANCE")) { IupClose(); return EXIT_SUCCESS; } SampleTest(); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }
/* Main program */ int main(int argc, char **argv) { Ihandle* dlg = NULL; Ihandle* cells = NULL; IupOpen(&argc, &argv); IupControlsOpen(); cells = create(); dlg = IupDialog(cells); IupSetAttribute(dlg,"RASTERSIZE","440x480"); IupSetAttribute(dlg,"TITLE","IupCells"); IupShowXY(dlg,IUP_CENTER,IUP_CENTER); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }
/* Main program */ int main(int argc, char **argv) { Ihandle* dlg, *cells, *box; IupOpen(&argc, &argv); IupControlsOpen(); cells = create(); box = IupVbox(cells, NULL); IupSetAttribute(box,"MARGIN","10x10"); dlg = IupDialog(box); IupSetAttribute(dlg,"TITLE","IupCells"); IupSetAttribute(dlg, "RASTERSIZE","350x250"); IupShowXY(dlg,IUP_CENTER,IUP_CENTER); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }
void ColorbarTest(void) { Ihandle *dlg, *cb; IupControlsOpen(); /* Creates a canvas associated with the redraw action */ canvas = IupCanvas(NULL) ; IupSetCallback(canvas, "ACTION", (Icallback)redraw_cb); IupSetAttribute(canvas, "RASTERSIZE", "200x300"); cb = IupColorbar(); IupSetAttribute(cb, "RASTERSIZE", "70x"); IupSetAttribute(cb, "EXPAND", "VERTICAL"); IupSetAttribute(cb, "NUM_PARTS", "2"); IupSetAttribute(cb, "SHOW_SECONDARY", "YES"); IupSetAttribute(cb, "PREVIEW_SIZE", "60"); // IupSetAttribute(cb, "ACTIVE", "NO"); // IupSetAttribute(cb, "BGCOLOR", "128 0 255"); IupSetCallback(cb, "SELECT_CB", (Icallback)select_cb); IupSetCallback(cb, "CELL_CB", (Icallback)cell_cb); IupSetCallback(cb, "SWITCH_CB", (Icallback)switch_cb); IupSetCallback(cb, "EXTENDED_CB", (Icallback)extended_cb); dlg = IupDialog(IupHbox(canvas, cb, NULL)); IupSetAttribute(dlg, "MARGIN", "5x5"); IupSetAttribute(dlg, "TITLE", "IupColorbar"); /* Maps the dlg. This must be done before the creation of the CD canvas. Could also use MAP_CB callback. */ IupMap(dlg); cdcanvas = cdCreateCanvas(CD_IUP, canvas); IupPopup(dlg, IUP_CENTER, IUP_CENTER); cdKillCanvas(cdcanvas); }
/* main program */ int main(int argc, char **argv) { char *error=NULL; /* IUP initialization */ IupOpen(&argc, &argv); IupControlsOpen () ; /* loads LED */ if(error = IupLoad("iupgauge.led")) { IupMessage("LED error", error); return 1 ; } dlg = IupGetHandle("dialog_name"); gauge = IupGetHandle("gauge_name"); /* sets callbacks */ IupSetFunction( "acao_pausa", (Icallback) pausa_cb ); IupSetFunction( "acao_inicio", (Icallback) inicio_cb ); IupSetFunction( "acao_acelera", (Icallback) acelera_cb ); IupSetFunction( "acao_freia", (Icallback) freia_cb ); IupSetFunction( "acao_exibe", (Icallback) exibe_cb ); IupSetFunction( "IDLE_ACTION", (Icallback) idle_cb); /* shows dialog */ IupShowXY(dlg,IUP_CENTER,IUP_CENTER); /* main loop */ IupMainLoop(); IupDestroy(dlg); /* ends IUP */ IupControlsClose() ; IupClose(); return 0 ; }
int main(int argc, char **argv) { Ihandle *dg, *A, *B; IupOpen(&argc, &argv); IupControlsOpen(); IupSetFunction("showcb", (Icallback) show_cb); IupSetFunction("buttoncb", (Icallback) button_cb); IupSetFunction("getfocus_cb", (Icallback) getfocus_cb); IupSetFunction("mm", (Icallback) mm); A = IupButton("Open Popup", "buttoncb"); B = IupButton("Dummy", ""); IupSetAttribute(A, IUP_TIP, "TIP DO PRIMEIRO ELEMENTO"); dg = IupDialog(IupVbox(A, B, NULL)); IupPopup(dg, IUP_CENTER, IUP_CENTER); IupMainLoop(); IupClose(); return 1; }
/* main */ int main(int argc, char **argv) { Ihandle *vboxr[MAXPLOT+1]; /* tabs containing the plots */ Ihandle *dlg, *vboxl, *hbox, *lbl1, *lbl2, *lbl3, *bt1, *boxinfo, *boxdial1, *boxdial2, *f1, *f2; int ii; IupOpen(&argc, &argv); // init IUP IupControlsOpen(); // init the addicional controls library (we use IupTabs) IupPPlotOpen(); // init IupPPlot library // cdInitGdiPlus(); // create plots for (ii=0; ii<MAXPLOT; ii++) plot[ii] = IupPPlot(); // left panel: plot control // Y zooming dial1 = IupDial("VERTICAL"); lbl1 = IupLabel("+"); lbl2 = IupLabel("-"); boxinfo = IupVbox(lbl1, IupFill(), lbl2, NULL); boxdial1 = IupHbox(boxinfo, dial1, NULL); IupSetAttribute(boxdial1, "ALIGNMENT", "ACENTER"); IupSetAttribute(boxinfo, "ALIGNMENT", "ACENTER"); IupSetAttribute(boxinfo, "SIZE", "20x52"); IupSetAttribute(boxinfo, "GAP", "2"); IupSetAttribute(boxinfo, "MARGIN", "4"); IupSetAttribute(boxinfo, "EXPAND", "YES"); IupSetAttribute(lbl1, "EXPAND", "NO"); IupSetAttribute(lbl2, "EXPAND", "NO"); IupSetAttribute(dial1, "ACTIVE", "NO"); IupSetAttribute(dial1, "SIZE", "20x52"); IupSetCallback(dial1, "BUTTON_PRESS_CB", (Icallback)dial1_btndown_cb); IupSetCallback(dial1, "MOUSEMOVE_CB", (Icallback)dial1_btnup_cb); IupSetCallback(dial1, "BUTTON_RELEASE_CB", (Icallback)dial1_btnup_cb); tgg1 = IupToggle("Y Autoscale", NULL); IupSetCallback(tgg1, "ACTION", (Icallback)tgg1_cb); IupSetAttribute(tgg1, "VALUE", "ON"); f1 = IupFrame( IupVbox(boxdial1, tgg1, NULL) ); IupSetAttribute(f1, "TITLE", "Y Zoom"); // X zooming dial2 = IupDial("HORIZONTAL"); lbl1 = IupLabel("-"); lbl2 = IupLabel("+"); boxinfo = IupHbox(lbl1, IupFill(), lbl2, NULL); boxdial2 = IupVbox(dial2, boxinfo, NULL); IupSetAttribute(boxdial2, "ALIGNMENT", "ACENTER"); IupSetAttribute(boxinfo, "ALIGNMENT", "ACENTER"); IupSetAttribute(boxinfo, "SIZE", "64x16"); IupSetAttribute(boxinfo, "GAP", "2"); IupSetAttribute(boxinfo, "MARGIN", "4"); IupSetAttribute(boxinfo, "EXPAND", "HORIZONTAL"); IupSetAttribute(lbl1, "EXPAND", "NO"); IupSetAttribute(lbl2, "EXPAND", "NO"); IupSetAttribute(dial2, "ACTIVE", "NO"); IupSetAttribute(dial2, "SIZE", "64x16"); IupSetCallback(dial2, "BUTTON_PRESS_CB", (Icallback)dial2_btndown_cb); IupSetCallback(dial2, "MOUSEMOVE_CB", (Icallback)dial2_btnup_cb); IupSetCallback(dial2, "BUTTON_RELEASE_CB", (Icallback)dial2_btnup_cb); tgg2 = IupToggle("X Autoscale", NULL); IupSetCallback(tgg2, "ACTION", (Icallback)tgg2_cb); f2 = IupFrame( IupVbox(boxdial2, tgg2, NULL) ); IupSetAttribute(f2, "TITLE", "X Zoom"); lbl1 = IupLabel(""); IupSetAttribute(lbl1, "SEPARATOR", "HORIZONTAL"); tgg3 = IupToggle("Vertical Grid", NULL); IupSetCallback(tgg3, "ACTION", (Icallback)tgg3_cb); tgg4 = IupToggle("Horizontal Grid", NULL); IupSetCallback(tgg4, "ACTION", (Icallback)tgg4_cb); lbl2 = IupLabel(""); IupSetAttribute(lbl2, "SEPARATOR", "HORIZONTAL"); tgg5 = IupToggle("Legend", NULL); IupSetCallback(tgg5, "ACTION", (Icallback)tgg5_cb); lbl3 = IupLabel(""); IupSetAttribute(lbl3, "SEPARATOR", "HORIZONTAL"); bt1 = IupButton("Export PDF", NULL); IupSetCallback(bt1, "ACTION", (Icallback)bt1_cb); vboxl = IupVbox(f1, f2, lbl1, tgg3, tgg4, lbl2, tgg5, lbl3, bt1, NULL); IupSetAttribute(vboxl, "GAP", "4"); IupSetAttribute(vboxl, "EXPAND", "NO"); // right panel: tabs with plots for (ii=0; ii<MAXPLOT; ii++) { vboxr[ii] = IupVbox(plot[ii], NULL); // each plot a tab IupSetfAttribute(vboxr[ii], "TABTITLE", "Plot %d", ii); // name each tab } vboxr[MAXPLOT] = NULL; // mark end of vector tabs = IupTabsv(vboxr); // create tabs IupSetCallback(tabs, "TABCHANGE_CB", (Icallback)tabs_tabchange_cb); // dialog hbox = IupHbox(vboxl, tabs, NULL); IupSetAttribute(hbox, "MARGIN", "4x4"); IupSetAttribute(hbox, "GAP", "10"); dlg = IupDialog(hbox); IupSetAttributes(dlg, "SIZE=500x240" ); IupSetAttribute(dlg, "TITLE", "IupPPlot Example"); InitPlots(); // It must be able to be done independent of dialog Mapping tabs_tabchange_cb(tabs, vboxr[0]); IupShowXY(dlg, IUP_CENTER, IUP_CENTER); IupSetAttribute(dlg, "SIZE", NULL); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }
int main ( int argc, char **argv ) { IupOpen(&argc, &argv); #ifndef IUPLUA_NO_GL IupGLCanvasOpen(); #endif #ifndef IUPLUA_NO_CD IupControlsOpen(); IupPPlotOpen(); #endif lua_open(); lua_setdebug(1); lua_iolibopen( ); lua_strlibopen( ); lua_mathlibopen( ); iuplua_open( ); iupkey_open( ); #ifndef IUPLUA_NO_GL iupgllua_open(); #endif #ifndef IUPLUA_NO_CD iupcontrolslua_open(); iup_pplotlua_open(); cdlua_open(); cdluaiup_open(); #endif #ifndef IUPLUA_NO_IM iupimlua_open(); imlua_open(); #endif if (argc <= 1) { if(!iuplua_dofile("console3.lua")) { #ifdef TEC_BIGENDIAN #ifdef TEC_64 #include "loh/console3_be64.loh" #else #include "loh/console3_be32.loh" #endif #else #ifdef TEC_64 #ifdef WIN64 #include "loh/console3_le64w.loh" #else #include "loh/console3_le64.loh" #endif #else #include "loh/console3.loh" #endif #endif } } else { int ok = 1, i = 1; /* Running all .lua given as arguments */ while(ok & (i < argc)) { ok = iuplua_dofile(argv[i]); i++; } if(!ok) { return EXIT_FAILURE; } } #ifndef IUPLUA_NO_CD cdlua_close(); IupControlsClose(); #endif IupClose(); lua_close(); return EXIT_SUCCESS; }