home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / HILFEN / SYSTEM / MSH / MENU.MSH < prev    next >
Text File  |  1993-12-01  |  6KB  |  181 lines

  1. |       file MENU.MSH   where menus are defined
  2. |
  3. (normal_att current_att current_selected_att false true menu.install)
  4. permanent_menu!
  5. (normal_att current_att current_selected_att "hv" true menu.install)
  6. permanent_bordered_menu!
  7. (normal_att current_att current_selected_att "hv" false menu.install)
  8. temp_bordered_menu!
  9. |
  10. ((quit)(cmdlist prog_dir"cmdlst"& write quit)
  11. "just %quit%
  12. or also %save% your cmd stack?"
  13. () "-1" 12 temp_bordered_menu)qmenu!
  14. |
  15. ("your turn""please create your own menu here"message)yourmenu!
  16. |
  17. (floppy_drives fixed_drives &
  18.  0 i!
  19.  (dup length i >)
  20.  (i 1 + i! dup i i substring ":\""& "(\""swap& "cwd!refresh)"& # swap)
  21.  while
  22.  0 i!"" swap
  23.  (dup length i >)
  24.  (i 1 + i! dup i i substring ":%"&" "&" %"swap& 3 roll swap& swap)
  25.  while
  26.  drop
  27.  " Goto"nl& swap&
  28.  () linescols i 4 * 2+ - swap 2/ menu_line+
  29.  permanent_bordered_menu drive_menu_no!)
  30. drive_menu!
  31. |
  32. (drive_menu_no window.activate)dmenu!
  33. |
  34. ((ascii)(ls_MU)(dosmenu)(panel_stats)(prog_dir "cmdlst"&read cmdlist!)
  35. (toggle_menu)(true capt_screen)
  36. (selected_fit_other)(reconfig)(swap_menu)
  37. " ShiftF1 %ascii table%
  38.  CtrlL   %disk stats%
  39.  ShiftF7 %DOS commands%
  40.          %panels stats%
  41.      %read old command stack%
  42.  ShiftF4 %1/2 line top menu%
  43.  ShiftF5 %capture screen%
  44.  ShiftF2 %space on other panel%
  45.  F9      %change configuration%
  46.  ShiftF10 %swap menu%" (main_menu) 20 menu_line 1+ temp_bordered_menu)imenu!
  47. |
  48. (("chkdsk "exec)("format a:"exec)("c:\" cwd"!"format a: /s"exec)
  49. ("format b:"exec)("format b: /n:9 /t:80" exec)
  50. (" warning ""  Either you don't know what you're doing, and Mi-Shell
  51.  is not going to protect you from big mistakes,
  52.  or you are kidding, and so are we . . . !"message)
  53. "%chkdsk%
  54. %format a:%
  55. %format a: bootable%
  56. %format b: (1.4M)%
  57. %format b: (720K in 1.4M drive)%
  58. %format C:%
  59. " (main_menu) 15 menu_line 1+ temp_bordered_menu)dosmenu!
  60. |
  61. |
  62. ((select_on_off)(copy_files)(move_files)(delete_files)(whereis)(find_string)
  63. ("pkzip " "what zip file do you want to create or update?"
  64. 50 input & " "& selected_list & exec)
  65. (editor exec)(file_stats)("copy "current.name &" prn"& exec)
  66. " F2     %select%
  67.  F5     %copy% selected
  68.  F6     %move% selected
  69.  F8     %delete% selected
  70.         %find a file%
  71.         %find a string%
  72.         %zip% selected
  73.         %edit new%
  74.  CtrlF9 %specs% of current file
  75.         %print%" (main_menu) 1 menu_line 1+ temp_bordered_menu)fmenu!
  76. |
  77. ((browse_current)(editor current.name & exec)
  78. (editor selected_list deselect & exec)(od)(wc)
  79. (browser selected_list deselect & (exec) with_nomagic)
  80. " F3      %view current%
  81.  F4      %edit current%
  82.          %edit selected%
  83.  ShiftF3 %hex dump%
  84.          %word count selected%
  85.  CtrlF3  %browse selected%" (main_menu) 8 menu_line 1+ temp_bordered_menu)vmenu!
  86. |
  87. ((expand_panel)(trim_panel)(hide_all)(wide_narrow)(top_bottom)(swap_panels)
  88.  (refresh)("N" panel.sort!)("E" panel.sort!)("S" panel.sort!)("T" panel.sort!)
  89. " CtrlE     %Expand% panel
  90.  CtrlT     %Trim% panel
  91.  CrtlO     %hide% panels and menus
  92.                   (toggle)
  93.  AltW      %Wide/narrow toggle%
  94.            %top/bottom toggle%
  95.  CtrlU     %swap% panels
  96.  CtrlR     %Refresh% panel
  97.  
  98.   Sort Panel by
  99.  AltN  %Name%
  100.  AltE  %Extension%
  101.  AltS  %Size%
  102.  AltT  %Time%
  103. " (main_menu) 35 menu_line 1+ temp_bordered_menu)pmenu!
  104. |
  105. ((browse_current)(editor current.name&exec)("ZOO "current.name &execshow)
  106. "  It is simple to associate a menu with an extension:
  107.       What the hell do you want to do to this
  108.            poor little Stephan file ?
  109.  
  110.   %view it% could have used F3 or click right
  111.   %edit it% could have used F4 or double click right
  112.   %ZOO it% try it if you dare, no shortcuts for this one."
  113.  () 10 10 temp_bordered_menu)stemenu!
  114. |              ┌───────────┐
  115. |              │ Help menu │
  116. |              └───────────┘
  117. |
  118. ("help.msh"loaddefs help_menu)hmenu!
  119. |
  120. |              ┌────────────┐
  121. |              │ Magic menu │
  122. |              └────────────┘
  123. |
  124. | show state of magic switch -- if activated call "swapping type" menu
  125. |
  126. ("magic_menu_no"isdefined(magic_menu_no window.uninstall)if
  127.  (swap_menu)magic dup (dup 1 1 substring "*"=
  128.                     ("*"cutfirst swap drop ("% D%")("%  %")ifelse)
  129.             (drop"%XD%")ifelse)(drop"%X %")ifelse
  130.  () 78 0 permanent_menu magic_menu_no!)
  131. magic_menu!
  132. |              ┌───────────────┐
  133. |              │ swapping menu │
  134. |              └───────────────┘
  135. |
  136. ((false magic!magic_menu)(tmp_dir magic!magic_menu)
  137.  ("*"tmp_dir&magic!magic_menu)("*"magic!magic_menu)
  138. " What type of swapping do you want:
  139.    %XMS% (default)
  140.    %to directory "tmp_dir&"% if no XMS
  141.    %to directory "&tmp_dir&"% always
  142.    %no swapping%"&
  143. () 30 4 temp_bordered_menu)swap_menu!
  144. |
  145. |    toggle between one-line and two-line main menu
  146. |
  147. ( menu_line 0=(1 menu_line!)(0 menu_line!)ifelse
  148.   (panel.startrc swap menu_line 0= ("-1")(1)ifelse + swap panel.startrc!
  149.   )loop_panels
  150.   main_menu_no window.uninstall
  151.   show_menu clock 
  152. )toggle_menu!
  153. |
  154. ( menu_line 0=
  155. |              ┌───────────────────────┐
  156. |              │ Main menu -- 1 line   │
  157. |              └───────────────────────┘
  158. |
  159. ((hmenu)(fmenu)(vmenu)(imenu)(CtrlW)(pmenu)(personal_menu)(qmenu)
  160. "F1%Help%   %Files%   %View/edit%   %mIsc%   %Whereto%   %Panel%   %Special%   F10%Quit%  "
  161.  () 0 0 permanent_menu main_menu_no!
  162. 0 menu_line!)
  163. |
  164. |              ┌───────────────────────┐
  165. |              │ Main menu -- 2 lines  │
  166. |              └───────────────────────┘
  167. |
  168. ((hmenu)(select_on_off)(browse_current)(editor current.name & exec)
  169. (copy_files)(move_files)(yourmenu)(delete_files)(reconfig)(qmenu)
  170. (ascii)(selected_fit_other)(od)(toggle_menu)
  171. (true capt_screen)(ls_hide)(dosmenu)(delta) (whereto)(swap_menu)
  172. "F1 %Help% F2 %sel% F3 %view% F4 %edit% F5 %copy% F6 %mv% F7 %menu% F8 %del% F9 %cfg% F10 %Quit%  
  173. Shft %asci%  %fito%    %hex%  %½ menu%  %screen%  %ls-hide%  %DOS%  %delta% %Whereto%   %magic%"
  174. () 0 0 permanent_menu main_menu_no!
  175. 1 menu_line!)
  176. ifelse
  177. )show_menu!
  178. |
  179. (main_menu_no window.activate)main_menu!
  180. |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  181.