summaryrefslogtreecommitdiff
path: root/cd/test/simple/simple_led.c
blob: 626b8492bc28602cba4a95b35bfd398f67495585 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/* Automatically generated by Iup ledc 2.6         */

#include <stdlib.h>
#include <stdarg.h>
#include <iup.h>

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(
    IupItem( "CGM - Binary", "SimplePlayCGMBin" ),
    IupItem( "CGM - Text", "SimplePlayCGMText" ),
    IupItem( "METAFILE", "SimplePlayMetafile" ),
    IupItem( "WMF", "SimplePlayWMF" ),
    IupItem( "EMF", "SimplePlayEMF" ),
  NULL), NULL );
  named[1] = decl( "mnSaveAs", IupMenu(
    IupItem( "DEBUG", "SimpleDrawDebug" ),
    IupItem( "CGM - Binary", "SimpleDrawCGMBin" ),
    IupItem( "CGM - Text", "SimpleDrawCGMText" ),
    IupItem( "DGN", "SimpleDrawDGN" ),
    IupItem( "DXF", "SimpleDrawDXF" ),
    IupItem( "EMF", "SimpleDrawEMF" ),
    IupItem( "METAFILE", "SimpleDrawMetafile" ),
    IupItem( "PDF", "SimpleDrawPDF" ),
    IupItem( "PS", "SimpleDrawPS" ),
    IupItem( "EPS", "SimpleDrawEPS" ),
    IupItem( "SVG", "SimpleDrawSVG" ),
    IupItem( "WMF", "SimpleDrawWMF" ),
  NULL), NULL );
  named[2] = decl( "mnFile", IupMenu(
    IupSubmenu( "Open",
      named[0] /* mnOpen */
    ),
    IupSubmenu( "Save As",
      named[1] /* mnSaveAs */
    ),
    IupSeparator(),
    IupItem( "Print", "SimpleDrawPrint" ),
    IupItem( "Print Dialog...", "SimpleDrawPrintDialog" ),
    IupSeparator(),
    IupItem( "Exit", "cmdExit" ),
  NULL), NULL );
  named[3] = decl( "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(
    IupItem( "Off", "SimpleClippingOff" ),
    IupItem( "Area", "SimpleClippingArea" ),
    IupItem( "Polygon", "SimpleClippingPolygon" ),
    IupItem( "Region", "SimpleClippingRegion" ),
  NULL), NULL );
  named[5] = decl( "mnWriteMode", IupMenu(
    IupItem( "Replace", "SimpleReplace" ),
    IupItem( "Xor", "SimpleXor" ),
    IupItem( "Not Xor", "SimpleNotXor" ),
  NULL), NULL );
  named[6] = decl( "mnOptions", IupMenu(
    IupSubmenu( "Clipping",
      named[4] /* mnClipping */
    ),
    IupSubmenu( "Write Mode",
      named[5] /* mnWriteMode */
    ),
    IupItem( "Simulate", "SimpleDrawSimulate" ),
    IupItem( "Transform", "SimpleTransform" ),
    IupItem( "Context Plus", "SimpleContextPlus" ),
  NULL), NULL );
  named[7] = decl( "mnSurface", IupMenu(
    IupItem( "Window", "SimpleDrawWindow" ),
    IupItem( "Server Image", "SimpleDrawImage" ),
    IupItem( "Image RGB", "SimpleDrawImageRGB" ),
  NULL), NULL );
  named[8] = decl( "mnPrimitives", IupMenu(
    IupItem( "All", "SimpleDrawAll" ),
    IupItem( "Text Align", "SimpleDrawTextAlign" ),
    IupItem( "Text Fonts", "SimpleDrawTextFonts" ),
    IupItem( "Test", "SimpleDrawTest" ),
  NULL), NULL );
  named[9] = decl( "mnSimpleMenu", IupMenu(
    IupSubmenu( "File",
      named[2] /* mnFile */
    ),
    IupSubmenu( "Edit",
      named[3] /* mnEdit */
    ),
    IupSubmenu( "Options",
      named[6] /* mnOptions */
    ),
    IupSubmenu( "Surface",
      named[7] /* mnSurface */
    ),
    IupSubmenu( "Primitives",
      named[8] /* mnPrimitives */
    ),
  NULL), NULL );
  named[10] = decl( "SimpleCanvas", IupCanvas( "SimpleRepaint" ), 
    "BORDER", "0", NULL );
  named[11] = decl( "SimpleDialog", IupDialog(
    named[10] /* SimpleCanvas */
  ), 
    "TITLE", "Simple Draw", 
    "MENU", "mnSimpleMenu", NULL );
}