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 #include <Xm/Xm.h>
51 #include <XmL/Grid.h>
52
53 static char *data =
54 "Europe|CD-ROM|$29\n\
55 Yugoslovia|Floppy|$39\n\
56 North America|Tape|$29\n\
57 South America|CD-ROM|$49\n\
58 Japan|Tape|$49\n\
59 Russia|Floppy|$49\n\
60 Poland|CD-ROM|$39\n\
61 Norway|CD-ROM|$29\n\
62 England|Tape|$49\n\
63 Jordan|CD-ROM|$39";
64
65 main(argc, argv)
66 int argc;
67 char *argv[];
68 {
69 XtAppContext app;
70 Widget shell, grid;
71
72 shell = XtAppInitialize(&app,
"Grid1",
NULL,
0,
73 &argc, argv,
NULL,
NULL,
0);
74
75 grid = XtVaCreateManagedWidget(
"grid",
76 xmlGridWidgetClass, shell,
77 XmNrows,
10,
78 XmNvisibleRows,
7,
79 XmNcolumns,
3,
80 XmNsimpleWidths,
"20c 8c 8c",
81 XmNhorizontalSizePolicy, XmVARIABLE,
82 NULL);
83 XmLGridSetStrings(grid, data);
84
85 XtRealizeWidget(shell);
86
87 XtAppMainLoop(app);
88 }
89
90