From d577d991b97ae2b5ee1af23641bcffc3f83af5b2 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 4 Nov 2009 11:56:41 -0800 Subject: Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux. --- iup/test/frame.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100755 iup/test/frame.c (limited to 'iup/test/frame.c') 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 +#include +#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 -- cgit v1.2.3