本文整理汇总了C++中IupDialog函数的典型用法代码示例。如果您正苦于以下问题:C++ IupDialog函数的具体用法?C++ IupDialog怎么用?C++ IupDialog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IupDialog函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
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;
}
开发者ID:LuaDist,项目名称:iup,代码行数:35,代码来源:bigtest.c
示例2: main
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;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:33,代码来源:test1.c
示例3: IupGLCanvas
void TransferFunctionsViewer::BuildInterface ()
{
m_iup_canvas = IupGLCanvas ("tfviewer_canvas");
IupSetCallback (m_iup_canvas, "ACTION", (Icallback)TransferFunctionsViewer::Action);
IupSetCallback (m_iup_canvas, "BUTTON_CB", (Icallback)TransferFunctionsViewer::Button_CB);
IupSetCallback (m_iup_canvas, "MOTION_CB", (Icallback)TransferFunctionsViewer::Motion_CB);
IupSetAttribute (m_iup_canvas, IUP_BUFFER, IUP_DOUBLE);
IupSetAttribute (m_iup_canvas, IUP_RASTERSIZE, "258x50");
IupSetAttribute (m_iup_canvas, IUP_RESIZE, IUP_NO);
IupSetHandle ("tfviewer_canvas", m_iup_canvas);
m_iup_sub_menu_file = IupSubmenu ("Arquivo", IupMenu(NULL));
m_iup_menu = IupMenu (m_iup_sub_menu_file, NULL);
IupSetHandle ("TransferFunctionMenu", m_iup_menu);
m_iup_main_dialog = IupDialog (m_iup_canvas);
//IupSetAttribute (m_iup_main_dialog, "MENU", "TransferFunctionMenu");
IupSetAttribute (m_iup_main_dialog, "TITLE", "Transfer Function Visualization");
IupSetAttribute (m_iup_main_dialog, "BORDER", "NO");
IupSetAttribute (m_iup_main_dialog, "RESIZE", "NO");
IupMap (m_iup_main_dialog);
IupRefresh (m_iup_main_dialog);
if (!m_pixels)
m_pixels = new float[258 * 50 * 4];
Redraw ();
}
开发者ID:rustanitu,项目名称:TFG,代码行数:30,代码来源:TransferFunctionsViewer.cpp
示例4: CanvasScrollbarTest
void CanvasScrollbarTest(void)
{
Ihandle *dlg, *cnv;
cnv = IupCanvas(NULL);
IupSetAttribute(cnv, "RASTERSIZE", "300x200"); /* initial size */
IupSetAttribute(cnv, "SCROLLBAR", "YES");
// IupSetAttribute(cnv, "EXPAND", "NO");
IupSetCallback(cnv, "RESIZE_CB", (Icallback)resize_cb);
IupSetCallback(cnv, "ACTION", (Icallback)action);
IupSetCallback(cnv, "MAP_CB", (Icallback)map_cb);
IupSetCallback(cnv, "UNMAP_CB", (Icallback)unmap_cb);
IupSetCallback(cnv, "WHEEL_CB", (Icallback)wheel_cb);
IupSetCallback(cnv, "SCROLL_CB", (Icallback)scroll_cb);
dlg = IupDialog(IupVbox(cnv, NULL));
IupSetAttribute(dlg, "TITLE", "Scrollbar Test");
IupSetAttribute(dlg, "MARGIN", "10x10");
IupMap(dlg);
IupSetAttribute(cnv, "RASTERSIZE", NULL); /* release the minimum limitation */
IupShowXY(dlg,IUP_CENTER,IUP_CENTER);
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:25,代码来源:canvas_scrollbar.c
示例5: Dialog
static int Dialog(lua_State *L)
{
Ihandle *ih = IupDialog(iuplua_checkihandleornil(L, 1));
iuplua_plugstate(L, ih);
iuplua_pushihandle_raw(L, ih);
return 1;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:7,代码来源:dialog.c
示例6: main
int main(int argc, char **argv)
{
Ihandle *dlg;
Ihandle *btn;
IupOpen(&argc, &argv);
/* Creates a backgroundbox */
btn = IupBackgroundBox(IupVbox(IupButton("This button does nothing", ""), IupText(""), NULL));
/* Creates dialog */
dlg = IupDialog
(
IupVbox
(
btn,
NULL
)
);
IupSetAttributes (dlg, "MARGIN=10x10, GAP=10, TITLE = \"IupBackgroundBox Example\"");
IupShowXY (dlg, IUP_CENTER, IUP_CENTER );
IupMainLoop ();
IupClose ();
return EXIT_SUCCESS;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:28,代码来源:backgroundbox.c
示例7: main
int main(int argc, char **argv)
{
Ihandle *dialog, *canvas;
IupOpen(&argc, &argv);
canvas = IupCanvas(NULL);
IupSetAttribute(canvas, "RASTERSIZE", "300x200"); /* initial size */
IupSetAttribute(canvas, "SCROLLBAR", "YES");
IupSetAttribute(canvas, "XMAX", "599");
IupSetAttribute(canvas, "YMAX", "399");
IupSetCallback(canvas, "SCROLL_CB", (Icallback)scroll_cb);
IupSetCallback(canvas, "RESIZE_CB", (Icallback)resize_cb);
IupSetCallback(canvas, "ACTION", (Icallback)action);
dialog = IupDialog(canvas);
IupSetAttribute(dialog, "TITLE", "Scrollbar Test");
IupMap(dialog);
cdcanvas = cdCreateCanvas(CD_IUP, canvas);
IupSetAttribute(canvas, "RASTERSIZE", NULL); /* release the minimum limitation */
IupShowXY(dialog,IUP_CENTER,IUP_CENTER);
IupMainLoop();
cdKillCanvas(cdcanvas);
IupDestroy(dialog);
IupClose();
return EXIT_SUCCESS;
}
开发者ID:svn2github,项目名称:iup-github,代码行数:35,代码来源:scrollbar.c
示例8: main
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;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:25,代码来源:cells_checkboard.c
示例9: main
int main(int argc, char **argv)
{
IupOpen(&argc, &argv);
memset(password, 0, 100);
text = IupText(NULL);
IupSetAttribute(text, "SIZE", "200x");
IupSetCallback(text, "ACTION", (Icallback) action);
IupSetCallback(text, "K_ANY", (Icallback) k_any);
pwd = IupText(NULL);
IupSetAttribute(pwd, "READONLY", "YES");
IupSetAttribute(pwd, "SIZE", "200x");
dlg = IupDialog(IupVbox(text, pwd, NULL));
IupSetAttribute(dlg, "TITLE", "IupText");
IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
IupMainLoop();
IupDestroy(dlg);
IupClose();
return 0;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:25,代码来源:text.c
示例10: iupwinVersion
void iupwinVersion(void)
{
Ihandle* dial, *ok;
dial = IupDialog(IupVbox(IupFrame(IupVbox(
IupLabel(IupVersion()),
IupLabel(IUP_VERSION_DATE),
IupLabel(IUP_COPYRIGHT),
NULL)),
ok = IupButton("Ok", NULL),
NULL));
IupSetCallback(ok, "ACTION", (Icallback)ok_cb);
IupSetAttribute(dial,IUP_TITLE,"IUP");
IupSetAttribute(dial,IUP_MENUBOX,IUP_NO);
IupSetAttribute(dial,IUP_MINBOX,IUP_NO);
IupSetAttribute(dial,IUP_MAXBOX,IUP_NO);
IupSetAttribute(dial,IUP_RESIZE,IUP_NO);
IupSetAttribute(dial,"GAP","5");
IupSetAttribute(dial,"MARGIN","5");
IupPopup(dial, IUP_CENTER, IUP_CENTER);
IupDestroy(dial);
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:26,代码来源:winver.c
示例11: main
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;
}
开发者ID:defdef,项目名称:iup,代码行数:31,代码来源:getxy_showxy.c
示例12: GLCanvasCubeTest
void GLCanvasCubeTest(void)
{
Ihandle *dlg, *canvas, *box;
IupGLCanvasOpen();
box = IupVbox(NULL);
IupSetAttribute(box, "MARGIN", "5x5");
canvas = IupGLCanvas(NULL);
IupSetCallback(canvas, "ACTION", action);
IupSetCallback(canvas, "BUTTON_CB", (Icallback)button_cb);
IupSetCallback(canvas, "MOTION_CB", (Icallback)motion_cb);
// IupSetAttribute(canvas, "BUFFER", "DOUBLE");
IupSetAttribute(canvas, "RASTERSIZE", "300x300");
IupAppend(box, canvas);
dlg = IupDialog(IupSetAttributes(IupFrame(box), "TITLE=Test"));
IupSetAttribute(dlg, "TITLE", "IupGLCanvas Test");
// IupSetAttribute(dlg, "COMPOSITED", "YES");
IupMap(dlg);
IupGLMakeCurrent(canvas);
// init();
printf("Vendor: %s\n", glGetString(GL_VENDOR));
printf("Renderer: %s\n", glGetString(GL_RENDERER));
printf("Version: %s\n", glGetString(GL_VERSION));
IupSetAttribute(canvas, "RASTERSIZE", NULL);
IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:32,代码来源:glcanvas_cube.c
示例13: main
int main(int argc, char **argv)
{
Ihandle *dlg, *multitext, *vbox;
IupOpen(&argc, &argv);
multitext = IupText(NULL);
vbox = IupVbox(
multitext,
NULL);
IupSetAttribute(multitext, "MULTILINE", "YES");
IupSetAttribute(multitext, "EXPAND", "YES");
dlg = IupDialog(vbox);
IupSetAttribute(dlg, "TITLE", "Simple Notepad");
IupSetAttribute(dlg, "SIZE", "QUARTERxQUARTER");
IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
IupSetAttribute(dlg, "USERSIZE", NULL);
IupMainLoop();
IupClose();
return EXIT_SUCCESS;
}
开发者ID:sanikoyes,项目名称:iup,代码行数:25,代码来源:example3_1.c
示例14: TextSpinTest
void TextSpinTest(void)
{
Ihandle *dlg, *text;
text = IupText(NULL);
IupSetAttribute(text, "SIZE", "60x");
// IupSetAttribute(text, "EXPAND", "HORIZONTAL");
IupSetAttribute(text, "SPIN", "YES");
IupSetAttribute(text, "SPINMIN", "5");
IupSetAttribute(text, "SPINMAX", "50");
IupSetAttribute(text, "SPININC", "10");
// IupSetAttribute(text, "SPINWRAP", "YES");
// IupSetAttribute(text, "SPINALIGN", "LEFT");
IupSetAttribute(text, "SPINVALUE", "13");
// IupSetAttribute(text, "SPINAUTO", "NO");
IupSetAttribute(text, "NAME", "spin");
// IupSetCallback(text, "SPIN_CB", (Icallback)spin_cb);
// IupSetCallback(text, "ACTION", (Icallback)action_cb);
// IupSetCallback(text, "VALUECHANGED_CB", (Icallback)valuechanged_cb);
dlg = IupDialog(IupVbox(text, IupButton("SPINVALUE", "setspinvalue"), NULL));
IupSetAttribute(dlg, "GAP", "20");
IupSetAttribute(dlg, "MARGIN", "20x20");
// IupSetAttribute(dlg, "BGCOLOR", "173 177 194"); // Motif BGCOLOR for documentation
IupSetFunction("setspinvalue", (Icallback)setspinvalue);
IupSetAttribute(dlg, "TITLE", "Text Spin Test");
IupShow(dlg);
}
开发者ID:sanikoyes,项目名称:iup,代码行数:32,代码来源:text_spin.c
示例15: main
int main(int argc, char **argv)
{
Ihandle *canvas, *finale, *dg;
IupOpen(&argc, &argv);
IupGLCanvasOpen();
canvas = IupGLCanvas(NULL);
IupSetCallback(canvas, "ACTION", (Icallback) redraw);
IupSetAttribute(canvas, IUP_BUFFER, IUP_DOUBLE);
IupSetAttribute(canvas, "RASTERSIZE", "123x200");
finale = IupHbox(IupFill(),
canvas,
IupFill(),
NULL);
dg = IupDialog(finale);
IupSetAttribute(dg, "TITLE", "IupGLCanvas");
IupShow(dg);
IupMainLoop();
IupClose();
return EXIT_SUCCESS;
}
开发者ID:EduardoPataki,项目名称:iup-examples,代码行数:26,代码来源:glcanvas.c
示例16: main
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;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:33,代码来源:sbox1.c
示例17: iMatrixExUndoCreateDialog
static Ihandle* iMatrixExUndoCreateDialog(ImatExData* matex_data)
{
Ihandle* dlg, *parent, *list;
list = IupList(NULL);
IupSetAttribute(list, "EXPAND","YES");
IupSetAttribute(list, "DROPDOWN","NO");
IupSetAttribute(list, "VISIBLECOLUMNS" ,"25");
IupSetAttribute(list, "VISIBLELINES" ,"10");
IupSetCallback (list, "ACTION" ,(Icallback)iMatrixExUndoListAction_CB);
iMatrixUndoListUpdate(matex_data, list);
parent = IupGetDialog(matex_data->ih);
dlg = IupDialog(list);
IupSetAttribute(dlg, "MAXBOX" ,"NO");
IupSetAttribute(dlg, "MINBOX" ,"NO");
IupSetAttribute(dlg, "TOOLBOX","YES");
IupSetStrAttribute(dlg, "TITLE" ,"[email protected]_UNDOLIST");
IupSetAttributeHandle(dlg,"PARENTDIALOG", parent);
IupSetAttribute(dlg, "MATRIX_EX_DATA", (char*)matex_data); /* do not use "_IUP_MATEX_DATA" to enable inheritance */
if (IupGetAttribute(parent, "ICON"))
IupSetStrAttribute(dlg,"ICON", IupGetAttribute(parent, "ICON"));
else
IupSetStrAttribute(dlg,"ICON", IupGetGlobal("ICON"));
return dlg;
}
开发者ID:DavidPhillipOster,项目名称:IupCocoa,代码行数:31,代码来源:iupmatex_undo.c
示例18: main
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;
}
开发者ID:svn2github,项目名称:iup-github,代码行数:35,代码来源:sbox2.c
示例19: TimerTest
void TimerTest(void)
{
Ihandle *dlg;
dlg = IupDialog(NULL);
IupSetAttribute(dlg, "TITLE", "IupTimer Test");
IupSetAttribute(dlg, "SIZE", "200x100");
IupShow(dlg);
timer1 = IupTimer();
timer2 = IupTimer();
timer3 = IupTimer();
IupSetAttribute(timer1, "TIME", "100");
IupSetAttribute(timer1, "RUN", "YES");
IupSetCallback(timer1, "ACTION_CB", (Icallback)timer_cb);
IupSetAttribute(timer2, "TIME", "400");
IupSetAttribute(timer2, "RUN", "YES");
IupSetCallback(timer2, "ACTION_CB", (Icallback)timer_cb);
IupSetAttribute(timer3, "TIME", "5000");
IupSetAttribute(timer3, "RUN", "YES");
IupSetCallback(timer3, "ACTION_CB", (Icallback)timer_cb);
}
开发者ID:Airr,项目名称:iup_mac,代码行数:26,代码来源:timer.c
示例20: SplitTest
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);
}
开发者ID:EduardoPataki,项目名称:iup-examples,代码行数:26,代码来源:split.c
注:本文中的IupDialog函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论