/* 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) { 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; }
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; }
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; }
/* 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; }
/* 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() ; IupDestroy(dlg); IupControlsClose(); IupClose() ; return 0 ; }
/* 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 iupcontrolslua_close(lua_State * L) { if (iuplua_opencall_internal(L)) IupControlsClose(); return 0; }
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; }
VALUE rb_IupControlsClose(VALUE self) { IupControlsClose(); return Qnil; }