本文整理汇总了C++中IupShowXY函数的典型用法代码示例。如果您正苦于以下问题:C++ IupShowXY函数的具体用法?C++ IupShowXY怎么用?C++ IupShowXY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IupShowXY函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IupShow
int IupShow (Ihandle* n)
{
assert(n != NULL);
if(n == NULL)
return IUP_ERROR;
if (handle(n))
return IupShowXY( n, IupGetInt(n, IUP_X), IupGetInt(n, IUP_Y));
else
return IupShowXY( n, IUP_CURRENT, IUP_CURRENT );
}
示例2: 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;
}
示例3: main
int main(int argc, char **argv)
{
Ihandle *dlg;
Ihandle *lbl;
IupOpen(&argc, &argv);
IupMglPlotOpen();
lbl = IupMglLabel("\\int \\alpha \\sqrt{sin(\\pi x)^2 + \\gamma_{i_k}} dx");
IupSetAttribute(lbl, "RASTERSIZE", "400x80");
IupSetAttribute(lbl, "LABELFONTSIZE", "10");
// IupSetAttribute(lbl, "BGCOLOR", "255 255 0");
// IupSetAttribute(lbl, "FGCOLOR", "0 0 255");
dlg = IupDialog(IupVbox(lbl, NULL));
IupSetAttribute(dlg, "MARGIN", "10x10");
IupSetAttribute(dlg, "TITLE", "IupMglLabel Example");
IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
IupMainLoop();
IupClose();
return EXIT_SUCCESS;
}
示例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);
}
示例5: 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);
}
示例6: 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;
}
示例7: 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;
}
示例8: 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;
}
示例9: 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;
}
示例10: TrayTest
void TrayTest(void)
{
Ihandle *dlg, *img;
img = IupImage(16, 16, pixmap);
IupSetAttribute(img, "0", "BGCOLOR");
IupSetAttribute(img, "1", "255 255 0");
IupSetAttribute(img, "2", "255 0 0");
IupSetAttribute(img, "3", "255 255 0");
IupSetHandle ("img", img);
dlg = IupDialog(NULL);
IupSetAttribute(dlg, "TITLE", "Tray Test");
IupSetAttribute(dlg, "TRAY", "YES");
IupSetAttribute(dlg, "TRAYTIP", "Tip at Tray");
IupSetAttribute(dlg, "TRAYIMAGE", "img");
IupSetAttribute(dlg, "SIZE", "100x100");
IupSetCallback(dlg, "TRAYCLICK_CB", (Icallback)trayclick);
IupSetCallback(dlg, "CLOSE_CB", (Icallback)close_cb);
IupSetCallback(dlg, "K_ESC", (Icallback)k_esc);
IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
/* start only the task bar icon */
IupSetAttribute(dlg, "HIDETASKBAR", "YES");
}
示例11: 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;
}
示例12: main
int main(void) {
Ihandle *dlg;
int res;
extern void (*routine_drawPixel) (float x, float y);
srand((unsigned int) time(0)); /* Seed to current time value */
routine_drawPixel = clipal_drawPixel;
list_init(&pointList, free);
res = util_readFromFile("clip_rectangle.txt");
printf("Clip Rectangle loaded, return value: %d\n", res);
if (res == -1) {
printf("File read error\n");\
getche();
goto TERMINATE;
}
IupOpen(0, 0);
IupGLCanvasOpen();
dlg = createMainWindow();
IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
IupMainLoop();
IupClose();
TERMINATE:
list_destroy(&pointList);
return 0;
}
开发者ID:AKD92,项目名称:OpenGL-Graphics-Programmatic-LineClip-Analyzer,代码行数:33,代码来源:driver_lineclip_analyzer.c
示例13: 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;
}
示例14: ext_iup_show_xy
static void ext_iup_show_xy(script_t* script, vector_t* args)
{
Ihandle* handle = script_get_arg(args, 0)->nat.value;
int x = (int)script_get_arg(args, 1)->number;
int y = (int)script_get_arg(args, 2)->number;
IupShowXY(handle, x, y);
}
示例15: ShowXY
static int ShowXY(lua_State *L)
{
Ihandle *ih = iuplua_checkihandle(L,1);
int x = luaL_optint(L,2, IUP_CURRENT);
int y = luaL_optint(L,3, IUP_CURRENT);
lua_pushinteger(L, IupShowXY(ih,x,y));
return 1;
}