home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / epm603a.zip / EPMMAC.ZIP / STDMENU.E < prev    next >
Text File  |  1995-10-18  |  48KB  |  755 lines

  1. compile if not defined(CORE_stuff)
  2. ; This determines whether the CORE-specific commands (DEFINE)
  3. ; are included in the menus.
  4.    const CORE_STUFF=0
  5. compile endif
  6.  
  7. /*
  8. ┌─────────────────────────────────────────────────────────────────────────────┐
  9. │What's it called  : loaddefaultmenu                                          │
  10. │                                                                             │
  11. │What does it do   : used by stdcnf.e to setup default EPM action bar         │
  12. │                    (Note: a menu id of 0 halts the interpreter when         │
  13. │                     selected.)                                              │
  14. │                                                                             │
  15. │Who and When      : Jerry C.     2/25/89                                     │
  16. └─────────────────────────────────────────────────────────────────────────────┘
  17. */
  18.  
  19. defc loaddefaultmenu
  20.    universal activemenu,defaultmenu
  21.  
  22.    parse arg menuname .
  23.    if menuname = '' then                  -- Initialization call
  24.       menuname = 'default'
  25.       defaultmenu = menuname              -- default menu name
  26.       activemenu  = defaultmenu
  27.    endif
  28.  
  29. compile if EPATH='LAMPATH'  -- LaMail sets up a mail menu first.
  30. defc loaddefaultmenu2
  31.    universal activemenu,defaultmenu
  32.    menuname = defaultmenu
  33. compile endif
  34.    call add_file_menu(menuname)
  35.    call add_edit_menu(menuname)
  36.    call add_search_menu(menuname)
  37.    call add_options_menu(menuname)
  38. compile if MENU_LIMIT
  39.    call add_ring_menu(menuname)
  40. compile endif
  41.    call add_command_menu(menuname)
  42. compile if EPATH<>'LAMPATH'  -- LaMail puts a VM menu here, then adds help.
  43.    call add_help_menu(menuname)
  44. compile endif
  45. compile if EVERSION = 5.60 -- Until next 5.60 update, anyway...
  46.    buildsubmenu  'SYSMENU', 81, '', '', 0 , 0
  47.      buildmenuitem 'SYSMENU', 81, 8100, \0,               '',                 4, 0
  48.      buildmenuitem 'SYSMENU', 81, 8101, CONFIG_MENU__MSG, 'configdlg SYS'CONFIG_MENUP__MSG,  0, mpfrom2short(HP_OPTIONS_CONFIG, 0)
  49.    showmenu 'SYSMENU',2
  50. compile endif
  51.  
  52. defproc add_file_menu(menuname)
  53. compile if RING_OPTIONAL
  54.    universal ring_enabled
  55. compile endif
  56.    buildsubmenu menuname, 2, FILE_BAR__MSG, FILE_BARP__MSG, 0 , mpfrom2short(HP_FILE, 0)
  57.      buildmenuitem menuname, 2, 198, NEW_MENU__MSG,            'NEW'NEW_MENUP__MSG,     0, mpfrom2short(HP_FILE_NEW, 0)
  58.      buildmenuitem menuname, 2, 199, OPEN_NEW_MENU__MSG,       'OPEN'OPEN_NEW_MENUP__MSG,     0, mpfrom2short(HP_FILE_OPEN_NEW, 0)
  59.      buildmenuitem menuname, 2, 200, OPEN_MENU__MSG\9 || CTRL_KEY__MSG'+O', 'OPENDLG'OPEN_MENUP__MSG,          0, mpfrom2short(HP_FILE_OPEN, 0)
  60.      buildmenuitem menuname, 2, 201, GET_MENU__MSG,            'OPENDLG GET'GET_MENUP__MSG,      0, mpfrom2short(HP_FILE_GET , 0)
  61. compile if RING_OPTIONAL
  62.    if ring_enabled then
  63. compile endif
  64.      buildmenuitem menuname, 2, 202, ADD_MENU__MSG\9'F8', 'OPENDLG EDIT'ADD_MENUP__MSG,     0, mpfrom2short(HP_FILE_EDIT, 0)
  65. compile if RING_OPTIONAL
  66.    endif
  67. compile endif
  68.      buildmenuitem menuname, 2, 203, \0,                          '',                 4, 0
  69.      buildmenuitem menuname, 2, 204, RENAME_MENU__MSG\9'F7',   'rename'RENAME_MENUP__MSG,0, mpfrom2short(HP_FILE_NAME, 0)
  70.      buildmenuitem menuname, 2, 205, \0,                          '',                 4, 0
  71.      buildmenuitem menuname, 2, 206, SAVE_MENU__MSG\9'F2',     'SAVE'SAVE_MENUP__MSG,             0, mpfrom2short(HP_FILE_SAVE, 0)
  72. compile if EVERSION >= '5.21'
  73.      buildmenuitem menuname, 2, 208, SAVEAS_MENU__MSG,         'SAVEAS_DLG'SAVEAS_MENUP__MSG, 0, mpfrom2short(HP_FILE_SAVEAS, 0)
  74. compile endif
  75. compile if RING_OPTIONAL
  76.    if ring_enabled then
  77. compile endif         -- Note:  207 used in LaMail; keep ID the same.
  78.      buildmenuitem menuname, 2, 207, FILE_MENU__MSG\9'F4',     'FILE'FILE_MENUP__MSG,             0, mpfrom2short(HP_FILE_FILE, 0)
  79. compile if RING_OPTIONAL
  80.    else
  81.      buildmenuitem menuname, 2, 207, SAVECLOSE_MENU__MSG\9'F4',     'FILE'FILE_MENUP__MSG,        0, mpfrom2short(HP_FILE_FILE, 0)
  82.    endif
  83. compile endif
  84.      buildmenuitem menuname, 2, 209, QUIT_MENU__MSG\9'F3',     'QUIT'QUIT_MENUP__MSG,             0, mpfrom2short(HP_FILE_QUIT, 0)
  85.      buildmenuitem menuname, 2, 210, \0,                           '',                 4, 0
  86. compile if ENHANCED_PRINT_SUPPORT
  87.      buildmenuitem menuname, 2, 211, PRT_FILE_MENU__MSG'...',  'printdlg'ENHPRT_FILE_MENUP__MSG,         0, mpfrom2short(HP_FILE_ENHPRINT, 0)
  88. compile elseif EVERSION < '5.51'
  89.      buildmenuitem menuname, 2, 211, PRT_FILE_MENU__MSG,       'xcom save' default_printer()PRT_FILE_MENUP__MSG,   0, mpfrom2short(HP_FILE_PRINT, 0)
  90. compile else
  91.      buildmenuitem menuname, 2, 211, PRT_FILE_MENU__MSG,       'xcom save /s /ne' default_printer()PRT_FILE_MENUP__MSG,   0, mpfrom2short(HP_FILE_PRINT, 0)
  92. compile endif
  93.    return
  94.  
  95. define
  96.  compile if not defined(ALTERNATE_PASTE)
  97.   compile if DEFAULT_PASTE = ''
  98.    ALTERNATE_PASTE = 'C'
  99.   compile else
  100.    ALTERNATE_PASTE = ''
  101.   compile endif
  102.  compile endif
  103.    PASTE_C_KEY = ''
  104.    PASTE_B_KEY = ''
  105.    PASTE_L_KEY = ''
  106. compile if ALTERNATE_PASTE = ''
  107.    PASTE_L_KEY = \9 || CTRL_KEY__MSG'+'SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  108. compile elseif ALTERNATE_PASTE = 'B'
  109.    PASTE_B_KEY = \9 || CTRL_KEY__MSG'+'SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  110. compile elseif ALTERNATE_PASTE = 'C'
  111.    PASTE_C_KEY = \9 || CTRL_KEY__MSG'+'SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  112. compile else
  113.    * Error:  ALTERNATE_PASTE must be '', 'B', or 'C'
  114. compile endif
  115. compile if DEFAULT_PASTE = ''
  116.    PASTE_L_KEY = \9 || SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  117. compile elseif DEFAULT_PASTE = 'B'
  118.    PASTE_B_KEY = \9 || SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  119. compile elseif DEFAULT_PASTE = 'C'
  120.    PASTE_C_KEY = \9 || SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  121. compile else
  122.    * Error:  DEFAULT_PASTE must be '', 'B', or 'C'
  123. compile endif
  124.  
  125. compile if not defined(MAIL_ACCEL__L)  -- LaMail not NLS-translated.
  126.   const MAIL_ACCEL__L = 'M'
  127.         MAIL_ACCEL__A1 =  77
  128.         MAIL_ACCEL__A2 = 109
  129. compile endif
  130. define  -- Prepare for some conditional tests
  131. compile if EPATH = 'LAMPATH'  -- If LaMail, "Mail" will be on action bar
  132.    maybe_mail_accel = 'MAIL_ACCEL__L <>'
  133. compile else                  -- otherwise, it won't
  134.    maybe_mail_accel = "' ' <"    -- Will be true for any letter
  135. compile endif
  136. compile if MENU_LIMIT
  137.    maybe_ring_accel = 'RING_ACCEL__L <>'
  138. compile else
  139.    maybe_ring_accel = "' ' <"  -- Will be true for any letter
  140. compile endif
  141. compile if defined(ACTIONS_ACCEL__L)  -- For CUSTEPM support
  142.    maybe_actions_accel = 'ACTIONS_ACCEL__L <>'
  143. compile else
  144.    maybe_actions_accel = "' ' <"  -- Will be true for any letter
  145. compile endif
  146.  
  147. defproc add_edit_menu(menuname)
  148.  compile if WANT_STACK_CMDS = 'SWITCH'
  149.    universal stack_cmds
  150.  compile endif
  151.  compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  152.    universal CUA_MENU_ACCEL
  153.  compile endif
  154.  
  155. compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  156.    accel_len = (3+length(ALT_KEY__MSG))*(not CUA_MENU_ACCEL)
  157. compile endif
  158.  
  159.    buildsubmenu  menuname, 8, EDIT_BAR__MSG, ''EDIT_BARP__MSG, 0 , mpfrom2short(HP_EDIT, 0)
  160.      buildmenuitem menuname, 8, 816, UNDO_MENU__MSG\9 || ALT_KEY__MSG'+'BACKSPACE_KEY__MSG,   'UNDO 1'UNDO_MENUP__MSG,    0, mpfrom2short(HP_EDIT_UNDO, 0)
  161.      buildmenuitem menuname, 8, 818, UNDO_REDO_MENU__MSG\9 || CTRL_KEY__MSG'+U', 'undodlg'UNDO_REDO_MENUP__MSG,      0, mpfrom2short(HP_EDIT_UNDOREDO, 0)
  162. compile if WANT_DM_BUFFER
  163.      buildmenuitem menuname, 8, 817, RECOVER_MARK_MENU__MSG,        'GetDMBuff'RECOVER_MARK_MENUP__MSG,    0, mpfrom2short(HP_EDIT_RECOVER, 0)
  164. compile endif  -- WANT_DM_BUFFER
  165.      buildmenuitem menuname, 8, 807, \0,                               '',          4, 0
  166.      buildmenuitem menuname, 8, 808, CLIP_COPY_MENU__MSG\9 || CTRL_KEY__MSG'+'INSERT_KEY__MSG ,  'Copy2Clip'CLIP_COPY_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPY, 0)
  167.      buildmenuitem menuname, 8, 809, CUT_MENU__MSG\9 || SHIFT_KEY__MSG'+'DELETE_KEY__MSG, 'Cut'CUT_MENUP__MSG,       0, mpfrom2short(HP_EDIT_CUT, 0)
  168.      buildmenuitem menuname, 8, 810, PASTE_C_MENU__MSG||PASTE_C_KEY,   'Paste C'PASTE_C_MENUP__MSG,   0, mpfrom2short(HP_EDIT_PASTEC, 0)
  169.      buildmenuitem menuname, 8, 811, PASTE_L_MENU__MSG||PASTE_L_KEY,   'Paste'PASTE_L_MENUP__MSG,     0, mpfrom2short(HP_EDIT_PASTE, 0)
  170.      buildmenuitem menuname, 8, 812, PASTE_B_MENU__MSG||PASTE_B_KEY,   'Paste B'PASTE_B_MENUP__MSG,   0, mpfrom2short(HP_EDIT_PASTEB, 0)
  171. compile if EVERSION >= 5.50  -- In 5.50, we have a STYLE attribute
  172.      buildmenuitem menuname, 8, 826, \0,                               '',          4, 0
  173.      buildmenuitem menuname, 8, 827, STYLE_MENU__MSG\9 || CTRL_KEY__MSG'+Y',        'fontlist'STYLE_MENUP__MSG,    0, mpfrom2short(HP_OPTIONS_STYLE, 0)
  174. compile endif
  175.      buildmenuitem menuname, 8, 815, \0,                               '',          4, 0
  176.  
  177. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'C' & EDIT_ACCEL__L<>'C' & SEARCH_ACCEL__L<>'C' & OPTIONS_ACCEL__L<>'C' & COMMAND_ACCEL__L<>'C' & HELP_ACCEL__L<>'C' & $maybe_mail_accel 'C' & $maybe_ring_accel 'C' & $maybe_actions_accel 'C')
  178.      buildmenuitem menuname, 8, 800, COPY_MARK_MENU__MSG\9 || ALT_KEY__MSG'+C',     'DUPMARK C'COPY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPYMARK, 0)
  179. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  180.      buildmenuitem menuname, 8, 800, COPY_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+C', accel_len),     'DUPMARK C'COPY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPYMARK, 0)
  181. compile else
  182.      buildmenuitem menuname, 8, 800, COPY_MARK_MENU__MSG,              'DUPMARK C'COPY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPYMARK, 0)
  183. compile endif
  184. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'M' & EDIT_ACCEL__L<>'M' & SEARCH_ACCEL__L<>'M' & OPTIONS_ACCEL__L<>'M' & COMMAND_ACCEL__L<>'M' & HELP_ACCEL__L<>'M' & $maybe_mail_accel 'M' & $maybe_ring_accel 'M' & $maybe_actions_accel 'M')
  185.      buildmenuitem menuname, 8, 801, MOVE_MARK_MENU__MSG\9 || ALT_KEY__MSG'+M',     'DUPMARK M'MOVE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_MOVE, 0)
  186. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  187.      buildmenuitem menuname, 8, 801, MOVE_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+M', accel_len),     'DUPMARK M'MOVE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_MOVE, 0)
  188. compile else
  189.      buildmenuitem menuname, 8, 801, MOVE_MARK_MENU__MSG,     'DUPMARK M'MOVE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_MOVE, 0)
  190. compile endif
  191. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'O' & EDIT_ACCEL__L<>'O' & SEARCH_ACCEL__L<>'O' & OPTIONS_ACCEL__L<>'O' & COMMAND_ACCEL__L<>'O' & HELP_ACCEL__L<>'O' & $maybe_mail_accel 'O' & $maybe_ring_accel 'O' & $maybe_actions_accel 'O')
  192.      buildmenuitem menuname, 8, 802, OVERLAY_MARK_MENU__MSG\9 || ALT_KEY__MSG'+O',  'DUPMARK O'OVERLAY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_OVERLAY, 0)
  193. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  194.      buildmenuitem menuname, 8, 802, OVERLAY_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+O', accel_len),  'DUPMARK O'OVERLAY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_OVERLAY, 0)
  195. compile else
  196.      buildmenuitem menuname, 8, 802, OVERLAY_MARK_MENU__MSG,  'DUPMARK O'OVERLAY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_OVERLAY, 0)
  197. compile endif
  198. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'A' & EDIT_ACCEL__L<>'A' & SEARCH_ACCEL__L<>'A' & OPTIONS_ACCEL__L<>'A' & COMMAND_ACCEL__L<>'A' & HELP_ACCEL__L<>'A' & $maybe_mail_accel 'A' & $maybe_ring_accel 'A' & $maybe_actions_accel 'A')
  199.      buildmenuitem menuname, 8, 803, ADJUST_MARK_MENU__MSG\9 || ALT_KEY__MSG'+A',   'DUPMARK A'ADJUST_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_ADJUST, 0)
  200. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  201.      buildmenuitem menuname, 8, 803, ADJUST_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+A', accel_len),   'DUPMARK A'ADJUST_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_ADJUST, 0)
  202. compile else
  203.      buildmenuitem menuname, 8, 803, ADJUST_MARK_MENU__MSG,   'DUPMARK A'ADJUST_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_ADJUST, 0)
  204. compile endif
  205.      buildmenuitem menuname, 8, 804, \0,                       '',          4, 0
  206. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'U' & EDIT_ACCEL__L<>'U' & SEARCH_ACCEL__L<>'U' & OPTIONS_ACCEL__L<>'U' & COMMAND_ACCEL__L<>'U' & HELP_ACCEL__L<>'U' & $maybe_mail_accel 'U' & $maybe_ring_accel 'U' & $maybe_actions_accel 'U')
  207.      buildmenuitem menuname, 8, 805, UNMARK_MARK_MENU__MSG\9 || ALT_KEY__MSG'+U',   'DUPMARK U'UNMARK_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_UNMARK, 0)
  208. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  209.      buildmenuitem menuname, 8, 805, UNMARK_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+U', accel_len),   'DUPMARK U'UNMARK_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_UNMARK, 0)
  210. compile else
  211.      buildmenuitem menuname, 8, 805, UNMARK_MARK_MENU__MSG,   'DUPMARK U'UNMARK_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_UNMARK, 0)
  212. compile endif
  213. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'D' & EDIT_ACCEL__L<>'D' & SEARCH_ACCEL__L<>'D' & OPTIONS_ACCEL__L<>'D' & COMMAND_ACCEL__L<>'D' & HELP_ACCEL__L<>'D' & $maybe_mail_accel 'D' & $maybe_ring_accel 'D' & $maybe_actions_accel 'D')
  214.      buildmenuitem menuname, 8, 806, DELETE_MARK_MENU__MSG\9 || ALT_KEY__MSG'+D',   'DUPMARK D'DELETE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_DELETE, 0)
  215. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  216.      buildmenuitem menuname, 8, 806, DELETE_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+D', accel_len),   'DUPMARK D'DELETE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_DELETE, 0)
  217. compile else
  218.      buildmenuitem menuname, 8, 806, DELETE_MARK_MENU__MSG,   'DUPMARK D'DELETE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_DELETE, 0)
  219. compile endif
  220.  
  221. compile if WANT_STACK_CMDS
  222.  compile if WANT_STACK_CMDS = 'SWITCH'
  223.    if stack_cmds then
  224.  compile endif
  225.      buildmenuitem menuname, 8, 819, \0,                               '',          4, 0
  226.      buildmenuitem menuname, 8, 820, PUSH_MARK_MENU__MSG,              'PUSHMARK'PUSH_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_PUSHMARK, 0)
  227.      buildmenuitem menuname, 8, 821, POP_MARK_MENU__MSG,               'POPMARK'POP_MARK_MENUP__MSG,  0, mpfrom2short(HP_EDIT_POPMARK, 16384)
  228.      buildmenuitem menuname, 8, 822, SWAP_MARK_MENU__MSG,              'SWAPMARK'SWAP_MARK_MENUP__MSG,  0, mpfrom2short(HP_EDIT_SWAPMARK, 16384)
  229.      buildmenuitem menuname, 8, 823, PUSH_CURSOR_MENU__MSG\9 || CTRL_KEY__MSG'+'DOWN_KEY__MSG, 'PUSHPOS'PUSH_CURSOR_MENUP__MSG,  0, mpfrom2short(HP_EDIT_PUSHPOS, 0)
  230.      buildmenuitem menuname, 8, 824, POP_CURSOR_MENU__MSG\9 || CTRL_KEY__MSG'+'UP_KEY__MSG, 'POPPOS'POP_CURSOR_MENUP__MSG,   0, mpfrom2short(HP_EDIT_POPPOS, 16384)
  231.      buildmenuitem menuname, 8, 825, SWAP_CURSOR_MENU__MSG,            'SWAPPOS'SWAP_CURSOR_MENUP__MSG,   0, mpfrom2short(HP_EDIT_SWAPPOS, 16384)
  232.  compile if WANT_STACK_CMDS = 'SWITCH'
  233.    endif
  234.  compile endif
  235. compile endif
  236.      buildmenuitem menuname, 8, 813, \0,                               '',          4, 0
  237. compile if ENHANCED_PRINT_SUPPORT
  238.      buildmenuitem menuname, 8, 814, PRT_MARK_MENU__MSG'...',          'PRINTDLG M'ENHPRT_MARK_MENUP__MSG,0, mpfrom2short(HP_EDIT_ENHPRINT, 0)
  239. compile else
  240.      buildmenuitem menuname, 8, 814, PRT_MARK_MENU__MSG,               'DUPMARK P'PRT_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_PRINT, 0)
  241. compile endif
  242.    return
  243.  
  244. defproc add_search_menu(menuname)
  245.    buildsubmenu menuname, 3, SEARCH_BAR__MSG, ''SEARCH_BARP__MSG, 0 , mpfrom2short(HP_SEARCH, 0)
  246.      buildmenuitem menuname, 3, 300, SEARCH_MENU__MSG\9 || CTRL_KEY__MSG'+S',      'SEARCHDLG'SEARCH_MENUP__MSG,   0, mpfrom2short(HP_SEARCH_SEARCH, 0)
  247.      buildmenuitem menuname, 3, 301, \0,                           '',            4, 0
  248.      buildmenuitem menuname, 3, 302, FIND_NEXT_MENU__MSG\9 || CTRL_KEY__MSG'+F',   'SEARCHDLG F'FIND_NEXT_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_FIND, 0)
  249.      buildmenuitem menuname, 3, 303, CHANGE_NEXT_MENU__MSG\9 || CTRL_KEY__MSG'+C', 'SEARCHDLG C'CHANGE_NEXT_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_CHANGE, 0)
  250. compile if WANT_BOOKMARKS
  251.      buildmenuitem menuname, 3, 304, \0,                           '',            4, 0
  252.      buildmenuitem menuname, 3, 305, BOOKMARKS_MENU__MSG,   BOOKMARKS_MENUP__MSG, 17, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
  253.        buildmenuitem menuname, 3, 306, SET_MARK_MENU__MSG\9 || CTRL_KEY__MSG'+M',  'setmark'SET_MARK_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
  254.  compile if EVERSION < 5.21  -- 5.21 adds a custom dialog for setting bookmarks
  255.        buildmenuitem menuname, 3, 307, '~Set permanent...', 'setmarkp',       0, 0
  256.  compile endif
  257.        buildmenuitem menuname, 3, 308, LIST_MARK_MENU__MSG\9 || CTRL_KEY__MSG'+B', 'listmark'LIST_MARK_MENUP__MSG,       0, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
  258.        buildmenuitem menuname, 3, 310, \0,                  '',               4, 0
  259.        buildmenuitem menuname, 3, 311, NEXT_MARK_MENU__MSG\9 || ALT_KEY__MSG'+/',  'nextbookmark'NEXT_MARK_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
  260.        buildmenuitem menuname, 3, 312, PREV_MARK_MENU__MSG\9 || ALT_KEY__MSG'+\',  'nextbookmark P'PREV_MARK_MENUP__MSG, 32768+1, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
  261. compile endif
  262. compile if WANT_TAGS
  263.      buildmenuitem menuname, 3, 320, \0,                           '',            4, 0
  264.      buildmenuitem menuname, 3, 330, TAGS_MENU__MSG,   TAGS_MENUP__MSG, 17, mpfrom2short(HP_SEARCH_TAGS, 0)
  265.  compile if EPM32
  266.        buildmenuitem menuname, 3, 331, TAGSDLG_MENU__MSG\9, 'poptagsdlg'TAGSDLG_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_TAGS, 0)
  267.        buildmenuitem menuname, 3, 332, \0,                  '',               4, 0
  268.  compile endif
  269.        buildmenuitem menuname, 3, 333, FIND_TAG_MENU__MSG\9 || SHIFT_KEY__MSG'+F6',  'findtag'FIND_TAG_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_TAGS, 0)
  270.        buildmenuitem menuname, 3, 334, FIND_TAG2_MENU__MSG\9 || SHIFT_KEY__MSG'+F7', 'findtag *'FIND_TAG2_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_TAGS, 0)
  271.  compile if not EPM32
  272.        buildmenuitem menuname, 3, 335, \0,                  '',               4, 0
  273.        buildmenuitem menuname, 3, 336, TAGFILE_NAME_MENU__MSG\9 || SHIFT_KEY__MSG'+F8',  'tagsfile'TAGFILE_NAME_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_TAGS, 0)
  274.        buildmenuitem menuname, 3, 337, \0,                  '',               4, 0
  275.        buildmenuitem menuname, 3, 338, MAKE_TAGS_MENU__MSG\9 || SHIFT_KEY__MSG'+F9',  'maketags *'MAKE_TAGS_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_TAGS, 0)
  276.  compile endif
  277.        buildmenuitem menuname, 3, 339, \0,                               '',          4, 0
  278.        buildmenuitem menuname, 3, 340, SCAN_TAGS_MENU__MSG,  'tagscan'SCAN_TAGS_MENUP__MSG, 32769, mpfrom2short(HP_SEARCH_TAGS, 0)
  279. compile endif
  280.    return
  281.  
  282. ; Preferences pull-right can get Set enter, Advanced mark, Stream mode, and
  283. ; Ring enabled, in addition to Configure.  Here we calculate which menu item
  284. ; gets the "end pullright" attribute.
  285. define
  286.     NEED_PREFERENCES = 1  -- Start out assuming this
  287.  compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  288.    ENTER__ATTRIB  = 0
  289.    MARK__ATTRIB   = 0
  290.    STREAM__ATTRIB = 0
  291.    RING__ATTRIB   = 0
  292.    STACK__ATTRIB  = 0
  293.    ACCEL__ATTRIB  = 32769
  294.  compile elseif WANT_STACK_CMDS = 'SWITCH'
  295.    ENTER__ATTRIB  = 0
  296.    MARK__ATTRIB   = 0
  297.    STREAM__ATTRIB = 0
  298.    RING__ATTRIB   = 0
  299.    STACK__ATTRIB  = 32769
  300.  compile elseif RING_OPTIONAL
  301.    ENTER__ATTRIB  = 0
  302.    MARK__ATTRIB   = 0
  303.    STREAM__ATTRIB = 0
  304.    RING__ATTRIB   = 32769
  305.  compile elseif WANT_STREAM_MODE = 'SWITCH'
  306.    ENTER__ATTRIB  = 0
  307.    MARK__ATTRIB   = 0
  308.    STREAM__ATTRIB = 32769
  309.  compile elseif WANT_CUA_MARKING = 'SWITCH'
  310.    ENTER__ATTRIB  = 0
  311.    MARK__ATTRIB   = 32769
  312.  compile elseif ENHANCED_ENTER_KEYS & WANT_STREAM_MODE <> 1 & EVERSION < 5.21  -- 5.21 adds this to config dialog
  313.    ENTER__ATTRIB  = 32769
  314.  compile else
  315.     NEED_PREFERENCES = 0  -- If none of the above, we don't need this after all
  316.  compile endif
  317.  compile if EVERSION < '5.50'
  318.     TOGGLEINFO = 'toggle_info'
  319.  compile elseif EVERSION < '5.53'
  320.     TOGGLEINFO = 'togglecontrol 23'
  321.  compile else
  322.     TOGGLEINFO = 'toggleframe 32'
  323.  compile endif
  324.  
  325. compile if WANT_NODISMISS_MENUS
  326.    define
  327.       NODISMISS = 32
  328. compile else
  329.    define
  330.       NODISMISS = 0
  331. compile endif -- WANT_NODISMISS_MENUS
  332.  
  333. defproc add_options_menu(menuname)
  334. compile if RING_OPTIONAL
  335.    universal ring_enabled
  336. compile endif
  337.    universal font
  338. compile if CHECK_FOR_LEXAM
  339.    universal LEXAM_is_available
  340. compile endif
  341.  
  342.    buildsubmenu menuname, 4, OPTIONS_BAR__MSG, OPTIONS_BARP__MSG, 0 , mpfrom2short(HP_OPTIONS, 0)
  343. compile if MENU_LIMIT = 0
  344.  compile if RING_OPTIONAL
  345.    if ring_enabled then
  346.  compile endif
  347.      buildmenuitem menuname, 4, 410, LIST_FILES_MENU__MSG\9 || CTRL_KEY__MSG'+G',     'Ring_More'LIST_FILES_MENUP__MSG,  0 , mpfrom2short(HP_OPTIONS_LIST, 0)
  348.      buildmenuitem menuname, 4, 411, \0,                       '',           4, 0
  349.  compile if RING_OPTIONAL
  350.    endif
  351.  compile endif
  352. compile endif
  353. compile if SPELL_SUPPORT
  354.  compile if CHECK_FOR_LEXAM
  355.    if LEXAM_is_available then
  356.  compile endif
  357.      buildmenuitem menuname, 4, 404, PROOF_MENU__MSG,           'proof'PROOF_MENUP__MSG,     0, mpfrom2short(HP_OPTIONS_PROOF, 0)
  358.      buildmenuitem menuname, 4, 405, PROOF_WORD_MENU__MSG,      'proofword'PROOF_WORD_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_PROOFW, 0)
  359.      buildmenuitem menuname, 4, 406, SYNONYM_MENU__MSG,         'syn'SYNONYM_MENUP__MSG,       0, mpfrom2short(HP_OPTIONS_SYN, 0)
  360.      buildmenuitem menuname, 4, 450, DYNASPELL_MENU__MSG,        'dynaspell'DYNASPELL_MENUP__MSG,       0, mpfrom2short(HP_OPTIONS_DYNASPELL, 0)
  361.  compile if CORE_STUFF
  362.      buildmenuitem menuname, 4, 426, DEFINE_WORD_MENU__MSG,     'define'DEFINE_WORD_MENUP__MSG,    0, mpfrom2short(HP_OPTIONS_DEFINE, 0)
  363.  compile endif  -- CORE_STUFF
  364.      buildmenuitem menuname, 4, 407, \0,           '',                       4, 0
  365.  compile if CHECK_FOR_LEXAM
  366.    endif
  367.  compile endif
  368. compile endif
  369. ; If no "Toggle stream mode" or "Toggle advanced marking" or "Enable ring", then
  370. ; place "Configure..." on main Options menu.  Otherwise, put it on a Preferences
  371. ; pull-right with the other stuff.
  372. compile if NEED_PREFERENCES
  373.      buildmenuitem menuname, 4, 400, PREFERENCES_MENU__MSG,    PREFERENCES_MENUP__MSG,  17, mpfrom2short(HP_OPTIONS_PREFERENCES, 0)
  374. compile endif
  375. compile if WANT_APPLICATION_INI_FILE
  376.      buildmenuitem menuname, 4, 440, CONFIG_MENU__MSG,         'configdlg'CONFIG_MENUP__MSG,  0, mpfrom2short(HP_OPTIONS_CONFIG, 0)
  377.  compile if ENHANCED_ENTER_KEYS & WANT_STREAM_MODE <> 1 & EVERSION < 5.21  -- 5.21 adds this to config dialog
  378.      buildmenuitem menuname, 4, 444, SETENTER_MENU__MSG,    'config_enter'SETENTER_MENUP__MSG,  ENTER__ATTRIB, mpfrom2short(HP_OPTIONS_CFGENTER, 0)
  379.  compile endif
  380. compile endif
  381. compile if WANT_CUA_MARKING = 'SWITCH'
  382.      buildmenuitem menuname, 4, 441, ADVANCEDMARK_MENU__MSG,     'CUA_MARK_toggle'ADVANCEDMARK_MENUP__MSG, MARK__ATTRIB, mpfrom2short(HP_OPTIONS_CUATOGGLE, NODISMISS)
  383. compile endif
  384. compile if WANT_STREAM_MODE = 'SWITCH'
  385.      buildmenuitem menuname, 4, 442, STREAMMODE_MENU__MSG,  'stream_toggle'STREAMMODE_MENUP__MSG,  STREAM__ATTRIB, mpfrom2short(HP_OPTIONS_STREAM, NODISMISS)
  386. compile endif
  387. compile if RING_OPTIONAL
  388.      buildmenuitem menuname, 4, 443, RINGENABLED_MENU__MSG,    'ring_toggle'RINGENABLED_MENUP__MSG,  RING__ATTRIB, mpfrom2short(HP_OPTIONS_RINGENABLE, 0)
  389. compile endif
  390. compile if WANT_STACK_CMDS = 'SWITCH'
  391.      buildmenuitem menuname, 4, 445, STACKCMDS_MENU__MSG,      'stack_toggle'STACKCMDS_MENUP__MSG,  STACK__ATTRIB, mpfrom2short(HP_OPTIONS_STACKCMDS, 0)
  392. compile endif
  393. compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  394.      buildmenuitem menuname, 4, 446, CUAACCEL_MENU__MSG,       'accel_toggle'CUAACCEL_MENUP__MSG,  ACCEL__ATTRIB, mpfrom2short(HP_OPTIONS_CUAACCEL, NODISMISS)
  395. compile endif
  396.      buildmenuitem menuname, 4, 401, \0,                       '',           4, 0
  397.      buildmenuitem menuname, 4, 402, AUTOSAVE_MENU__MSG,       'autosave ?'AUTOSAVE_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_AUTOSAVE, 0)
  398.      buildmenuitem menuname, 4, 403, \0,                       '',           4, 0
  399.      buildmenuitem menuname, 4, 412, MESSAGES_MENU__MSG,       'messagebox'MESSAGES_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_MESSAGES, 0)
  400.      buildmenuitem menuname, 4, 409, \0,           '',                       4, 0
  401. ;  Note:  408 is referenced by TOGGLEFONT.  If the number changes, update TOGGLEFONT.
  402. compile if EVERSION < 5.50
  403.    if screenxysize('X')>1000 or dos_version()>=1030 then  -- BGA *or* 1.3 for many fonts
  404. compile endif
  405. compile if EVERSION < 5.21  -- In 5.21, on notebook config control
  406.         buildmenuitem menuname, 4, 408, CHANGE_FONT_MENU__MSG,  'fontlist'CHANGE_FONT_MENUP__MSG,    0, mpfrom2short(HP_OPTIONS_FONT, 0)
  407. compile endif
  408. compile if EVERSION < 5.50
  409.    else
  410.       if font then
  411.         buildmenuitem menuname, 4, 408, SMALL_FONT_MENU__MSG,    'togglefont'SMALL_FONT_MENUP__MSG,  0, mpfrom2short(HP_OPTIONS_FONT, 0)
  412.       else
  413.         buildmenuitem menuname, 4, 408, LARGE_FONT_MENU__MSG,    'togglefont'LARGE_FONT_MENUP__MSG,  0, mpfrom2short(HP_OPTIONS_FONT, 0)
  414.       endif
  415.    endif
  416. compile endif
  417.  
  418.      buildmenuitem menuname, 4, 425, FRAME_CTRLS_MENU__MSG, FRAME_CTRLS_MENUP__MSG, 17, mpfrom2short(HP_OPTIONS_FRAME, 0)
  419. compile if EVERSION < 5.53
  420.         buildmenuitem menuname, 4, 413, STATUS_LINE_MENU__MSG, 'togglecontrol 7'STATUS_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_STATUS, NODISMISS)
  421.         buildmenuitem menuname, 4, 414, MSG_LINE_MENU__MSG,    'togglecontrol 8'MSG_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_MESSAGE, NODISMISS)
  422. compile else
  423.         buildmenuitem menuname, 4, 413, STATUS_LINE_MENU__MSG, 'toggleframe 1'STATUS_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_STATUS, NODISMISS)
  424.         buildmenuitem menuname, 4, 414, MSG_LINE_MENU__MSG,    'toggleframe 2'MSG_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_MESSAGE, NODISMISS)
  425. compile endif
  426.         buildmenuitem menuname, 4, 415, SCROLL_BARS_MENU__MSG, 'setscrolls'SCROLL_BARS_MENUP__MSG,      0, mpfrom2short(HP_FRAME_SCROLL, NODISMISS)
  427. ;;      buildmenuitem menuname, 4, 416, 'Partial te~xt',       'togglecontrol 15', 32768+1, 0, 0
  428. compile if EVERSION < 5.50
  429.         buildmenuitem menuname, 4, 416, FILEICON_MENU__MSG,     'togglecontrol 22'FILEICON_MENUP__MSG, 0, mpfrom2short(HP_FRAME_FILE, NODISMISS)
  430. compile endif
  431. compile if EVERSION < 5.53
  432.         buildmenuitem menuname, 4, 417, ROTATEBUTTONS_MENU__MSG,'togglecontrol 20'ROTATEBUTTONS_MENUP__MSG, 0, mpfrom2short(HP_FRAME_ROTATE, NODISMISS)
  433. compile else
  434.         buildmenuitem menuname, 4, 417, ROTATEBUTTONS_MENU__MSG,'toggleframe 4'ROTATEBUTTONS_MENUP__MSG, 0, mpfrom2short(HP_FRAME_ROTATE, NODISMISS)
  435. compile endif
  436. compile if WANT_TOOLBAR
  437. ; compile if WANT_NODISMISS_MENUS
  438.         buildmenuitem menuname, 4, 430, TOGGLETOOLBAR_MENU__MSG, 'toggle_toolbar'TOGGLETOOLBAR_MENUP__MSG, 1, mpfrom2short(HP_TOOLBAR_TOGGLE, NODISMISS)
  439. ; compile else
  440. ;       buildmenuitem menuname, 4, 430, TOGGLETOOLBAR_MENU__MSG, 'toggleframe' EFRAMEF_TOOLBAR||TOGGLETOOLBAR_MENUP__MSG, 1, mpfrom2short(HP_TOOLBAR_TOGGLE, NODISMISS)
  441. ; compile endif -- if WANT_NODISMISS_MENUS
  442. compile endif -- WANT_TOOLBAR
  443. compile if EVERSION >= 5.60
  444.         buildmenuitem menuname, 4, 437, TOGGLEBITMAP_MENU__MSG,'toggle_bitmap'TOGGLEBITMAP_MENUP__MSG, 0, mpfrom2short(HP_FRAME_BITMAP, NODISMISS)
  445. compile endif
  446.         buildmenuitem menuname, 4, 439, \0,                       '',           4, 0
  447. compile if WANT_DYNAMIC_PROMPTS
  448.         buildmenuitem menuname, 4, 421, INFOATTOP_MENU__MSG,   TOGGLEINFO || INFOATTOP_MENUP__MSG,     0, mpfrom2short(HP_FRAME_EXTRAPOS, NODISMISS)
  449.         buildmenuitem menuname, 4, 422, PROMPTING_MENU__MSG,   'toggleprompt'PROMPTING_MENUP__MSG,     32768+1, mpfrom2short(HP_FRAME_PROMPT, NODISMISS)
  450. compile else
  451.         buildmenuitem menuname, 4, 421, INFOATTOP_MENU__MSG,   TOGGLEINFO || INFOATTOP_MENUP__MSG,     32768+1, mpfrom2short(HP_FRAME_EXTRAPOS, NODISMISS)
  452. compile endif
  453. compile if WANT_APPLICATION_INI_FILE
  454.      buildmenuitem menuname, 4, 418, SAVE_OPTS_MENU__MSG,      'saveoptions'SAVE_OPTS_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_SAVE, 0)
  455. compile endif
  456. compile if EPATH = 'LAMPATH'
  457.      buildmenuitem menuname, 4, 419, \0,                       '',           4, 0
  458.      buildmenuitem menuname, 4, 420, TO_DESKTOP_MENU__MSG,     'popbook'TO_DESKTOP_MENUP__MSG, 0, 0
  459. compile elseif SUPPORT_BOOK_ICON
  460.      buildmenuitem menuname, 4, 419, \0,                       '',           4, 0
  461.      buildmenuitem menuname, 4, 420, TO_BOOK_MENU__MSG,        'popbook'TO_BOOK_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_BOOK, 0)
  462. compile endif
  463.    return
  464.  
  465. compile if MENU_LIMIT
  466. defproc add_ring_menu(menuname)
  467.    buildsubmenu menuname, 5, RING_BAR__MSG, LIST_FILES_MENUP__MSG, 0 , 0
  468.      if .titletext=='' then
  469.         buildmenuitem menuname, 5, 500, .filename, '',0,0
  470.      else
  471.         buildmenuitem menuname, 5, 500, .titletext, '',0,0
  472.      endif
  473.    return
  474. compile endif
  475.  
  476. defproc add_command_menu(menuname)
  477.    buildsubmenu menuname, 1, COMMAND_BAR__MSG, COMMAND_BARP__MSG, 0 , mpfrom2short(HP_COMMAND, 0)
  478.      buildmenuitem menuname, 1, 100, COMMANDLINE_MENU__MSG\9 || CTRL_KEY__MSG'+I', 'commandline'COMMANDLINE_MENUP__MSG,   0, mpfrom2short(HP_COMMAND_CMD, 0)
  479. compile if EVERSION >= 5.50
  480.      buildmenuitem menuname, 1, 65535, HALT_COMMAND_MENU__MSG, '', 0, mpfrom2short(HP_COMMAND_HALT, 0)
  481. compile else
  482.      buildmenuitem menuname, 1, 0, HALT_COMMAND_MENU__MSG, '', 0, mpfrom2short(HP_COMMAND_HALT, 0)
  483. compile endif
  484. compile if WANT_EPM_SHELL = 1
  485.      buildmenuitem menuname, 1, 101, \0,                      '',            4, 0
  486.      buildmenuitem menuname, 1, 102, CREATE_SHELL_MENU__MSG,       'shell'CREATE_SHELL_MENUP__MSG,       0, mpfrom2short(HP_COMMAND_SHELL, 0)
  487.      buildmenuitem menuname, 1, 103, WRITE_SHELL_MENU__MSG,        'shell_write'WRITE_SHELL_MENUP__MSG, 0, mpfrom2short(HP_COMMAND_WRITE, 16384)
  488. ;    buildmenuitem menuname, 1, 104, KILL_SHELL_MENU__MSG,         'shell_kill'KILL_SHELL_MENUP__MSG,  0, mpfrom2short(HP_COMMAND_KILL, 16384)
  489.  compile if EPM32 & not POWERPC
  490.      buildmenuitem menuname, 1, 104, SHELL_BREAK_MENU__MSG,        'shell_break'SHELL_BREAK_MENUP__MSG,  0, mpfrom2short(HP_COMMAND_BREAK, 16384)
  491.  compile endif
  492. compile endif
  493.    return
  494.  
  495. defproc add_help_menu(menuname)
  496.    buildsubmenu menuname, HELP_MENU_ID, HELP_BAR__MSG, 'help'HELP_BARP__MSG, /* 512 */  0, mpfrom2short(HP_HELP, 0)
  497.      buildmenuitem menuname, HELP_MENU_ID, 600, HELP_INDEX_MENU__MSG,   'helpmenu 10'/*64044*/HELP_INDEX_MENUP__MSG,   0, mpfrom2short(HP_HELP_INDEX, 0)
  498.      buildmenuitem menuname, HELP_MENU_ID, 601, EXT_HELP_MENU__MSG,     'helpmenu 4000'EXT_HELP_MENUP__MSG, 0, mpfrom2short(HP_HELP_EXTENDED, 0)
  499.      buildmenuitem menuname, HELP_MENU_ID, 602, HELP_HELP_MENU__MSG,    'helpmenu 64027'HELP_HELP_MENUP__MSG,    0, mpfrom2short(HP_HELP_HELP, 0)
  500.      buildmenuitem menuname, HELP_MENU_ID, 603, KEYS_HELP_MENU__MSG,    'helpmenu 1000'KEYS_HELP_MENUP__MSG, 0, mpfrom2short(HP_HELP_KEYS, 0)
  501.      buildmenuitem menuname, HELP_MENU_ID, 604, COMMANDS_HELP_MENU__MSG,'helpmenu 2000'COMMANDS_HELP_MENUP__MSG, 0, mpfrom2short(HP_HELP_COMMANDS, 0)
  502.      buildmenuitem menuname, HELP_MENU_ID, 605, \0,           '',                        4, 0
  503.      buildmenuitem menuname, HELP_MENU_ID, 606, HELP_BROWSER_MENU__MSG, 'help'HELP_BROWSER_MENUP__MSG,    0, mpfrom2short(HP_HELP_BROWSE, 0)
  504.      buildmenuitem menuname, HELP_MENU_ID, 607, \0,           '',                        4, 0
  505. compile if 0
  506.      buildmenuitem menuname, HELP_MENU_ID, 608, '#211'||(3-(screenxysize('X')>1000)), 'IBMmsg'HELP_PROD_MENUP__MSG, 2, mpfrom2short(HP_HELP_IBM, 0)
  507.                          -- Resource # 2112 or 2113 in ERES.DLL
  508. compile else
  509.      buildmenuitem menuname, HELP_MENU_ID, 608, HELP_PROD_MENU__MSG, 'IBMmsg'HELP_PROD_MENUP__MSG, 0, mpfrom2short(HP_HELP_PROD, 0)
  510. compile endif
  511. compile if SUPPORT_USERS_GUIDE | SUPPORT_TECHREF
  512.      buildmenuitem menuname, HELP_MENU_ID, 610, \0,           '',                        4, 0
  513.  compile if SUPPORT_USERS_GUIDE
  514.      buildmenuitem menuname, HELP_MENU_ID, 620, USERS_GUIDE_MENU__MSG,   USERS_GUIDE_MENUP__MSG, 17+64, mpfrom2short(HP_HELP_USERS_GUIDE, 0)
  515.        buildmenuitem menuname, HELP_MENU_ID, 621, VIEW_USERS_MENU__MSG,  'view epmusers'VIEW_USERS_MENUP__MSG, 0, mpfrom2short(HP_HELP_USERS_GUIDE, 0)
  516.        buildmenuitem menuname, HELP_MENU_ID, 622, VIEW_IN_USERS_MENU__MSG,  'viewword epmusers'VIEW_IN_USERS_MENUP__MSG, 0, mpfrom2short(HP_HELP_USERS_GUIDE, 0)
  517.        buildmenuitem menuname, HELP_MENU_ID, 623, VIEW_USERS_SUMMARY_MENU__MSG,  'view epmusers Summary'VIEW_USERS_SUMMARY_MENUP__MSG, 32768+1, mpfrom2short(HP_HELP_USERS_GUIDE, 0)
  518.  compile endif
  519.  compile if SUPPORT_TECHREF
  520.      buildmenuitem menuname, HELP_MENU_ID, 630, TECHREF_MENU__MSG,   TECHREF_MENUP__MSG, 17+64, mpfrom2short(HP_HELP_TECHREF, 0)
  521.        buildmenuitem menuname, HELP_MENU_ID, 631, VIEW_TECHREF_MENU__MSG,  'view epmtech'VIEW_TECHREF_MENUP__MSG, 0, mpfrom2short(HP_HELP_TECHREF, 0)
  522.        buildmenuitem menuname, HELP_MENU_ID, 632, VIEW_IN_TECHREF_MENU__MSG,  'viewword epmtech'VIEW_IN_TECHREF_MENUP__MSG, 32768+1, mpfrom2short(HP_HELP_TECHREF, 0)
  523.  compile endif
  524. compile endif
  525.  
  526. defproc readd_help_menu
  527.    universal defaultmenu, activemenu
  528.    call add_help_menu(defaultmenu)
  529.    call maybe_show_menu()
  530.  
  531. defproc maybe_show_menu
  532.    universal defaultmenu, activemenu
  533.    if activemenu=defaultmenu then
  534.       call showmenu_activemenu()  -- show the updated EPM menu
  535.    endif
  536.  
  537. defproc showmenu_activemenu()
  538.    universal activemenu
  539.    showmenu activemenu  -- show the updated EPM menu
  540. compile if SUPPORT_USERS_GUIDE
  541.    'postme cascade_menu 620'
  542. compile endif
  543. compile if SUPPORT_TECHREF
  544.    'postme cascade_menu 630'
  545. compile endif
  546. compile if defined(CUSTEPM_DEFAULT_SCREEN)
  547.    'postme cascade_menu' 3700 (CUSTEPM_DEFAULT_SCREEN + 3700)
  548. compile elseif defined(HAVE_CUSTEPM)
  549.    'postme cascade_menu' 3700
  550. compile endif
  551.  
  552. compile if EVERSION > 5.20
  553. defproc build_menu_accelerators(activeaccel)
  554.  compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  555.    universal CUA_MENU_ACCEL
  556.  compile endif
  557. compile if WANT_STACK_CMDS = 'SWITCH'
  558.    universal stack_cmds
  559. compile endif
  560.                        -- Build keys on File menu
  561.    buildacceltable activeaccel, 'dokey F8',  AF_VIRTUALKEY,                VK_F8, 1101  -- F8
  562.    buildacceltable activeaccel, 'dokey c+O', AF_CHAR+AF_CONTROL,              79, 1102  -- c+O
  563.    buildacceltable activeaccel, 'dokey c+O', AF_CHAR+AF_CONTROL,             111, 1103  -- c+o
  564.    buildacceltable activeaccel, 'dokey F7',  AF_VIRTUALKEY,                VK_F7, 1104  -- F7
  565.    buildacceltable activeaccel, 'dokey F2',  AF_VIRTUALKEY,                VK_F2, 1105  -- F2
  566.    buildacceltable activeaccel, 'dokey F3',  AF_VIRTUALKEY,                VK_F3, 1106  -- F3
  567.    buildacceltable activeaccel, 'dokey F4',  AF_VIRTUALKEY,                VK_F4, 1107  -- F4
  568.  
  569.                        -- Build keys on Edit menu  ('C' & 'O' appear under Action bar keys for English)
  570.   compile if FILE_ACCEL__L <> 'C' & EDIT_ACCEL__L <> 'C' & SEARCH_ACCEL__L <> 'C' & OPTIONS_ACCEL__L <> 'C' & COMMAND_ACCEL__L <> 'C' & HELP_ACCEL__L <> 'C' & $maybe_mail_accel 'C' & $maybe_ring_accel 'C' & $maybe_actions_accel 'C'
  571.    buildacceltable activeaccel, 'dokey a+C', AF_CHAR+AF_ALT,                  67, 1201  -- a+C
  572.    buildacceltable activeaccel, 'dokey a+C', AF_CHAR+AF_ALT,                  99, 1202  -- a+c
  573.   compile endif
  574.   compile if FILE_ACCEL__L <> 'M' & EDIT_ACCEL__L <> 'M' & SEARCH_ACCEL__L <> 'M' & OPTIONS_ACCEL__L <> 'M' & COMMAND_ACCEL__L <> 'M' & HELP_ACCEL__L <> 'M' & $maybe_mail_accel 'M' & $maybe_ring_accel 'M' & $maybe_actions_accel 'M'
  575.    buildacceltable activeaccel, 'dokey a+M', AF_CHAR+AF_ALT,                  77, 1203  -- a+M
  576.    buildacceltable activeaccel, 'dokey a+M', AF_CHAR+AF_ALT,                 109, 1204  -- a+m
  577.   compile endif
  578.   compile if FILE_ACCEL__L <> 'O' & EDIT_ACCEL__L <> 'O' & SEARCH_ACCEL__L <> 'O' & OPTIONS_ACCEL__L <> 'O' & COMMAND_ACCEL__L <> 'O' & HELP_ACCEL__L <> 'O' & $maybe_mail_accel 'O' & $maybe_ring_accel 'O' & $maybe_actions_accel 'O'
  579.    buildacceltable activeaccel, 'dokey a+O', AF_CHAR+AF_ALT,                  79, 1205  -- a+O
  580.    buildacceltable activeaccel, 'dokey a+O', AF_CHAR+AF_ALT,                 111, 1206  -- a+o
  581.   compile endif
  582.   compile if FILE_ACCEL__L <> 'A' & EDIT_ACCEL__L <> 'A' & SEARCH_ACCEL__L <> 'A' & OPTIONS_ACCEL__L <> 'A' & COMMAND_ACCEL__L <> 'A' & HELP_ACCEL__L <> 'A' & $maybe_mail_accel 'A' & $maybe_ring_accel 'A' & $maybe_actions_accel 'A'
  583.    buildacceltable activeaccel, 'dokey a+A', AF_CHAR+AF_ALT,                  65, 1207  -- a+A
  584.    buildacceltable activeaccel, 'dokey a+A', AF_CHAR+AF_ALT,                  97, 1208  -- a+a
  585.   compile endif
  586.   compile if FILE_ACCEL__L <> 'U' & EDIT_ACCEL__L <> 'U' & SEARCH_ACCEL__L <> 'U' & OPTIONS_ACCEL__L <> 'U' & COMMAND_ACCEL__L <> 'U' & HELP_ACCEL__L <> 'U' & $maybe_mail_accel 'U' & $maybe_ring_accel 'U' & $maybe_actions_accel 'U'
  587.    buildacceltable activeaccel, 'dokey a+U', AF_CHAR+AF_ALT,                  85, 1209  -- a+U
  588.    buildacceltable activeaccel, 'dokey a+U', AF_CHAR+AF_ALT,                 117, 1210  -- a+u
  589.   compile endif
  590.   compile if FILE_ACCEL__L <> 'D' & EDIT_ACCEL__L <> 'D' & SEARCH_ACCEL__L <> 'D' & OPTIONS_ACCEL__L <> 'D' & COMMAND_ACCEL__L <> 'D' & HELP_ACCEL__L <> 'D' & $maybe_mail_accel 'D' & $maybe_ring_accel 'D' & $maybe_actions_accel 'D'
  591.    buildacceltable activeaccel, 'dokey a+D', AF_CHAR+AF_ALT,                  68, 1211  -- a+D
  592.    buildacceltable activeaccel, 'dokey a+D', AF_CHAR+AF_ALT,                 100, 1212  -- a+d
  593.   compile endif
  594.    buildacceltable activeaccel, 'copy2clip', AF_VIRTUALKEY+AF_CONTROL, VK_INSERT, 1213  -- c+Insert
  595.    buildacceltable activeaccel, 'cut',       AF_VIRTUALKEY+AF_SHIFT,   VK_DELETE, 1214  -- s+Delete
  596.    buildacceltable activeaccel, 'paste' DEFAULT_PASTE, AF_VIRTUALKEY+AF_SHIFT,   VK_INSERT, 1215  -- s+Insert
  597.    buildacceltable activeaccel, 'paste' ALTERNATE_PASTE, AF_VIRTUALKEY+AF_SHIFT+AF_CONTROL,   VK_INSERT, 1221  -- c+s+Insert
  598.    buildacceltable activeaccel, 'dokey F9',  AF_VIRTUALKEY,                VK_F9, 1216  -- F9
  599.   compile if EVERSION >= 5.50
  600.    buildacceltable activeaccel, 'dokey c+Y', AF_CHAR+AF_CONTROL,              89, 1217  -- c+Y
  601.    buildacceltable activeaccel, 'dokey c+Y', AF_CHAR+AF_CONTROL,             121, 1218  -- c+y
  602.   compile endif
  603.    buildacceltable activeaccel, 'select_all',AF_CHAR+AF_CONTROL,              47, 1219  -- c+/
  604.    buildacceltable activeaccel, 'DUPMARK U', AF_CHAR+AF_CONTROL,              92, 1220  -- c+\
  605.  
  606. compile if WANT_STACK_CMDS
  607.  compile if WANT_STACK_CMDS = 'SWITCH'
  608.    if stack_cmds then
  609.  compile endif
  610.    buildacceltable activeaccel, 'dokey c+down', AF_VIRTUALKEY+AF_CONTROL,   VK_DOWN, 1222  -- c+Down
  611.    buildacceltable activeaccel, 'dokey c+Up',   AF_VIRTUALKEY+AF_CONTROL,     VK_UP, 1223  -- c+Up
  612.  compile if WANT_STACK_CMDS = 'SWITCH'
  613.    endif
  614.  compile endif
  615. compile endif
  616.  
  617.                        -- Build keys on Search menu
  618.    buildacceltable activeaccel, 'dokey c+S', AF_CHAR+AF_CONTROL,              83, 1301  -- c+S
  619.    buildacceltable activeaccel, 'dokey c+S', AF_CHAR+AF_CONTROL,             115, 1302  -- c+s
  620.    buildacceltable activeaccel, 'dokey c+F', AF_CHAR+AF_CONTROL,              70, 1303  -- c+F
  621.    buildacceltable activeaccel, 'dokey c+F', AF_CHAR+AF_CONTROL,             102, 1304  -- c+f
  622.    buildacceltable activeaccel, 'dokey c+C', AF_CHAR+AF_CONTROL,              67, 1305  -- c+C
  623.    buildacceltable activeaccel, 'dokey c+C', AF_CHAR+AF_CONTROL,              99, 1306  -- c+c
  624.                        -- Build keys on Bookmark submenu
  625.   compile if WANT_BOOKMARKS
  626.    buildacceltable activeaccel, 'dokey c+B', AF_CHAR+AF_CONTROL,              66, 1331  -- c+B
  627.    buildacceltable activeaccel, 'dokey c+B', AF_CHAR+AF_CONTROL,              98, 1332  -- c+b
  628.    buildacceltable activeaccel, 'dokey c+M', AF_CHAR+AF_CONTROL,              77, 1333  -- c+M
  629.    buildacceltable activeaccel, 'dokey c+M', AF_CHAR+AF_CONTROL,             109, 1334  -- c+m
  630.    buildacceltable activeaccel, 'nextbookmark',  AF_CHAR+AF_ALT,              47, 1335  -- a+/
  631.    buildacceltable activeaccel, 'nextbookmark P',AF_CHAR+AF_ALT,              92, 1336  -- a+\
  632.   compile endif
  633.                        -- Build keys on Tags submenu
  634.   compile if WANT_TAGS
  635.    buildacceltable activeaccel, 'dokey s+F6', AF_VIRTUALKEY+AF_SHIFT,      VK_F6, 1361  -- s+F6
  636.    buildacceltable activeaccel, 'dokey s+F7', AF_VIRTUALKEY+AF_SHIFT,      VK_F7, 1362  -- s+F7
  637.    buildacceltable activeaccel, 'dokey s+F8', AF_VIRTUALKEY+AF_SHIFT,      VK_F8, 1363  -- s+F8
  638.    buildacceltable activeaccel, 'dokey s+F9', AF_VIRTUALKEY+AF_SHIFT,      VK_F9, 1364  -- s+F9
  639.   compile endif
  640.  
  641.                        -- Build keys on Options menu
  642.    buildacceltable activeaccel, 'dokey c+G', AF_CHAR+AF_CONTROL,              71, 1401  -- c+G
  643.    buildacceltable activeaccel, 'dokey c+G', AF_CHAR+AF_CONTROL,             103, 1402  -- c+g
  644.  
  645.                        -- Build keys on Command menu
  646.    buildacceltable activeaccel, 'dokey c+I', AF_CHAR+AF_CONTROL,              73, 1501  -- c+I
  647.    buildacceltable activeaccel, 'dokey c+I', AF_CHAR+AF_CONTROL,             105, 1502  -- c+i
  648.  
  649.                        -- Block action bar accelerator keys (English)
  650.   compile if BLOCK_ACTIONBAR_ACCELERATORS
  651.    compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  652.    if not CUA_MENU_ACCEL then
  653.    compile endif
  654.    buildacceltable activeaccel, 'dokey a+'FILE_ACCEL__L,    AF_CHAR+AF_ALT, FILE_ACCEL__A1   , 1001  -- a+F
  655.    buildacceltable activeaccel, 'dokey a+'FILE_ACCEL__L,    AF_CHAR+AF_ALT, FILE_ACCEL__A2   , 1002  -- a+f
  656.    buildacceltable activeaccel, 'dokey a+'EDIT_ACCEL__L,    AF_CHAR+AF_ALT, EDIT_ACCEL__A1   , 1003  -- a+E
  657.    buildacceltable activeaccel, 'dokey a+'EDIT_ACCEL__L,    AF_CHAR+AF_ALT, EDIT_ACCEL__A2   , 1004  -- a+e
  658.    buildacceltable activeaccel, 'dokey a+'SEARCH_ACCEL__L,  AF_CHAR+AF_ALT, SEARCH_ACCEL__A1 , 1005  -- a+S
  659.    buildacceltable activeaccel, 'dokey a+'SEARCH_ACCEL__L,  AF_CHAR+AF_ALT, SEARCH_ACCEL__A2 , 1006  -- a+s
  660.    buildacceltable activeaccel, 'dokey a+'OPTIONS_ACCEL__L, AF_CHAR+AF_ALT, OPTIONS_ACCEL__A1, 1007  -- a+O
  661.    buildacceltable activeaccel, 'dokey a+'OPTIONS_ACCEL__L, AF_CHAR+AF_ALT, OPTIONS_ACCEL__A2, 1008  -- a+o
  662.    buildacceltable activeaccel, 'dokey a+'COMMAND_ACCEL__L, AF_CHAR+AF_ALT, COMMAND_ACCEL__A1, 1009  -- a+C
  663.    buildacceltable activeaccel, 'dokey a+'COMMAND_ACCEL__L, AF_CHAR+AF_ALT, COMMAND_ACCEL__A2, 1010  -- a+c
  664.    buildacceltable activeaccel, 'dokey a+'HELP_ACCEL__L,    AF_CHAR+AF_ALT, HELP_ACCEL__A1   , 1011  -- a+H
  665.    buildacceltable activeaccel, 'dokey a+'HELP_ACCEL__L,    AF_CHAR+AF_ALT, HELP_ACCEL__A2   , 1012  -- a+h
  666.    compile if MENU_LIMIT
  667.    buildacceltable activeaccel, 'dokey a+'RING_ACCEL__L,    AF_CHAR+AF_ALT, RING_ACCEL__A1   , 1013  -- a+R
  668.    buildacceltable activeaccel, 'dokey a+'RING_ACCEL__L,    AF_CHAR+AF_ALT, RING_ACCEL__A2   , 1014  -- a+r
  669.    compile endif
  670.    compile if EPATH = 'LAMPATH'
  671.    buildacceltable activeaccel, 'dokey a+'MAIL_ACCEL__L,    AF_CHAR+AF_ALT, MAIL_ACCEL__A1   , 1015  -- a+M
  672.    buildacceltable activeaccel, 'dokey a+'MAIL_ACCEL__L,    AF_CHAR+AF_ALT, MAIL_ACCEL__A2   , 1016  -- a+m
  673.    compile endif
  674.    compile if defined(ACTIONS_ACCEL__L)  -- For CUSTEPM support
  675.    buildacceltable activeaccel, 'dokey a+'ACTIONS_ACCEL__L, AF_CHAR+AF_ALT, ACTIONS_ACCEL__A1, 1017  -- a+A
  676.    buildacceltable activeaccel, 'dokey a+'ACTIONS_ACCEL__L, AF_CHAR+AF_ALT, ACTIONS_ACCEL__A2, 1018  -- a+a
  677.    compile endif
  678.    compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  679.    endif -- CUA_MENU_ACCEL
  680.    compile endif
  681.   compile endif -- BLOCK_ACTIONBAR_ACCELERATORS
  682. compile endif  -- EVERSION > 5.20
  683.  
  684. compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  685. define  -- Prepare for some conditional tests
  686.  compile if EPATH = 'LAMPATH'  -- If LaMail, "Mail" will be on action bar
  687.    maybe_mail_accel = 'MAIL_ACCEL__L ='
  688.  compile else                  -- otherwise, it won't
  689.    maybe_mail_accel = "' ' ="    -- Will be false for any letter
  690.  compile endif
  691.  compile if MENU_LIMIT
  692.    maybe_ring_accel = 'RING_ACCEL__L ='
  693.  compile else
  694.    maybe_ring_accel = "' ' ="  -- Will be false for any letter
  695.  compile endif
  696.  compile if defined(ACTIONS_ACCEL__L)  -- For CUSTEPM support
  697.    maybe_actions_accel = 'ACTIONS_ACCEL__L ='
  698.  compile else
  699.    maybe_actions_accel = "' ' ="  -- Will be false for any letter
  700.  compile endif
  701.  
  702. defproc update_edit_menu_text =
  703.    universal CUA_MENU_ACCEL
  704.    accel_len = (3+length(ALT_KEY__MSG))*(not CUA_MENU_ACCEL)
  705.  
  706.  compile if FILE_ACCEL__L = 'C' | EDIT_ACCEL__L = 'C' | SEARCH_ACCEL__L = 'C' | OPTIONS_ACCEL__L = 'C' | COMMAND_ACCEL__L = 'C' | HELP_ACCEL__L = 'C' | $maybe_mail_accel 'C' | $maybe_ring_accel 'C' | $maybe_actions_accel 'C'
  707.    menutext = COPY_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+C', accel_len)\0
  708.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  709.                       398,                  -- x18e, MM_SetItemText
  710.                       800 + 65536,
  711.                       ltoa(offset(menutext) || selector(menutext), 10) )
  712.  compile endif
  713.  
  714.  compile if FILE_ACCEL__L = 'M' | EDIT_ACCEL__L = 'M' | SEARCH_ACCEL__L = 'M' | OPTIONS_ACCEL__L = 'M' | COMMAND_ACCEL__L = 'M' | HELP_ACCEL__L = 'M' | $maybe_mail_accel 'M' | $maybe_ring_accel 'M' | $maybe_actions_accel 'M'
  715.    menutext = MOVE_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+M', accel_len)\0
  716.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  717.                       398,                  -- x18e, MM_SetItemText
  718.                       801 + 65536,
  719.                       ltoa(offset(menutext) || selector(menutext), 10) )
  720.  compile endif
  721.  
  722.  compile if FILE_ACCEL__L = 'O' | EDIT_ACCEL__L = 'O' | SEARCH_ACCEL__L = 'O' | OPTIONS_ACCEL__L = 'O' | COMMAND_ACCEL__L = 'O' | HELP_ACCEL__L = 'O' | $maybe_mail_accel 'O' | $maybe_ring_accel 'O' | $maybe_actions_accel 'O'
  723.    menutext = OVERLAY_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+O', accel_len)\0
  724.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  725.                       398,                  -- x18e, MM_SetItemText
  726.                       802 + 65536,
  727.                       ltoa(offset(menutext) || selector(menutext), 10) )
  728.  compile endif
  729.  
  730.  compile if FILE_ACCEL__L = 'A' | EDIT_ACCEL__L = 'A' | SEARCH_ACCEL__L = 'A' | OPTIONS_ACCEL__L = 'A' | COMMAND_ACCEL__L = 'A' | HELP_ACCEL__L = 'A' | $maybe_mail_accel 'A' | $maybe_ring_accel 'A' | $maybe_actions_accel 'A'
  731.    menutext = ADJUST_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+A', accel_len)\0
  732.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  733.                       398,                  -- x18e, MM_SetItemText
  734.                       803 + 65536,
  735.                       ltoa(offset(menutext) || selector(menutext), 10) )
  736.  compile endif
  737.  
  738.  compile if FILE_ACCEL__L = 'U' | EDIT_ACCEL__L = 'U' | SEARCH_ACCEL__L = 'U' | OPTIONS_ACCEL__L = 'U' | COMMAND_ACCEL__L = 'U' | HELP_ACCEL__L = 'U' | $maybe_mail_accel 'U' | $maybe_ring_accel 'U' | $maybe_actions_accel 'U'
  739.    menutext = UNMARK_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+U', accel_len)\0
  740.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  741.                       398,                  -- x18e, MM_SetItemText
  742.                       805 + 65536,
  743.                       ltoa(offset(menutext) || selector(menutext), 10) )
  744.  compile endif
  745.  
  746.  compile if FILE_ACCEL__L = 'D' | EDIT_ACCEL__L = 'D' | SEARCH_ACCEL__L = 'D' | OPTIONS_ACCEL__L = 'D' | COMMAND_ACCEL__L = 'D' | HELP_ACCEL__L = 'D' | $maybe_mail_accel 'D' | $maybe_ring_accel 'D' | $maybe_actions_accel 'D'
  747.    menutext = DELETE_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+D', accel_len)\0
  748.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  749.                       398,                  -- x18e, MM_SetItemText
  750.                       806 + 65536,
  751.                       ltoa(offset(menutext) || selector(menutext), 10) )
  752.  compile endif
  753.  
  754. compile endif
  755.