1# FTE pull-down menu for REXX mode
2# by Michael DeBusk
3# debu4335@eclipsetel.com
4# Revision March 19, 2001
5
6# Decide if you want menus for libraries
7# Uncomment to include
8%define(REXXUtil)
9#%define(RxFTP)
10#%define(RxSock)
11
12menu REXX_Comments {
13    item    "&Header\theadx" { REXX_Heading }
14    item    "&Comment\tC+E c" { REXX_Comment }
15}
16
17menu REXX_Constructs {
18    item    "&Do\tdox" { REXX_Do }
19    item    "Do &While\tdwx" { REXX_DoWhile }
20    item    "Do &Until\tdux" { REXX_DoUntil }
21    item    "Do &Forever\tdfx" { REXX_DoForever }
22    item    "&If-Then-Else\tifx" { REXX_If }
23    item    "&Select\tselx" { REXX_Select }
24}
25
26# Keywords
27menu REXX_Call {
28    item    "&Call" { InsertString "CALL name [expression]"; }
29    item    "Call &On" { InsertString "CALL ON condition [NAME trapname]"; }
30    item    "Call O&ff" { InsertString "CALL OFF condition"; }
31}
32
33menu REXX_Numeric {
34    item    "&Digits" { InsertString "NUMERIC DIGITS [expression]"; }
35    item    "&Form" { InsertString "NUMERIC FORM [SCIENTIFIC | ENGINEERING | [VALUE] exp]"; }
36    item    "Fu&zz" { InsertString "NUMERIC FUZZ [exp]"; }
37}
38
39menu REXX_Parse {
40    item    "&Arg" { InsertString "PARSE [UPPER] ARG [template]"; }
41    item    "&LineIn" { InsertString "PARSE [UPPER] LINEIN [template]"; }
42    item    "&Pull" { InsertString "PARSE [UPPER] PULL [template]"; }
43    item    "&Source" { InsertString "PARSE [UPPER] SOURCE [template]"; }
44    item    "&Value" { InsertString "PARSE [UPPER] VALUE [expression] WITH [template]"; }
45    item    "Va&r" { InsertString "PARSE [UPPER] VAR [template]"; }
46    item    "Ver&sion" { InsertString "PARSE [UPPER] VERSION [template]"; }
47}
48menu REXX_Signal {
49    item    "&Signal" { InsertString "SIGNAL labelname"; }
50    item    "&Value" { InsertString "SIGNAL [VALUE] expression"; }
51    item    "&On" { InsertString "SIGNAL ON condition [NAME trapname]"; }
52    item    "O&ff" { InsertString "SIGNAL OFF condition"; }
53}
54
55menu REXX_Trace {
56    item    "&All" { InsertString "TRACE 'A'"; }
57    item    "&Commands" { InsertString "TRACE 'C'"; }
58    item    "&Error" { InsertString "TRACE 'E'"; }
59    item    "&Failure" { InsertString "TRACE 'F'"; }
60    item    "&Intermediates" { InsertString "TRACE 'I'"; }
61    item    "&Labels" { InsertString "TRACE 'L'"; }
62    item    "&Normal" { InsertString "TRACE 'N'"; }
63    item    "&Off" { InsertString "TRACE 'O'"; }
64    item    "&Results" { InsertString "TRACE 'R'"; }
65}
66
67menu REXX_Keywords {
68    item    "Address" { InsertString "ADDRESS [environment/value] [expression]"; }
69    item    "Ar&g" { InsertString "ARG [template]"; }
70    submenu "&Call", REXX_Call;
71    item    "&Drop" { InsertString "DROP variable-list"; }
72    item    "E&xit" { InsertString "EXIT expression"; }
73    item    "Interpret" { InsertString "INTERPRET expression"; }
74    item    "Iterate" { InsertString "ITERATE name"; }
75    item    "Le&ave" { InsertString "LEAVE name"; }
76    item    "&NOP" { InsertString "NOP"; }
77    submenu "Numer&ic", REXX_Numeric;
78    item    "&Options" { InsertString "OPTIONS expression"; }
79    submenu "&Parse", REXX_Parse;
80    item    "Proc&edure" { InsertString ": PROCEDURE [EXPOSE variable-list]"; }
81    item    "Pu&ll" { InsertString "PULL [TEMPLATE]"; }
82    item    "P&ush" { InsertString "PUSH [expression]"; }
83    item    "&Queue" { InsertString "QUEUE [expression]"; }
84    item    "&Return" { InsertString "RETURN [expression]"; }
85    item    "Sa&y" { InsertString "SAY [expression]"; }
86    submenu "&Signal", REXX_Signal;
87    submenu "&Trace", REXX_Trace;
88}
89
90
91# Built-in Functions
92
93menu REXX_API {
94    item    "&Create Queue" { InsertString "RxQueue( Create [, queuename] )"; }
95    item    "&Delete Queue" { InsertString "RxQueue( Delete, queuename )"; }
96    item    "&Get Queue" { InsertString "RxQueue( Get )"; }
97    item    "&Set Queue" { InsertString "RxQueue( Set, newqueuename )"; }
98    item    "&Queued" { InsertString "Queued()"; }
99    item    "RxFunc&Add" { InsertString "RxFuncAdd( name, module, procedure )"; }
100    item    "RxFuncD&rop" { InsertString "RxFuncDrop( name )"; }
101    item    "RxFuncQuer&y" { InsertString "RxFuncQuery( name )"; }
102}
103
104menu REXX_Comp {
105    item    "Bit&And" { InsertString "BitAnd(string1 [, string2 ] [, pad ] )"; }
106    item    "Bit&Or" { InsertString "BitOr( string1 [, string2 ] [, pad ] )"; }
107    item    "Bit&Xor" { InsertString "BitXor( string1 [, string2 ] [, pad ] )"; }
108    item    "&Compare" { InsertString "Compare( string1, string2 [,pad] )"; }
109    item    "&Datatype" { InsertString "Datatype( string [, type ] )"; }
110    item    "&Translate" { InsertString "Translate(string, [[,tableo [,tablei [, pad]]]])"; }
111    item    "&Value" { InsertString "Value(name, [, [newvalue] [,selector]])"; }
112    item    "Veri&fy" { InsertString "Verify(string, reference [, [option] [,start]])"; }
113    item    "X&Range" { InsertString "XRange([start] [, end])"; }
114}
115
116menu REXX_Conv {
117    item    "B2X\t&1" { InsertString "B2X( binary_string )"; }
118    item    "C2D\t&2" { InsertString "C2D( string [, n] )"; }
119    item    "C2X\t&3" { InsertString "C2X( string )"; }
120    item    "D2C\t&4" { InsertString "D2C(number)[,n]"; }
121    item    "D2X\t&5" { InsertString "D2X(number[, n])"; }
122    item    "X2B\t&6" { InsertString "X2B(hexstring)"; }
123    item    "X2C\t&7" { InsertString "X2C(hexstring)"; }
124    item    "X2D\t&8" { InsertString "X2D(hextring [,n])"; }
125}
126
127menu REXX_Date {
128    item    "&Basedate" { InsertString "DATE('B')"; }
129    item    "&Days" { InsertString "DATE('D')"; }
130    item    "&European" { InsertString "DATE('E')"; }
131    item    "&Language" { InsertString "DATE('L')"; }
132    item    "&Month" { InsertString "DATE('M')"; }
133    item    "&Normal" { InsertString "DATE('N')"; }
134    item    "&Ordered" { InsertString "DATE('O')"; }
135    item    "&Sorted" { InsertString "DATE('S')"; }
136    item    "&USA" { InsertString "DATE('U')"; }
137    item    "&Weekday" { InsertString "DATE('W')"; }
138}
139
140menu REXX_Num {
141    item    "&Abs" { InsertString "Abs(number)"; }
142    item    "&Digits" { InsertString "Digits()"; }
143    item    "&Form" { InsertString "Form()"; }
144    item    "Fo&rmat" { InsertString "Format( number, [before [, after [, expp] [,expt] ]])"; }
145    item    "Fu&zz" { InsertString "Fuzz()"; }
146    item    "Ma&x" { InsertString "Max( number [, number ...] )"; }
147    item    "Mi&n" { InsertString "Min( number [, number ...] )"; }
148    item    "Rando&m" { InsertString "Random([min], [max] [, seed])"; }
149    item    "&Sign" { InsertString "Sign(number)"; }
150    item    "&Trunc" { InsertString "Trunc(number [,n])"; }
151}
152
153menu REXX_Stream {
154    item    "&Command" { InsertString "Stream(name, 'C]', streamcommand)"; }
155    item    "&Description" { InsertString "Stream(name, 'D')"; }
156    item    "&State" { InsertString "Stream(name, 'S')"; }
157}
158
159menu REXX_Strings {
160    item    "&Abbrev" { InsertString "Abbrev(information, info [,length])"; }
161    item    "Arg" { InsertString "Arg([n [, option]])"; }
162    item    "&Center" { InsertString "Center( string, length [, pad ] )"; }
163    item    "Char&In" { InsertString "CharIn( [name] [, start, length ] )"; }
164    item    "Char&Out" { InsertString "CharOut( [name] [, string, start ] )"; }
165    item    "Chars" { InsertString "Chars( [name] )"; }
166    item    "Copies" { InsertString "Copies( string, n )"; }
167    item    "&DelStr" { InsertString "DelStr( string, n, [, length] )"; }
168    item    "I&nsert" { InsertString "Insert( new, target [, [n] [, [length] [,pad]]])"; }
169    item    "&LastPos" { InsertString "LastPos( needle, haystack [,start])"; }
170    item    "Le&ft" { InsertString "Left( string, length [,pad] )"; }
171    item    "Lengt&h" { InsertString "Length( string )"; }
172    item    "Lin&eIn" { InsertString "LineIn( [name] [, [line] [,count] ] )"; }
173    item    "LineOu&t" { InsertString "LineOut( [name] [, [string] [,line]] )"; }
174    item    "Line&s" { InsertString "Lines( [name] )"; }
175    item    "O&verlay" { InsertString "Overlay(new, target [, [n] [, [length] [,pad]]])"; }
176    item    "Pos" { InsertString "Pos( needle, haystack [, start] )"; }
177    item    "&Reverse" { InsertString "Reverse( string )"; }
178    item    "Ri&ght" { InsertString "Right( string, length, [,pad] )"; }
179    item    "S&pace" { InsertString "Space( string [, [n] [,pad]] )"; }
180    item    "Strip" { InsertString "Strip(string [, [option] [, char]])"; }
181    item    "Su&bstr" { InsertString "Substr(string, n [, [length] [, pad]])"; }
182    item    "S&ymbol" { InsertString "Symbol(name)"; }
183}
184
185menu REXX_Sys {
186    item    "&Address" { InsertString "Address()"; }
187    item    "&Beep" { InsertString "Beep(frequency, duration)"; }
188    item    "&Condition" { InsertString "Condition( option )"; }
189    item    "&Directory" { InsertString "Directory([newdirectory])"; }
190    item    "Error&Text" { InsertString "ErrorText(n)"; }
191    item    "&EndLocal" { InsertString "EndLocal()"; }
192    item    "&FileSpec" { InsertString "FileSpec(element, filespec)"; }
193    item    "Set&Local" { InsertString "SetLocal()"; }
194    item    "&SourceLine" { InsertString "SourceLine([n])"; }
195    item    "T&race" { InsertString "Trace([option])"; }
196}
197
198menu REXX_Time {
199    item    "&24-Hour" { InsertString "TIME()"; }
200    item    "&Civil" { InsertString "TIME('C')"; }
201    item    "&Elapsed" { InsertString "TIME('E')"; }
202    item    "&Hours" { InsertString "TIME('H')"; }
203    item    "&Long" { InsertString "TIME('L')"; }
204    item    "&Minutes" { InsertString "TIME('M')"; }
205    item    "&Normal" { InsertString "TIME('N')"; }
206    item    "&Reset" { InsertString "TIME('R')"; }
207    item    "&Seconds" { InsertString "TIME('S')"; }
208}
209
210menu REXX_Word {
211    item    "&DelWord" { InsertString "DelWord( string, n [, length] )"; }
212    item    "&SubWord" { InsertString "SubWord(string, n [,length])"; }
213    item    "&Word" { InsertString "Word(string, n)"; }
214    item    "Word&Index" { InsertString "WordIndex(string, n)"; }
215    item    "Word&Length" { InsertString "WordLength(string, n)"; }
216    item    "Word&Pos" { InsertString "WordPos(phrase, string [,start])"; }
217    item    "Wor&ds" { InsertString "Words(string)"; }
218}
219
220menu REXX_BuiltIn {
221    submenu "&API", REXX_API;
222    submenu "Com&parison", REXX_Comp;
223    submenu "&Conversion", REXX_Conv;
224    submenu "&Date", REXX_Date;
225    submenu "&Numbers", REXX_Num;
226    submenu "&Stream", REXX_Stream;
227    submenu "Strin&gs", REXX_Strings;
228    submenu "S&ystem", REXX_Sys;
229    submenu "&Time", REXX_Time;
230    submenu "&Word", REXX_Word;
231}
232
233#REXXUtil Functions
234%if(REXXUtil)
235menu REXX_Disk {
236    item    "SysDrive&Info" { InsertString "info = SysDriveInfo(drive)"; }
237    item    "SysDrive&Map" { InsertString "map = SysDriveMap([drive], [opt])"; }
238    item    "SysFile&Delete" { InsertString "rc = SysFileDelete(file)"; }
239    item    "SysFile&Tree" { InsertString "rc = SysFileTree(filespec, stem, [options], [tattrib], [nattrib])"; }
240    item    "SysFile&Search" { InsertString "CALL SysFileSearch target, file, stem, [options]"; }
241    item    "Sys&GetEA" { InsertString "result = SysGetEA(file, name, variable)"; }
242    item    "SysM&kDir" { InsertString "rc = SysMkDir(dirspec)"; }
243    item    "Sys&PutEA" { InsertString "result = SysPutEA(file, name, value)"; }
244    item    "Sys&RmDir" { InsertString "rc = SysRmDir(dirspec)"; }
245    item    "SysSear&chPath" { InsertString "filespec = SysSearchPath(path, filename)"; }
246    item    "SysTemp&FileName" { InsertString "file = SysTempFileName(template, [filter])"; }
247}
248
249menu REXX_INI {
250    item    "&Set key value" { InsertString "result = SysIni([inifile], app, key, val)"; }
251    item    "&Query key value" { InsertString "result = SysIni([inifile], app, key)"; }
252    item    "&Delete key" { InsertString "result = SysIni([inifile], app, key, 'DELETE:')"; }
253    item    "Delete &application" { InsertString "result = SysIni([inifile], app, ['DELETE:'])"; }
254    item    "Query application &keys" { InsertString "result = SysIni([inifile], app, 'ALL:', 'stem')"; }
255    item    "Query a&ll apps" { InsertString "result = SysIni([inifile], 'ALL:', 'stem')"; }
256}
257
258menu REXX_Misc {
259    item    "Rx&MessageBox" { InsertString "action = RxMessageBox(text, [title], [button], [icon])"; }
260    item    "Sys&DropFuncs" { InsertString "CALL SysDropFuncs"; }
261    item    "Sys&GetMessage" { InsertString "msg = SysGetMessage(num, [file] [str1],...[str9])"; }
262    item    "Sys&OS2Ver" { InsertString "ver = SysOS2Ver()"; }
263    item    "Sys&Sleep" { InsertString "CALL SysSleep secs"; }
264    item    "Sys&WaitNamedPipe" { InsertString "result = SysWaitNamedPipe(name, [timeout])"; }
265}
266
267menu REXX_TxtScr {
268    item    "Sys&Cls" { InsertString "CALL SysCls"; }
269    item    "SysC&urPos" { InsertString "pos = SysCurPos([row, col])"; }
270    item    "SysCu&rState" { InsertString "CALL SysCurState ON/OFF"; }
271    item    "Sys&GetKey" { InsertString "key = SysGetKey([ECHO/NOECHO])"; }
272    item    "Sys&TextScreenRead" { InsertString "string = SysTextScreenRead(row, col, [len])"; }
273    item    "SysTe&xtScreenSize" { InsertString "result = SysTextScreenSize()"; }
274}
275
276menu REXX_WPS {
277    item    "Sys&CreateObject" { InsertString "rc = SysCreateObject(classname, title, location [,setup] [,option])"; }
278    item    "Sys&DeregisterObjectClass" { InsertString "rc = SysDeregisterObjectClass(class)"; }
279    item    "SysDe&stroyObject" { InsertString "result = SysDestroyObject(name)"; }
280    item    "Sys&QueryClassList" { InsertString "CALL SysQueryClassList stem"; }
281    item    "Sys&RegisterObjectClass" { InsertString "rc = SysRegisterObjectClass(class, module)"; }
282    item    "SysSet&Icon" { InsertString "rc = SysSetIcon(filename, iconfilename)"; }
283    item    "SysSet&ObjectData" { InsertString "rc = SysSetObjectData(name, setup)"; }
284    item    "SysCo&pyObject" {InsertString "rc = SysCopyObject(objectName, objectDest)"; }
285    item    "SysCr&eateShadow" {InsertString "rc = SysCreateShadow(objectName, objectDest)"; }
286    item    "SysMo&veObject" {InsertString "rc = SysMoveObject(objectName, objectDest)"; }
287    item    "SysS&aveObject" {InsertString "rc = SysSaveObject(name, fAsync)"; }
288    item    "SysOpe&nObject" {InsertString "rc = SysOpenObject(name, View, Flag)"; }
289}
290
291menu REXX_RU {
292    item "&Load REXXUtil\tutilx" { REXX_RexxUtil }
293    submenu "&Disk Services", REXX_Disk;
294    submenu "&Miscellaneous", REXX_Misc;
295    submenu "&SysIni", REXX_INI;
296    submenu "&Text Screen Svc", REXX_TxtScr;
297    submenu "&WPS Services", REXX_WPS;
298}
299%endif
300
301# REXXSock
302%if(OS_OS2)
303%if(RxSock)
304menu REXX_RS {
305    item    "&Load REXXSock\tsockx" { REXX_RxSock }
306    item    "Sock&Accept" { InsertString "socket = SockAccept(socket[,address])"; }
307    item    "Sock&Bind" { InsertString "rc = SockBind(socket,address)"; }
308    item    "Sock&Close" { InsertString "rc = SockClose(socket)"; }
309    item    "SockConnec&t" { InsertString "rc = SockConnect(socket,address)"; }
310    item    "Sock&DropFuncs" { InsertString "rc = SockDropFuncs()"; }
311    item    "Sock&GetHostByAddr" { InsertString "rc = SockGetHostByAddr(dotAddress,host[,domain])"; }
312    item    "SockGetHostBy&Name" { InsertString "rc = SockGetHostByName(nameAddress,host])"; }
313    item    "SockGetHost&Id" { InsertString "dotAddress = SockGetHostId()"; }
314    item    "SockGetP&eerName" { InsertString "rc = SockGetPeerName(socket,address)"; }
315    item    "SockGetSockNa&me" { InsertString "rc = SockGetSockName(socket,address)"; }
316    item    "SockGetSockO&pt" { InsertString "rc = SockGetSockOpt(socket,level,optVar,optVal"; }
317    item    "&SockInit" { InsertString "rc = SockInit()"; }
318    item    "SockI&octl" { InsertString "rc = SockIoctl(socket,ioctlCmd,ioctlData)"; }
319    item    "Soc&kListen" { InsertString "rc = SockListen(socket,backlog)"; }
320    item    "SockPSock_Errno" { InsertString "SockPSock_Errno([error_string])"; }
321    item    "SockRec&v" { InsertString "rc = SockRecv(socket,var,len[,flags])"; }
322    item    "SockRecv&From" { InsertString "rc = SockRecvFrom(socket,var,len[,flags],address)"; }
323    item    "SockSelect" { InsertString "rc = SockSelect(reads,writes,excepts[,timeout])"; }
324    item    "SockSend" { InsertString "rc = SockSend(socket,data[,flags])"; }
325    item    "SockSendTo" { InsertString "rc = SockSendTo(socket,data[,flags],address)"; }
326    item    "SockSetSockOpt" { InsertString "rc = SockSetSockOpt(socket,level,optVar,optVal)"; }
327    item    "SockShutDo&wn" { InsertString "rc = SockShutDown(socket,how)"; }
328    item    "SockSock_E&rrno" { InsertString "errno = SockSock_Errno()"; }
329    item    "SockSocket" { InsertString "socket = SockSocket(domain,type,protocol)"; }
330    item    "SockSoClose" { InsertString "rc = SockSoClose(socket)"; }
331    item    "SockVersion" { InsertString "vers = SockVersion()"; }
332}
333%endif
334
335# RxFTP
336%if(RxFTP)
337menu REXX_F {
338    item    "&Load REXXFTP\tftpx" { REXX_RxFTP }
339    item    "&Append to Remote File" { InsertString "rc = FtpAppend(localFile,remoteFile[,'Binary'|'Ascii'])"; }
340    item    "&ChDir Remote" { InsertString "rc = FtpChDir(directory)"; }
341    item    "&Delete Remote File" { InsertString "FtpDelete(remoteFile)"; }
342    item    "&Remote Dir Listing" { InsertString "FtpDir(pattern,stem)"; }
343    item    "Dr&op RxFTP Functions" { InsertString "FtpDropFuncs()"; }
344    item    "Do&wnload File" { InsertString "FtpGet(localFile,remoteFile[,'Binary'|'Ascii'])"; }
345    item    "Lo&goff" { InsertString "FtpLogoff()"; }
346    item    "Remote L&s Listing" { InsertString "FtpLs(pattern,stem)"; }
347    item    "M&kDir Remote" { InsertString "FtpMkDir(directory)"; }
348    item    "&Ping Host" { InsertString "FtpPing(host,length)"; }
349    item    "Copy by Pro&xy" { InsertString "FtpProxy(rc = FtpProxy(host1,userid1,password1,account1,host2,userid2,password2,account2,file1,file2[,'Binary'|'Ascii']))"; }
350    item    "Upload &File" { InsertString "FtpPut(localFile,remoteFile[,'Binary'|'Ascii'])"; }
351    item    "Upload File, Uni&que" { InsertString "FtpPutUnique(localFile,remoteFile[,'Binary'|'Ascii'])"; }
352    item    "G&et Current Remote Dir" { InsertString "FtpPwd(dirName)"; }
353    item    "Se&nd a String" { InsertString "FtpQuote(quote)"; }
354    item    "Rena&me Remote File" { InsertString "FtpRename(oldFile,newFile)"; }
355    item    "RmD&ir Remote" { InsertString "FtpRmDir(directory)"; }
356    item    "&Binary or ASCII" { InsertString "FtpSetBinary('Binary'|'Ascii')"; }
357    item    "Set &User Information" { InsertString "FtpSetUser(host,userid,password[,account])"; }
358    item    "Sen&d Site Information" { InsertString "FtpSite(site)"; }
359    item    "Get Remo&te Operating System" { InsertString "FtpSys(operSys)"; }
360    item    "&Version of RxFTP API" { InsertString "FtpVersion(variable)"; }
361}
362%endif
363%endif
364
365menu REXX_Libraries {
366    %if(REXXUtil)
367    submenu "REXX&Util", REXX_RU;
368    %endif
369%if(OS_OS2)
370    %if(RxSock)
371    submenu "REXX&Sock", REXX_RS;
372    %endif
373    %if(RxFTP)
374    submenu "REXX&FTP", REXX_F;
375    %endif
376%endif
377}
378
379menu REXXTags {
380    submenu "&Comments", REXX_Comments;
381    submenu "Co&nstructs", REXX_Constructs;
382    submenu "&Keywords", REXX_Keywords;
383    submenu "&Libraries", REXX_Libraries;
384    submenu "&Functions", REXX_BuiltIn;
385}
386
387menu Main_REXX {
388    submenu "&File",    File;
389    submenu "&Edit",    Edit;
390    submenu "&Block",   Block;
391    submenu "&Search",  Search;
392    submenu "Fol&d",    Fold;
393    submenu "&Tools",   Tools;
394    submenu "&REXX",    REXXTags;
395    submenu "&Window",  Window;
396    submenu "&Options", Options;
397    submenu "&Help",    Help;
398}
399
400eventmap REXX {
401    MainMenu            = "Main_REXX";   # menu for menubar
402    key [A+R] { MainMenu 'R' }
403}
404