diff options
author | scuri <scuri> | 2010-06-25 19:34:31 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-06-25 19:34:31 +0000 |
commit | 22b3e42f503d0900f333c7813c1ced0c1b8a6ef1 (patch) | |
tree | 56032836240356e94880963fa6a2e03bb7434d67 /test/simple/simple_led.c | |
parent | f99f986398081f3fb70477cade8f0ac2704d1b4e (diff) |
*** empty log message ***
Diffstat (limited to 'test/simple/simple_led.c')
-rw-r--r-- | test/simple/simple_led.c | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/test/simple/simple_led.c b/test/simple/simple_led.c index dbfb37b..db06a72 100644 --- a/test/simple/simple_led.c +++ b/test/simple/simple_led.c @@ -1,4 +1,4 @@ -/* Automatically generated by Iup ledc 2.6 */ +/* Automatically generated by Iup 3.0 LED Compiler to C. */ #include <stdlib.h> #include <stdarg.h> @@ -6,34 +6,17 @@ static Ihandle* named[ 13 ]; -static Ihandle* decl( char* name, Ihandle* elem, char* first, ...) -{ - char *attr, *val; - va_list arg; - va_start (arg, first); - attr = first; - while (attr) - { - val = va_arg(arg,char*); - IupSetAttribute( elem, attr, val ); - attr = va_arg(arg,char*); - } - va_end (arg); - if(name) IupSetHandle( name, elem ); - return elem; -} - void simple_loadled (void) { - named[0] = decl( "mnOpen", IupMenu( + named[0] = IupSetAtt( "mnOpen", IupMenu( IupItem( "CGM - Binary", "SimplePlayCGMBin" ), IupItem( "CGM - Text", "SimplePlayCGMText" ), IupItem( "METAFILE", "SimplePlayMetafile" ), IupItem( "WMF", "SimplePlayWMF" ), IupItem( "EMF", "SimplePlayEMF" ), NULL), NULL ); - named[1] = decl( "mnSaveAs", IupMenu( + named[1] = IupSetAtt( "mnSaveAs", IupMenu( IupItem( "DEBUG", "SimpleDrawDebug" ), IupItem( "CGM - Binary", "SimpleDrawCGMBin" ), IupItem( "CGM - Text", "SimpleDrawCGMText" ), @@ -47,7 +30,7 @@ void simple_loadled (void) IupItem( "SVG", "SimpleDrawSVG" ), IupItem( "WMF", "SimpleDrawWMF" ), NULL), NULL ); - named[2] = decl( "mnFile", IupMenu( + named[2] = IupSetAtt( "mnFile", IupMenu( IupSubmenu( "Open", named[0] /* mnOpen */ ), @@ -60,24 +43,24 @@ void simple_loadled (void) IupSeparator(), IupItem( "Exit", "cmdExit" ), NULL), NULL ); - named[3] = decl( "mnEdit", IupMenu( + named[3] = IupSetAtt( "mnEdit", IupMenu( IupItem( "Copy as Metafile", "SimpleDrawClipboardMetafile" ), IupItem( "Copy as EMF", "SimpleDrawClipboardEMF" ), IupItem( "Copy as Bitmap", "SimpleDrawClipboardBitmap" ), IupItem( "Paste", "SimplePlayClipboard" ), NULL), NULL ); - named[4] = decl( "mnClipping", IupMenu( + named[4] = IupSetAtt( "mnClipping", IupMenu( IupItem( "Off", "SimpleClippingOff" ), IupItem( "Area", "SimpleClippingArea" ), IupItem( "Polygon", "SimpleClippingPolygon" ), IupItem( "Region", "SimpleClippingRegion" ), NULL), NULL ); - named[5] = decl( "mnWriteMode", IupMenu( + named[5] = IupSetAtt( "mnWriteMode", IupMenu( IupItem( "Replace", "SimpleReplace" ), IupItem( "Xor", "SimpleXor" ), IupItem( "Not Xor", "SimpleNotXor" ), NULL), NULL ); - named[6] = decl( "mnOptions", IupMenu( + named[6] = IupSetAtt( "mnOptions", IupMenu( IupSubmenu( "Clipping", named[4] /* mnClipping */ ), @@ -88,19 +71,19 @@ void simple_loadled (void) IupItem( "Transform", "SimpleTransform" ), IupItem( "Context Plus", "SimpleContextPlus" ), NULL), NULL ); - named[7] = decl( "mnSurface", IupMenu( + named[7] = IupSetAtt( "mnSurface", IupMenu( IupItem( "Window", "SimpleDrawWindow" ), IupItem( "Server Image", "SimpleDrawImage" ), IupItem( "Image RGB", "SimpleDrawImageRGB" ), IupItem( "OpenGL", "SimpleDrawGL" ), NULL), NULL ); - named[8] = decl( "mnPrimitives", IupMenu( + named[8] = IupSetAtt( "mnPrimitives", IupMenu( IupItem( "All", "SimpleAll" ), IupItem( "Text Align", "SimpleTextAlign" ), IupItem( "Text Fonts", "SimpleTextFonts" ), IupItem( "Test", "SimpleTest" ), NULL), NULL ); - named[9] = decl( "mnSimpleMenu", IupMenu( + named[9] = IupSetAtt( "mnSimpleMenu", IupMenu( IupSubmenu( "File", named[2] /* mnFile */ ), @@ -117,9 +100,9 @@ void simple_loadled (void) named[8] /* mnPrimitives */ ), NULL), NULL ); - named[10] = decl( "SimpleCanvas", IupCanvas( "SimpleRepaint" ), + named[10] = IupSetAtt( "SimpleCanvas", IupCanvas( "SimpleRepaint" ), "BORDER", "0", NULL ); - named[11] = decl( "SimpleDialog", IupDialog( + named[11] = IupSetAtt( "SimpleDialog", IupDialog( named[10] /* SimpleCanvas */ ), "TITLE", "Simple Draw", |