本文整理汇总了C++中IupShowXY函数的典型用法代码示例。如果您正苦于以下问题:C++ IupShowXY函数的具体用法?C++ IupShowXY怎么用?C++ IupShowXY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IupShowXY函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 );
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:11,代码来源:win.c
示例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;
}
开发者ID:LuaDist,项目名称:iup,代码行数:35,代码来源:bigtest.c
示例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;
}
开发者ID:sanikoyes,项目名称:iup,代码行数:27,代码来源:mgllabel.c
示例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: 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
示例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;
}
开发者ID:sanikoyes,项目名称:iup,代码行数:25,代码来源:example3_1.c
示例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;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:25,代码来源:text.c
示例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;
}
开发者ID:defdef,项目名称:iup,代码行数:31,代码来源:getxy_showxy.c
示例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;
}
开发者ID:svn2github,项目名称:iup-github,代码行数:35,代码来源:scrollbar.c
示例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");
}
开发者ID:Airr,项目名称:iup_mac,代码行数:27,代码来源:tray.c
示例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;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:25,代码来源:cells_checkboard.c
示例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;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:28,代码来源:backgroundbox.c
示例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);
}
开发者ID:goodpaul6,项目名称:generic,代码行数:8,代码来源:script_iup_interface.c
示例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;
}
开发者ID:LuaDist,项目名称:iup,代码行数:8,代码来源:iuplua_api.c
示例16: startup
void startup() {
// initialize seed
srand((unsigned int)time(NULL));
// kickoff event loops
IupShowXY(dialog, IUP_CENTER, IUP_CENTER);
IupMainLoop();
// ! main loop won't return until program exit
}
开发者ID:pkarneliuk,项目名称:clumsy,代码行数:9,代码来源:main.c
示例17: TabsTest
void TabsTest(void)
{
Ihandle *box, *frm1, *frm2, *dlg, *tabs;
tabs = CreateTabs(1);
box = IupHbox(tabs,
frm1 = IupFrame(IupRadio(IupVbox(IupToggle("TOP", "cbType"),
IupToggle("LEFT", "cbType"),
IupToggle("BOTTOM", "cbType"),
IupToggle("RIGHT", "cbType"),
NULL))),
frm2 = IupFrame(IupRadio(IupVbox(IupToggle("HORIZONTAL", "cbOrientation"),
IupToggle("VERTICAL", "cbOrientation"),
NULL))),
IupVbox(IupSetAttributes(IupButton("Add Tab", "cbAddTab"), "TIP=\"Button Tip\""),
IupButton("Insert Tab", "cbInsertTab"),
IupButton("Remove Tab", "cbRemoveTab"),
IupToggle("Inactive", "cbInactive"),
IupButton("VALUEPOS=0", "cbValuePos"),
NULL),
NULL);
IupSetAttribute(frm1, "MARGIN", "5x5");
IupSetAttribute(frm2, "MARGIN", "5x5");
IupSetAttribute(frm1, "GAP", "0");
IupSetAttribute(frm2, "GAP", "0");
IupSetAttribute(frm1, "TITLE", "Type");
IupSetAttribute(frm2, "TITLE", "Orientation");
IupSetAttribute(box, "MARGIN", "10x10");
IupSetAttribute(box, "GAP", "10");
dlg = IupDialog(box);
IupSetAttribute(dlg, "TITLE", "IupTabs Test");
IupSetAttribute(dlg, "APP_TABS", (char*)tabs);
// IupSetAttribute(box, "BGCOLOR", "92 92 255");
// IupSetAttribute(dlg, "BGCOLOR", "92 92 255");
// IupSetAttribute(dlg, "BACKGROUND", "200 10 80");
// IupSetAttributeHandle(dlg, "BACKGROUND", load_image_LogoTecgraf());
// IupSetAttribute(dlg, "FGCOLOR", "10 200 80");
// IupSetAttribute(dlg, "BGCOLOR", "173 177 194"); // Motif BGCOLOR for documentation
// IupSetAttribute(dlg,"COMPOSITED","NO");
IupMap(dlg);
IupSetAttribute(dlg, "SIZE", NULL);
IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
IupSetFunction("cbOrientation", (Icallback)cbOrientation);
IupSetFunction("cbType", (Icallback)cbType);
IupSetFunction("cbAddTab", (Icallback)cbAddTab);
IupSetFunction("cbInsertTab", (Icallback)cbInsertTab);
IupSetFunction("cbRemoveTab", (Icallback)cbRemoveTab);
IupSetFunction("cbInactive", (Icallback)cbInactive);
IupSetFunction("cbChildButton", (Icallback)cbChildButton);
IupSetFunction("cbValuePos", (Icallback)cbValuePos);
}
开发者ID:Airr,项目名称:iup_mac,代码行数:57,代码来源:tabs.c
示例18: main
/* Main program */
int main(int argc, char **argv)
{
/* IUP identifiers */
Ihandle *dlg;
Ihandle *img_star;
Ihandle *lbl, *lbl_explain, *lbl_star;
/* Initializes IUP */
IupOpen(&argc, &argv);
/* Program begin */
/* Creates the star image */
img_star = IupImage ( 13, 13, pixmap_star );
/* Sets star image colors */
IupSetAttribute ( img_star, "1", "0 0 0");
IupSetAttribute ( img_star, "2", "0 198 0");
/* Associates "img_star" to image img_star */
IupSetHandle ( "img_star", img_star );
/* Creates a label */
lbl = IupLabel ( "This label has the following attributes set:\nBGCOLOR = 255 255 0\nFGCOLOR = 0 0 255\nFONT = COURIER_NORMAL_14\nTITLE = All text contained here\nALIGNMENT = ACENTER" );
/* Sets all the attributes of label lbl, except for IMAGE */
IupSetAttributes ( lbl, "BGCOLOR = \"255 255 0\", FGCOLOR = \"0 0 255\", FONT = COURIER_NORMAL_14, ALIGNMENT = ACENTER");
/* Creates a label to explain that the label on the right has an image */
lbl_explain = IupLabel ( "The label on the right has the image of a star" );
/* Creates a label whose title is not important, cause it will have an image */
lbl_star = IupLabel (NULL);
/* Associates image "img_star" with label lbl_star */
IupSetAttribute ( lbl_star, "IMAGE", "img_star" );
/* Creates dialog with the label */
dlg = IupDialog ( IupVbox ( lbl, IupHbox ( lbl_explain, lbl_star, NULL ), NULL ) );
/* Sets title of the dialog */
IupSetAttribute ( dlg, "TITLE", "IupLabel Example" );
/* Shows dialog in the center of the screen */
IupShowXY ( dlg, IUP_CENTER, IUP_CENTER );
/* Initializes IUP main loop */
IupMainLoop();
/* Finishes IUP */
IupClose();
/* Program finished successfully */
return EXIT_SUCCESS;
}
开发者ID:sanikoyes,项目名称:iup,代码行数:58,代码来源:label.c
示例19: TreeTest
void TreeTest(void)
{
Ihandle* dlg;
init_tree(); /* Initializes IupTree */
init_dlg(); /* Initializes the dlg */
dlg = IupGetHandle("dlg"); /* Retrieves the dlg handle */
IupShowXY(dlg, IUP_CENTER, IUP_CENTER); /* Displays the dlg */
init_tree_nodes(); /* Initializes attributes, can be done here or anywhere */
}
开发者ID:Airr,项目名称:iup_mac,代码行数:10,代码来源:tree.c
示例20: main
int main(int argc, char **argv)
{
Ihandle *dlg;
Ihandle *list, *list_multiple, *list_dropdown;
Ihandle *frm_medal, *frm_sport, *frm_prize;
IupOpen(&argc, &argv);
list = IupList ("list_act");
IupSetAttributes (list, "1=Gold, 2=Silver, 3=Bronze, 4=Tecgraf, 5=None,"
"SHOWIMAGE=YES, SHOWDRAGDROP=YES, XXX_SPACING=4, VALUE=4");
load_medal_images();
IupSetAttribute(list, "IMAGE1", "IMGGOLD");
IupSetAttribute(list, "IMAGE2", "IMGSILVER");
IupSetAttribute(list, "IMAGE3", "IMGBRONZE");
IupSetAttributeHandle(list, "IMAGE4", load_image_Tecgraf());
IupSetCallback(list, "DRAGDROP_CB", (Icallback)dragdrop_cb);
// IupSetAttribute(list, "FONT", "Helvetica, Bold 40");
// IupSetAttribute(list, "AUTOHIDE", "NO");
frm_medal = IupFrame (list);
IupSetAttribute (frm_medal, "TITLE", "Best medal");
list_multiple = IupList(NULL);
IupSetAttributes (list_multiple, "1=\"100m dash\", 2=\"Long jump\", 3=\"Javelin throw\", 4=\"110m hurdlers\", 5=\"Hammer throw\",6=\"High jump\","
"MULTIPLE=YES, VALUE=\"+--+--\", SIZE=EIGHTHxEIGHTH");
IupSetCallback(list_multiple, "ACTION", (Icallback)list_multiple_cb);
frm_sport = IupFrame (list_multiple);
IupSetAttribute (frm_sport, "TITLE", "Competed in");
list_dropdown = IupList (NULL);
IupSetAttributes (list_dropdown, "1=\"Less than US$ 1000\", 2=\"US$ 2000\", 3=\"US$ 5000\", 4=\"US$ 10000\", 5=\"US$ 20000\", 6=\"US$ 50000\", 7=\"More than US$ 100000\","
"SHOWIMAGE=YES, DROPDOWN=YES, VISIBLE_ITEMS=3");
IupSetAttributeHandle(list_dropdown, "IMAGE1", IupImageRGB(20, 20, image_data_24));
IupSetAttributeHandle(list_dropdown, "IMAGE2", IupImageRGB(20, 20, image_data_24));
IupSetAttributeHandle(list_dropdown, "IMAGE3", load_image_Tecgraf());
frm_prize = IupFrame (list_dropdown);
IupSetAttribute (frm_prize, "TITLE", "Prizes won");
dlg = IupDialog (IupHbox (frm_medal, frm_sport, frm_prize, NULL));
IupSetAttribute (dlg, "TITLE", "IupList Example");
IupShowXY (dlg, IUP_CENTER, IUP_CENTER);
// IupSetAttribute(IupGetChild(dlg, 0), "BGCOLOR", "92 92 255");
// IupSetAttribute(dlg, "BACKGROUND", "200 10 80");
// IupSetAttribute(dlg, "BGCOLOR", "92 92 255");
IupMainLoop ();
IupClose ();
return EXIT_SUCCESS;
}
开发者ID:kmx,项目名称:mirror-iup,代码行数:55,代码来源:list1.c
注:本文中的IupShowXY函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论