home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
beehive
/
utilitys
/
swdemo15.arc
/
CDEMODAT.C
next >
Wrap
Text File
|
1991-08-11
|
4KB
|
129 lines
/***********************************************************************
File: CDEMODAT.C
Use: SWIND Demo Window 0 menu file
Eugene Nolan
Copyright 1989, All rights reserved
In "C", a \XXX is the representation of the octal value of XXX
So \033 = 1Bh = ESCape
\377 = FFh
etc, etc
and "C" also has the constants
\n = Newline = 0Ah
\r = Carriage return = 0Dh
In this file, the following sequences are for:
\033G\XXX\YYY is the string 1Bh,'G',X,Y = virtual term position
the cursor command
\033F\XXX is the string 1Bh,'F',X = virtual term set
attributes command
Note: \376 is a flag to the demo code that this byte of info
is really a 00h, but "C" uses 00h to terminate it's strings,
so a flag is required.
*************************************************************************/
static char *pnt;
/**** Window 0 main menu ****/
char *menu[]= {
"\033G\034\376\033F\007\377",
"SWIND Windowing Library\033F\376\377",
"\033G\042\001\377",
"Eugene Nolan\n\r\377",
" Control Commands\033G\062\002Cursor Commands\n\r\377",
"\033F\007Esc-1\033F\376 1 on Top\n\r\377",
"\033F\007Esc-2\033F\376 2 on Top\n\r\377",
"\033F\007Esc-3\033F\376 3 on Top\n\r\377",
"\033F\007Esc-4\033F\376 1 hide\n\r\377",
"\033F\007Esc-5\033F\376 2 hide\n\r\377",
"\033F\007Esc-6\033F\376 3 hide\n\r\377",
"\033F\007Esc-Esc-Esc\033F\376 Quit\r\377",
"\n\r\377",
"\033F\007Esc-D\033F\376 Move -X\n\r\377",
"\033F\007Esc-E\033F\376 Move +X\n\r\377",
"\033F\007Esc-F\033F\376 Move -Y\n\r\377",
"\033F\007Esc-G\033F\376 Move +Y\n\r\377",
"\033F\007Esc-H\033F\376 Size -XY\n\r\377",
"\033F\007Esc-I\033F\376 Size +XY\n\r\n\r\377",
"\033F\007Esc-J\033F\376 Tog Wrap\n\r\377",
"\033F\007Esc-K\033F\376 Tog Inside\n\r\377",
"\033F\007Esc-L\033F\376 Tog Bord\n\r\377",
"\033F\007Esc-M\033F\376 Tog AutoNL\n\r\377",
"\033F\007Esc-N\033F\376 Random XY\377",
"\033G\022\003\033F\007Esc-7\033F\376\377",
" 1 Unhide\377",
"\033G\022\004\033F\007Esc-8\033F\376\377",
" 2 Unhide\377",
"\033G\022\005\033F\007Esc-9\033F\376\377",
" 3 Unhide\377",
"\033G\022\006\033F\007Esc-A\033F\376\377",
" 1 Active\377",
"\033G\022\007\033F\007Esc-B\033F\376\377",
" 2 Active\377",
"\033G\022\010\033F\007Esc-C\033F\376\377",
" 3 Active\377",
"\033G\046\003On Top\377",
"\033G\046\004Active\377",
"\033G\060\003\033F\007^W\033F\376\377",
"\033G\060\004\033F\007^E\033F\376\377",
"\033G\060\005/\\\377",
"\033G\056\006\033F\007^S\033F\376 \377",
"\033F\007^D\033F\376\377",
"\033G\060\007\\/\377",
"\033G\060\010\033F\007^X\033F\376\377",
"\033G\060\011\033F\007^Z\033F\376\377",
"\033G\070\003\033F\007^Y\033F\376 DelLin\377",
"\033G\070\004\033F\007^Q^Y\033F\376 DelEol\377",
"\033G\070\005\033F\007^Q^H\033F\376 DelBol\377",
"\033G\070\006\033F\007^Q^B\033F\376 TogBold\377",
"\033G\070\007\033F\007^Q^U\033F\376 InsLin\377",
"\033G\070\010\033F\007^Q^A\033F\376 ClrWin\377"
};
int msize ={ sizeof(menu)/sizeof(pnt) }; /* msize=# of elements
in array menu */
char selpos[] = "\033G\044\004\376"; /* Cursor position in W0
to say which window
is currently selected */
char toppos[] = "\033G\044\003\376"; /* Cursor position in W0
to say which window
is on top */
/* Virtual terminal codes */
char curup[] = "\033K";
char curdw[] = "\033L";
char curlf[] = "\033J";
char currt[] = "\033I";
char revlf[] = "\033H";
char inslin[] = "\033A";
char dellin[] = "\033B";
char erabol[] = "\033D";
char eraeol[] = "\033C";
char erawin[] = "\033E";
char boldon[] = "\033F\007";
char boldof[] = "\033F";
char clrwin[] = "\033E";
char ishidn[] = "\033G\044\007\033F\007Hidden\377"; /* demo message in window 0
to say window hidden */
char ishid1[] = "\033G\044\007\033F\376 \377";
/* Demo message to say
only unhide or quit
is valid */
char isnon[] =
"\033G\044\007\033F\007Unhide\033G\046\010Or\033G\045\011Quit\033F\376\377";
char isnon1[] =
"\033G\044\007 \033G\046\010 \033G\045\011 \377";