home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / m / msh21.zip / MSHFILES.ZIP / MENU.MSH < prev    next >
Text File  |  1992-08-19  |  9KB  |  262 lines

  1. |       file MENU.MSH   where menus are defined
  2. |
  3. |              ┌───────────┐
  4. |              │ Quit menu │
  5. |              └───────────┘
  6. |
  7. ((quit)(cmdlist prog_dir"cmdlst"& dup unlink write quit)
  8. "just %quit%
  9. or also %save% your cmd stack?"
  10. () "-1" 12 "hv" temp_menu)qmenu!
  11. |
  12. ("your turn""please create your own menu here"message)yourmenu!
  13. |
  14. |              ┌────────────┐
  15. |              │ Drive menu │
  16. |              └────────────┘
  17. |
  18. ( floppy_drives fixed_drives &
  19.  0 i!
  20.  (dup length i >)
  21.  (i 1 + i! dup i i substring ":\""& "(\""swap& "cwd!refresh)"& # swap)
  22.  while
  23.  0 i!"" swap
  24.  (dup length i >)
  25.  (i 1 + i! dup i i substring ":%"&" "&" %"swap& 3 roll swap& swap)
  26.  while
  27.  drop
  28.  () linescols i 4 * 2+ - swap 2/ menu_line+
  29.  "hv: Goto " permanent_menu
  30.  drive_menu_no!)
  31. drive_menu!
  32. |
  33. |              ┌────────────────────┐
  34. |              │ Miscellaneous menu │
  35. |              └────────────────────┘
  36. |
  37. ((ascii)("att.ans"pager)(panel_stats)(dosmenu)(prog_dir "cmdlst"&read cmdlist!)
  38. (toggle_menu)(true capt_screen)
  39. (selected_fit_other)(reconfig)(swap_menu)
  40. " ShiftF1 %ascii table%
  41.          %table of ANSI video attributes%
  42.  CtrlL   %panel and disk stats%
  43.  ShiftF7 %DOS commands%
  44.      %read old command stack%
  45.  ShiftF4 %1/2 line top menu%
  46.  ShiftF5 %capture screen%
  47.  ShiftF2 %space on other panel%
  48.  F9      %change configuration%
  49.  ShiftF10 %swap menu%" (main_menu) 20 menu_line 1+ "hv" temp_menu)imenu!
  50. |
  51. |              ┌───────────────────┐
  52. |              │ DOS Commands menu │
  53. |              └───────────────────┘
  54. |
  55. (("chkdsk "exec)("format a:"exec)("c:\" cwd"!"format a: /s"exec)
  56. ("format b:"exec)("format b: /n:9 /t:80" exec)
  57. (" warning ""  Either you don't know what you're doing, and Mi-Shell
  58.  is not going to protect you from big mistakes,
  59.  or you are kidding, and so are we . . . !"message)
  60. "%chkdsk%
  61. %format a:%
  62. %format a: bootable%
  63. %format b: (1.4M)%
  64. %format b: (720K in 1.4M drive)%
  65. %format C:%
  66. " (main_menu) 15 menu_line 1+ "hv" temp_menu)dosmenu!
  67. |
  68. |              ┌───────────┐
  69. |              │ File menu │
  70. |              └───────────┘
  71. |
  72. ((select_on_off)(copy_files)(move_files)(delete_files)(whereis)(find_string)
  73. ( "what zip file do you want to create (or update)?"
  74.   50 input dup
  75.   ("pkzip "swap& " @"&make_responsefile&execute tmp_filename unlink reread)
  76.   if)
  77. ( "what arj file do you want to create (or update)?"
  78.   50 input dup
  79.   ("arj a "swap& " !"&make_responsefile&execute tmp_filename unlink reread)
  80.   if)
  81. (editor exec)("stats" file_stats message)("copy "current.name &" prn"& exec)
  82. " F2     %select%
  83.  F5     %copy% selected
  84.  F6     %move% selected
  85.  F8     %delete% selected
  86.         %find a file%
  87.         %find a string%
  88.         %zip% selected
  89.         %arj% selected
  90.         %edit new%
  91.  CtrlF9 %specs% of current file
  92.         %print%" (main_menu) 1 menu_line 1+ "hv" temp_menu)fmenu!
  93. |
  94. |              ┌────────────────┐
  95. |              │ View/Edit menu │
  96. |              └────────────────┘
  97. |
  98. ((browse_current)(editor current.name & exec)
  99. (editor selected_list deselect & exec)(od)(wc)
  100. (browser selected_list deselect & (exec) with_nomagic)
  101. " F3      %view current%
  102.  F4      %edit current%
  103.          %edit selected%
  104.  ShiftF3 %hex dump%
  105.          %word count selected%
  106.  CtrlF3  %browse selected%" (main_menu) 8 menu_line 1+ "hv" temp_menu)vmenu!
  107. |
  108. |              ┌────────────┐
  109. |              │ Panel menu │
  110. |              └────────────┘
  111. |
  112. ((expand_panel)(trim_panel)(hide_all)(wide_narrow)(swap_panels)(refresh)
  113.  (side_by_side) (full_screen_panels)(top_bottom)
  114.  ("N" panel.sort!)("E" panel.sort!)("S" panel.sort!)("T" panel.sort!)
  115. " CtrlE     %Expand% panel
  116.  CtrlT     %Trim% panel
  117.  CrtlO     %hide% panels and menus (toggle)
  118.  AltW      %toggle full info/filenames only%
  119.  CtrlU     %swap% panels
  120.  CtrlR     %Refresh% panel
  121.  
  122.               Panel disposition
  123.            %side-by-side% 
  124.            %side-by-side full screen% 
  125.        %one atop the other%
  126.  
  127.   Sort Panel by
  128.  AltN  %Name%
  129.  AltE  %Extension%
  130.  AltS  %Size%
  131.  AltT  %Time%
  132. " (main_menu) 35 menu_line 1+ "hv" temp_menu)pmenu!
  133. |
  134. |              ┌────────────┐
  135. |              │ Help menus │
  136. |              └────────────┘
  137. (prog_dir swap makename pager hmenu0)h0show!
  138. (("userman.doc"h0show)
  139. ("refman.doc"h0show)
  140. ("design.doc"h0show)
  141. ("history.doc"h0show)
  142. ("ordrform.doc"h0show)
  143. ("msh.art"h0show)
  144. ("config.msh"h0show)
  145. ("stddefs.msh"h0show)
  146. ("keybind.msh"h0show)
  147. ("menu.msh"h0show)
  148. ("ext.msh"h0show)
  149. ("help.msh"h0show)
  150. ("arjzip.msh"h0show)
  151. ("berk.msh"h0show)
  152. ("wildrun.msh"h0show)
  153. " %userman.doc%  User's manual (default environment)
  154.  %refman.doc%   Reference manual (MSH language)
  155.  %design.doc%   Explanation of some design features
  156.  %history.doc%  History of changes between versions
  157.  %ordrform.doc% Order form
  158.  %msh.art%      A good review of MSH by M.Durant
  159.  %config.msh%   overall configuration
  160.  %stddefs.msh%  standard definitions
  161.  %keybind.msh%  how the keys are bound to actions
  162.  %menu.msh%     menu definitions
  163.  %ext.msh%      what to do with typical file extensions
  164.  %help.msh%     this file
  165.  %arjzip.msh%   support for .zip and .arj archives
  166.  %berk.msh%     support for Berkeley Utils
  167.  %wildrun.msh%  wildcards on command line (by J.Pirnay)
  168. " (help_menu) 0 2 "hv: Select file you would like to browse "temp_menu)hmenu0!
  169. |
  170. (prog_dir swap makename read normal_message help_menu)hread!
  171. ((hmenu0)
  172. ("Command line actions" "command.hlp"hread)
  173. ("Panel actions" "panel.hlp"hread)
  174. ("Miscellaneous" "misc.hlp"hread)
  175. ("Mi-Shell Default FKey Assignments:" "fkey.hlp"hread)
  176. ("Mi-Shell Default Letter Key Assignments:" "alpha.hlp"hread)
  177. ("primitiv.msh"loaddefs help_menu)
  178. ("stdhlp.msh"loaddefs help_menu)
  179. ("Wildrun Actions" "wildrun.hlp"hread)
  180. ("demo.msh"loaddefs help_menu)
  181. ("demo2.msh"loaddefs help_menu)
  182. "  Help is available
  183. on the following topics
  184.  
  185.          %look at the msh doc and cfg files%
  186.          %command line control%
  187.          %directory panel control%
  188.          %special features%
  189.          %Fkey assignments%
  190.          %alpha key assignments%
  191.  CtrlF1  %list of primitives and their description%
  192.  AltF1   %list of std. defs.%
  193.          %syntax for wild cards on command line%
  194.  
  195.   %intoductory tutorial%
  196.   %advanced tutorial%
  197. " () 0 2 "hv" temp_menu)help_menu!
  198. |
  199. |              ┌────────────┐
  200. |              │ Magic menu │
  201. |              └────────────┘
  202. |
  203. | show state of magic switch -- if activated call "swapping type" menu
  204. |
  205. ( (swap_menu)magic dup (dup 1 1 substring "*"=
  206.             ("*"cutfirst swap drop ("% D%")("%  %")ifelse)
  207.         (drop"%XD%")ifelse)(drop"%X %")ifelse
  208.  () 78 0 "" permanent_menu magic_menu_no!)
  209. magic_menu!
  210. |              ┌───────────────┐
  211. |              │ swapping menu │
  212. |              └───────────────┘
  213. |
  214. ( magic_menu_no window.uninstall
  215.  (false magic!magic_menu)(tmp_dir magic!magic_menu)
  216.  ("*"tmp_dir&magic!magic_menu)("*"magic!magic_menu)
  217. " What type of swapping do you want:
  218.    %XMS% (default)
  219.    %to directory "tmp_dir&"% if no XMS
  220.    %to directory "&tmp_dir&"% always
  221.    %no swapping%"&
  222.  (magic_menu) 30 4 "hv" temp_menu)swap_menu!
  223. |
  224. |              ┌────────────────────────────────────────────────┐
  225. |              │ toggle between one-line and two-line main menu │
  226. |              └────────────────────────────────────────────────┘
  227. |
  228. ( menu_line 0=(1 menu_line!)(0 menu_line!)ifelse
  229.   (panel.startrc swap menu_line 0= ("-1")(1)ifelse + swap panel.startrc!
  230.    panel.rc swap menu_line 0= (1)("-1")ifelse + swap panel.rc!
  231.   )loop_panels
  232.   main_menu_no window.uninstall show_menu clock 
  233. )toggle_menu!
  234. |
  235. ( menu_line 0=
  236. |              ┌───────────────────────┐
  237. |              │ Main menu -- 1 line   │
  238. |              └───────────────────────┘
  239. |
  240. ((help_menu)(fmenu)(vmenu)(imenu)(CtrlW)(pmenu)(personal_menu)(qmenu)
  241. "F1%Help%   %Files%   %View/edit%   %mIsc%   %Whereto%   %Panel%   %Special%   F10%Quit%  "
  242.  () 0 0 "" permanent_menu main_menu_no!
  243. 0 menu_line!)
  244. |
  245. |              ┌───────────────────────┐
  246. |              │ Main menu -- 2 lines  │
  247. |              └───────────────────────┘
  248. |
  249. ((help_menu)(select_on_off)(browse_current)(editor current.name & exec)
  250. (copy_files)(move_files)(yourmenu)(delete_files)(reconfig)(qmenu)
  251. (ascii)(selected_fit_other)(od)(toggle_menu)
  252. (true capt_screen)(ls_hide)(dosmenu)(delta) (whereto)(swap_menu)
  253. "F1 %Help% F2 %sel% F3 %view% F4 %edit% F5 %copy% F6 %mv% F7 %menu% F8 %del% F9 %cfg% F10 %Quit%  
  254. Shft %asci%  %fito%    %hex%  %½ menu%  %screen%  %ls-hide%  %DOS%  %delta% %Whereto%   %magic%"
  255. () 0 0 "" permanent_menu main_menu_no!
  256. 1 menu_line!)
  257. ifelse
  258. )show_menu!
  259. |
  260. (main_menu_no window.activate)main_menu!
  261. |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  262.