diff options
author | Pixel <pixel@nobis-crew.org> | 2009-11-04 11:56:41 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-11-04 11:59:33 -0800 |
commit | d577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch) | |
tree | 590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /iup/test/frame.c |
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'iup/test/frame.c')
-rwxr-xr-x | iup/test/frame.c | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/iup/test/frame.c b/iup/test/frame.c new file mode 100755 index 0000000..2bcd128 --- /dev/null +++ b/iup/test/frame.c @@ -0,0 +1,68 @@ +#include <stdlib.h> +#include <stdio.h> +#include "iup.h" + +void FrameTest(void) +{ + Ihandle *dlg, *frame1, *frame2; + + frame1 = IupFrame + ( + IupVbox + ( + IupLabel("Label1"), + IupSetAttributes(IupLabel("Label2"), "SIZE=70x"), + IupLabel("Label3"), + NULL + ) + ); + + frame2 = IupFrame + ( + IupVbox + ( + IupSetAttributes(IupLabel("Label4"), "EXPAND=HORIZONTAL"), + IupLabel("Label5"), + IupLabel("Label6"), + NULL + ) + ); + + IupSetAttribute(frame1, "TITLE", "Title Text"); +// IupSetAttribute(frame1, "FGCOLOR", "255 0 0"); +// IupSetAttribute(frame1, "BGCOLOR", "0 128 0"); + IupSetAttribute(frame2, "SUNKEN", "YES"); + + IupSetAttribute(frame1, "MARGIN", "0x0"); + IupSetAttribute(frame2, "MARGIN", "0x0"); +// IupSetAttribute(frame2, "BGCOLOR", "0 128 0"); + dlg = IupDialog(IupHbox(frame1, frame2, NULL)); + + IupSetAttribute(dlg, "TITLE", "IupFrame Test"); + IupSetAttribute(dlg, "MARGIN", "10x10"); + IupSetAttribute(dlg, "GAP", "5"); + IupSetAttribute(dlg, "FONTSIZE", "14"); +// IupSetAttribute(dlg, "RASTERSIZE", "300x200"); +// IupSetAttribute(dlg, "BGCOLOR", "0 128 0"); + + IupShow(dlg); + printf("RASTERSIZE(%s)\n", IupGetAttribute(frame1, "RASTERSIZE")); + printf("CLIENTSIZE(%s)\n", IupGetAttribute(frame1, "CLIENTSIZE")); + printf("RASTERSIZE(%s)\n", IupGetAttribute(frame2, "RASTERSIZE")); + printf("CLIENTSIZE(%s)\n", IupGetAttribute(frame2, "CLIENTSIZE")); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + FrameTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif |