home *** CD-ROM | disk | FTP | other *** search
- @include \mbin\mh\wind.mh
-
- #
- # Demo of WTABLE 2d array editor.
- # setup as an array of notes.
- #
-
- NOROWS = 10
- NOCOLS = 3
- uchar x[NOROWS][NOCOLS] = {
- LC, q, 100,
- LD, q, 100,
- LE, q, 100,
- LF, q, 100,
- LG, q, 100,
- LA, q, 100,
- LB, q, 100,
- C, q, 100,
- D, q, 100,
- E, q, 100
- }
- LSIZE = 4 # max label size
- FSIZE = 4 # field size
-
- riff openWindows()
- int wd
-
- # void mosWindow(WVCO,0,0)
- # void mosWindow(WRCC,10,0)
- void outputWindow(WDEBUG,17,0,23,25,"printf") # halfway
-
- # NUMERIC window - set values in 1 dim uchar array,
- # 1 to N elements.
- # upX,upY
- # lowX,lowY
- # title string
- # nolabels = 1 must be 1
- # fieldsize = 5
- # nofields = 3
- # pointer to uchar array of size 1-n
- # should not wrap off screen!
- # size of array >= nofields
- wd = inputMWindow(WTABLE, 0, 0, NOROWS+1, NOCOLS*4+2+LSIZE, "note array", LSIZE, FSIZE, 0, &x)
- void windowControl(wd, NOTETRANSLATION, 0, 0)
- void windowControl(wd, TIMETRANSLATION, 1, 0)
- void windowControl(wd, VELTRANSLATION, 2, 0)
-
- end
-
- vco testit()
- int i
- void openWindows()
- for(;;)
- rest w
- for ( i = 0; i < NOROWS; i++)
- void printf("note %n %t %v",x[i][0],x[i][1],x[i][2])
- rest q
- end
- end
- end
-