Hi, me again! ;)
Now that I went a bit more in detail on my interface I noticed I'm
having some kind of error in the IUP natural size calculation...
To make it simple, just look at the result of example2_3.c without any
changes (attachment: example2_3.png).
If I then add a menu (attachment: menu_example2_3.c) it gets worse,
look (attachment: menu_example2_3.png).
Am I missing something here?
Thanks for your support!
Grieb.
#include <stdlib.h>
#include <iup.h>
int btn_exit_cb( Ihandle *self )
{
IupMessage("Hello World Message", "Hello world from IUP.");
/* Exits the main loop */
return IUP_CLOSE;
}
int main(int argc, char **argv)
{
Ihandle *dlg, *button, *vbox;
IupOpen(&argc, &argv);
button = IupButton("OK", NULL);
vbox = IupVbox(
button,
NULL);
dlg = IupDialog(vbox);
IupSetAttribute(dlg, "TITLE", "Hello World 3");
/* Registers callbacks */
IupSetCallback(button, "ACTION", (Icallback) btn_exit_cb);
IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
IupMainLoop();
IupClose();
return EXIT_SUCCESS;
}
#include <stdlib.h>
#include <iup.h>
int btn_exit_cb( Ihandle *self )
{
IupMessage("Hello World Message", "Hello world from IUP.");
/* Exits the main loop */
return IUP_CLOSE;
}
int main(int argc, char **argv)
{
Ihandle *dlg, *button, *vbox;
IupOpen(&argc, &argv);
Ihandle *new_item = IupItem("New", NULL);
IupSetAttribute(new_item, "IMAGE", "gtk-new");
Ihandle *quit_item = IupItem("Quit", NULL);
IupSetAttribute(quit_item, "IMAGE", "gtk-quit");
Ihandle *about_item = IupItem("About", NULL);
IupSetAttribute(about_item, "IMAGE", "gtk-about");
Ihandle *main_menu = IupMenu(
IupSubmenu("File",
IupMenu(
new_item,
IupSeparator(),
quit_item,
NULL
)
),
IupSubmenu("Help",
IupMenu(
about_item,
NULL
)
),
NULL
);
button = IupButton("OK", NULL);
vbox = IupVbox(
button,
NULL);
dlg = IupDialog(vbox);
IupSetAttribute(dlg, "TITLE", "Hello World 3");
IupSetAttributeHandle(dlg, "MENU", main_menu);
/* Registers callbacks */
IupSetCallback(button, "ACTION", (Icallback) btn_exit_cb);
IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
IupMainLoop();
IupClose();
return EXIT_SUCCESS;
}
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users