home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
e
/
epmmac2.zip
/
STDMENU.E
< prev
next >
Wrap
Text File
|
1993-01-11
|
29KB
|
473 lines
compile if not defined(CORE_stuff)
; This determines whether the CORE-specific commands (DEFINE)
; are included in the menus.
const CORE_STUFF=0
compile endif
include 'menuhelp.H'
/*
┌─────────────────────────────────────────────────────────────────────────────┐
│What's it called : loaddefaultmenu │
│ │
│What does it do : used by stdcnf.e to setup default EPM action bar │
│ (Note: a menu id of 0 halts the interpreter when │
│ selected.) │
│ │
│Who and When : Jerry C. 2/25/89 │
└─────────────────────────────────────────────────────────────────────────────┘
*/
defc loaddefaultmenu
universal activemenu,defaultmenu
parse arg menuname .
if menuname = '' then -- Initialization call
menuname = 'default'
defaultmenu = menuname -- default menu name
activemenu = defaultmenu
endif
compile if EPATH='LAMPATH' -- LaMail sets up a mail menu first.
defc loaddefaultmenu2
universal activemenu,defaultmenu
menuname = defaultmenu
compile endif
compile if EVERSION < 5.20 -- 5.20 doesn't run on earlier versions of OS/2; no need to check.
one_two = dos_version()>=1020
compile endif
call add_file_menu(menuname)
call add_edit_menu(menuname)
call add_search_menu(menuname)
compile if EVERSION < 5.20
call add_options_menu(menuname, one_two)
compile else
call add_options_menu(menuname)
compile endif
compile if MENU_LIMIT
call add_ring_menu(menuname)
compile endif
call add_command_menu(menuname)
compile if EPATH<>'LAMPATH' -- LaMail puts a VM menu here, then adds help.
compile if EVERSION < 5.20
call add_help_menu(menuname, one_two)
compile else
call add_help_menu(menuname)
compile endif
compile endif
defproc add_file_menu(menuname)
compile if RING_OPTIONAL
universal ring_enabled
compile endif
buildsubmenu menuname, 2, FILE_BAR__MSG, FILE_BARP__MSG, 0 , mpfrom2short(HP_FILE, 0)
buildmenuitem menuname, 2, 198, NEW_MENU__MSG, 'NEW'NEW_MENUP__MSG, 0, mpfrom2short(HP_FILE_NEW, 0)
buildmenuitem menuname, 2, 199, OPEN_NEW_MENU__MSG, 'OPEN'OPEN_NEW_MENUP__MSG, 0, mpfrom2short(HP_FILE_OPEN_NEW, 0)
buildmenuitem menuname, 2, 200, OPEN_MENU__MSG\9'Ctrl+O', 'OPENDLG'OPEN_MENUP__MSG, 0, mpfrom2short(HP_FILE_OPEN, 0)
buildmenuitem menuname, 2, 201, GET_MENU__MSG, 'OPENDLG GET'GET_MENUP__MSG, 0, mpfrom2short(HP_FILE_GET , 0)
compile if RING_OPTIONAL
if ring_enabled then
compile endif
buildmenuitem menuname, 2, 202, ADD_MENU__MSG\9'F8', 'OPENDLG EDIT'ADD_MENUP__MSG, 0, mpfrom2short(HP_FILE_EDIT, 0)
compile if RING_OPTIONAL
endif
compile endif
buildmenuitem menuname, 2, 203, \0, '', 4, 0
buildmenuitem menuname, 2, 204, RENAME_MENU__MSG\9'F7', 'rename'RENAME_MENUP__MSG,0, mpfrom2short(HP_FILE_NAME, 0)
buildmenuitem menuname, 2, 205, \0, '', 4, 0
buildmenuitem menuname, 2, 206, SAVE_MENU__MSG\9'F2', 'SAVE'SAVE_MENUP__MSG, 0, mpfrom2short(HP_FILE_SAVE, 0)
compile if EVERSION >= '5.21'
buildmenuitem menuname, 2, 208, SAVEAS_MENU__MSG, 'SAVEAS_DLG'SAVEAS_MENUP__MSG, 0, mpfrom2short(HP_FILE_SAVEAS, 0)
compile endif
compile if RING_OPTIONAL
if ring_enabled then
compile endif -- Note: 207 used in LaMail; keep ID the same.
buildmenuitem menuname, 2, 207, FILE_MENU__MSG\9'F4', 'FILE'FILE_MENUP__MSG, 0, mpfrom2short(HP_FILE_FILE, 0)
compile if RING_OPTIONAL
else
buildmenuitem menuname, 2, 207, SAVECLOSE_MENU__MSG\9'F4', 'FILE'FILE_MENUP__MSG, 0, mpfrom2short(HP_FILE_FILE, 0)
endif
compile endif
buildmenuitem menuname, 2, 209, QUIT_MENU__MSG\9'F3', 'QUIT'QUIT_MENUP__MSG, 0, mpfrom2short(HP_FILE_QUIT, 0)
buildmenuitem menuname, 2, 210, \0, '', 4, 0
compile if ENHANCED_PRINT_SUPPORT
buildmenuitem menuname, 2, 211, PRT_FILE_MENU__MSG'...', 'printdlg'ENHPRT_FILE_MENUP__MSG, 0, mpfrom2short(HP_FILE_ENHPRINT, 0)
compile elseif EVERSION < '5.50'
buildmenuitem menuname, 2, 211, PRT_FILE_MENU__MSG, 'xcom save' default_printer()PRT_FILE_MENUP__MSG, 0, mpfrom2short(HP_FILE_PRINT, 0)
compile else
buildmenuitem menuname, 2, 211, PRT_FILE_MENU__MSG, 'xcom save /ne' default_printer()PRT_FILE_MENUP__MSG, 0, mpfrom2short(HP_FILE_PRINT, 0)
compile endif
return
define
PASTE_C_KEY = ''
PASTE_B_KEY = ''
PASTE_L_KEY = ''
compile if DEFAULT_PASTE = ''
PASTE_L_KEY = \9 || SHIFT_KEY__MSG'+'INSERT_KEY__MSG
compile elseif DEFAULT_PASTE = 'B'
PASTE_B_KEY = \9 || SHIFT_KEY__MSG'+'INSERT_KEY__MSG
compile elseif DEFAULT_PASTE = 'C'
PASTE_C_KEY = \9 || SHIFT_KEY__MSG'+'INSERT_KEY__MSG
compile else
* Error: DEFAULT_PASTE must be '', 'B', or 'C'
compile endif
compile if not defined(MAIL_ACCEL__L) -- LaMail not NLS-translated.
const MAIL_ACCEL__L = 'M'
compile endif
define -- Prepare for some conditional tests
compile if EPATH = 'LAMPATH' -- If LaMail, "Mail" will be on action bar
maybe_mail_accel = 'MAIL_ACCEL__L <>'
compile else -- otherwise, it won't
maybe_mail_accel = "' ' <" -- Will be true for any letter
compile endif
compile if MENU_LIMIT
maybe_ring_accel = 'RING_ACCEL__L <>'
compile else
maybe_ring_accel = "' ' <" -- Will be true for any letter
compile endif
defproc add_edit_menu(menuname)
compile if WANT_STACK_CMDS = 'SWITCH'
universal stack_cmds
compile endif
compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
universal CUA_MENU_ACCEL
compile endif
buildsubmenu menuname, 8, EDIT_BAR__MSG, ''EDIT_BARP__MSG, 0 , mpfrom2short(HP_EDIT, 0)
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)
compile if EVERSION > 5.19
buildmenuitem menuname, 8, 818, UNDO_REDO_MENU__MSG, 'undodlg'UNDO_REDO_MENUP__MSG, 0, mpfrom2short(HP_EDIT_UNDOREDO, 0)
compile endif
compile if WANT_DM_BUFFER
buildmenuitem menuname, 8, 817, RECOVER_MARK_MENU__MSG, 'GetDMBuff'RECOVER_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_RECOVER, 0)
compile endif -- WANT_DM_BUFFER
buildmenuitem menuname, 8, 807, \0, '', 4, 0
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)
buildmenuitem menuname, 8, 809, CUT_MENU__MSG\9 || SHIFT_KEY__MSG'+'DELETE_KEY__MSG, 'Cut'CUT_MENUP__MSG, 0, mpfrom2short(HP_EDIT_CUT, 0)
buildmenuitem menuname, 8, 810, PASTE_C_MENU__MSG||PASTE_C_KEY, 'Paste C'PASTE_C_MENUP__MSG, 0, mpfrom2short(HP_EDIT_PASTEC, 0)
buildmenuitem menuname, 8, 811, PASTE_L_MENU__MSG||PASTE_L_KEY, 'Paste'PASTE_L_MENUP__MSG, 0, mpfrom2short(HP_EDIT_PASTE, 0)
buildmenuitem menuname, 8, 812, PASTE_B_MENU__MSG||PASTE_B_KEY, 'Paste B'PASTE_B_MENUP__MSG, 0, mpfrom2short(HP_EDIT_PASTEB, 0)
compile if EVERSION >= 5.50 -- In 5.50, we have a STYLE attribute
buildmenuitem menuname, 8, 826, \0, '', 4, 0
buildmenuitem menuname, 8, 827, STYLE_MENU__MSG\9'Ctrl+Y', 'fontlist'STYLE_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_STYLE, 0)
compile endif
buildmenuitem menuname, 8, 815, \0, '', 4, 0
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')
buildmenuitem menuname, 8, 800, COPY_MARK_MENU__MSG\9'Alt+C', 'DUPMARK C'COPY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPYMARK, 0)
compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
buildmenuitem menuname, 8, 800, COPY_MARK_MENU__MSG||leftstr(\9'Alt+C',6*(not CUA_MENU_ACCEL)), 'DUPMARK C'COPY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPYMARK, 0)
compile else
buildmenuitem menuname, 8, 800, COPY_MARK_MENU__MSG, 'DUPMARK C'COPY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPYMARK, 0)
compile endif
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')
buildmenuitem menuname, 8, 801, MOVE_MARK_MENU__MSG\9'Alt+M', 'DUPMARK M'MOVE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_MOVE, 0)
compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
buildmenuitem menuname, 8, 801, MOVE_MARK_MENU__MSG||leftstr(\9'Alt+M',6*(not CUA_MENU_ACCEL)), 'DUPMARK M'MOVE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_MOVE, 0)
compile else
buildmenuitem menuname, 8, 801, MOVE_MARK_MENU__MSG, 'DUPMARK M'MOVE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_MOVE, 0)
compile endif
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')
buildmenuitem menuname, 8, 802, OVERLAY_MARK_MENU__MSG\9'Alt+O', 'DUPMARK O'OVERLAY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_OVERLAY, 0)
compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
buildmenuitem menuname, 8, 802, OVERLAY_MARK_MENU__MSG||leftstr(\9'Alt+O',6*(not CUA_MENU_ACCEL)), 'DUPMARK O'OVERLAY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_OVERLAY, 0)
compile else
buildmenuitem menuname, 8, 802, OVERLAY_MARK_MENU__MSG, 'DUPMARK O'OVERLAY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_OVERLAY, 0)
compile endif
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')
buildmenuitem menuname, 8, 803, ADJUST_MARK_MENU__MSG\9'Alt+A', 'DUPMARK A'ADJUST_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_ADJUST, 0)
compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
buildmenuitem menuname, 8, 803, ADJUST_MARK_MENU__MSG||leftstr(\9'Alt+A',6*(not CUA_MENU_ACCEL)), 'DUPMARK A'ADJUST_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_ADJUST, 0)
compile else
buildmenuitem menuname, 8, 803, ADJUST_MARK_MENU__MSG, 'DUPMARK A'ADJUST_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_ADJUST, 0)
compile endif
buildmenuitem menuname, 8, 804, \0, '', 4, 0
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')
buildmenuitem menuname, 8, 805, UNMARK_MARK_MENU__MSG\9'Alt+U', 'DUPMARK U'UNMARK_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_UNMARK, 0)
compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
buildmenuitem menuname, 8, 805, UNMARK_MARK_MENU__MSG||leftstr(\9'Alt+U',6*(not CUA_MENU_ACCEL)), 'DUPMARK U'UNMARK_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_UNMARK, 0)
compile else
buildmenuitem menuname, 8, 805, UNMARK_MARK_MENU__MSG, 'DUPMARK U'UNMARK_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_UNMARK, 0)
compile endif
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')
buildmenuitem menuname, 8, 806, DELETE_MARK_MENU__MSG\9'Alt+D', 'DUPMARK D'DELETE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_DELETE, 0)
compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
buildmenuitem menuname, 8, 806, DELETE_MARK_MENU__MSG||leftstr(\9'Alt+D',6*(not CUA_MENU_ACCEL)), 'DUPMARK D'DELETE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_DELETE, 0)
compile else
buildmenuitem menuname, 8, 806, DELETE_MARK_MENU__MSG, 'DUPMARK D'DELETE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_DELETE, 0)
compile endif
compile if WANT_STACK_CMDS
compile if WANT_STACK_CMDS = 'SWITCH'
if stack_cmds then
compile endif
buildmenuitem menuname, 8, 819, \0, '', 4, 0
buildmenuitem menuname, 8, 820, PUSH_MARK_MENU__MSG, 'PUSHMARK'PUSH_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_PUSHMARK, 0)
buildmenuitem menuname, 8, 821, POP_MARK_MENU__MSG, 'POPMARK'POP_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_POPMARK, 16384)
buildmenuitem menuname, 8, 822, SWAP_MARK_MENU__MSG, 'SWAPMARK'SWAP_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_SWAPMARK, 16384)
buildmenuitem menuname, 8, 823, PUSH_CURSOR_MENU__MSG, 'PUSHPOS'PUSH_CURSOR_MENUP__MSG, 0, mpfrom2short(HP_EDIT_PUSHPOS, 0)
buildmenuitem menuname, 8, 824, POP_CURSOR_MENU__MSG, 'POPPOS'POP_CURSOR_MENUP__MSG, 0, mpfrom2short(HP_EDIT_POPPOS, 16384)
buildmenuitem menuname, 8, 825, SWAP_CURSOR_MENU__MSG, 'SWAPPOS'SWAP_CURSOR_MENUP__MSG, 0, mpfrom2short(HP_EDIT_SWAPPOS, 16384)
compile if WANT_STACK_CMDS = 'SWITCH'
endif
compile endif
compile endif
buildmenuitem menuname, 8, 813, \0, '', 4, 0
compile if ENHANCED_PRINT_SUPPORT
buildmenuitem menuname, 8, 814, PRT_MARK_MENU__MSG'...', 'PRINTDLG M'ENHPRT_MARK_MENUP__MSG,0, mpfrom2short(HP_EDIT_ENHPRINT, 0)
compile else
buildmenuitem menuname, 8, 814, PRT_MARK_MENU__MSG, 'DUPMARK P'PRT_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_PRINT, 0)
compile endif
return
defproc add_search_menu(menuname)
buildsubmenu menuname, 3, SEARCH_BAR__MSG, ''SEARCH_BARP__MSG, 0 , mpfrom2short(HP_SEARCH, 0)
buildmenuitem menuname, 3, 300, SEARCH_MENU__MSG\9'Ctrl+S', 'SEARCHDLG'SEARCH_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_SEARCH, 0)
buildmenuitem menuname, 3, 301, \0, '', 4, 0
buildmenuitem menuname, 3, 302, FIND_NEXT_MENU__MSG\9'Ctrl+F', 'SEARCHDLG F'FIND_NEXT_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_FIND, 0)
buildmenuitem menuname, 3, 303, CHANGE_NEXT_MENU__MSG\9'Ctrl+C', 'SEARCHDLG C'CHANGE_NEXT_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_CHANGE, 0)
compile if WANT_BOOKMARKS
buildmenuitem menuname, 3, 304, \0, '', 4, 0
buildmenuitem menuname, 3, 305, BOOKMARKS_MENU__MSG, BOOKMARKS_MENUP__MSG, 17, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
buildmenuitem menuname, 3, 306, SET_MARK_MENU__MSG\9'Ctrl+M', 'setmark'SET_MARK_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
compile if EVERSION < 5.21 -- 5.21 adds a custom dialog for setting bookmarks
buildmenuitem menuname, 3, 307, '~Set permanent...', 'setmarkp', 0, 0
compile endif
buildmenuitem menuname, 3, 308, LIST_MARK_MENU__MSG\9'Ctrl+B', 'listmark'LIST_MARK_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
buildmenuitem menuname, 3, 310, \0, '', 4, 0
buildmenuitem menuname, 3, 311, NEXT_MARK_MENU__MSG\9'Alt+/', 'nextbookmark'NEXT_MARK_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
buildmenuitem menuname, 3, 312, PREV_MARK_MENU__MSG\9'Alt+\', 'nextbookmark P'PREV_MARK_MENUP__MSG, 32768+1, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
compile endif
return
; Preferences pull-right can get Set enter, Advanced mark, Stream mode, and
; Ring enabled, in addition to Configure. Here we calculate which menu item
; gets the "end pullright" attribute.
define
NEED_PREFERENCES = 1 -- Start out assuming this
compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
ENTER__ATTRIB = 0
MARK__ATTRIB = 0
STREAM__ATTRIB = 0
RING__ATTRIB = 0
STACK__ATTRIB = 0
ACCEL__ATTRIB = 32769
compile elseif WANT_STACK_CMDS = 'SWITCH'
ENTER__ATTRIB = 0
MARK__ATTRIB = 0
STREAM__ATTRIB = 0
RING__ATTRIB = 0
STACK__ATTRIB = 32769
compile elseif RING_OPTIONAL
ENTER__ATTRIB = 0
MARK__ATTRIB = 0
STREAM__ATTRIB = 0
RING__ATTRIB = 32769
compile elseif WANT_STREAM_MODE = 'SWITCH'
ENTER__ATTRIB = 0
MARK__ATTRIB = 0
STREAM__ATTRIB = 32769
compile elseif WANT_CUA_MARKING = 'SWITCH'
ENTER__ATTRIB = 0
MARK__ATTRIB = 32769
compile elseif ENHANCED_ENTER_KEYS & WANT_STREAM_MODE <> 1 & EVERSION < 5.21 -- 5.21 adds this to config dialog
ENTER__ATTRIB = 32769
compile else
NEED_PREFERENCES = 0 -- If none of the above, we don't need this after all
compile endif
compile if EVERSION < '5.50'
TOGGLEINFO = 'toggle_info'
compile elseif EVERSION < '5.53'
TOGGLEINFO = 'togglecontrol 23'
compile else
TOGGLEINFO = 'toggleframe 32'
compile endif
compile if EVERSION < 5.20
defproc add_options_menu(menuname,one_two)
compile else
defproc add_options_menu(menuname)
compile endif
compile if RING_OPTIONAL
universal ring_enabled
compile endif
universal font
compile if CHECK_FOR_LEXAM
universal LEXAM_is_available
compile endif
buildsubmenu menuname, 4, OPTIONS_BAR__MSG, OPTIONS_BARP__MSG, 0 , mpfrom2short(HP_OPTIONS, 0)
compile if MENU_LIMIT = 0
compile if RING_OPTIONAL
if ring_enabled then
compile endif
buildmenuitem menuname, 4, 410, LIST_FILES_MENU__MSG\9'Ctrl+G', 'Ring_More'LIST_FILES_MENUP__MSG, 0 , mpfrom2short(HP_OPTIONS_LIST, 0)
buildmenuitem menuname, 4, 411, \0, '', 4, 0
compile if RING_OPTIONAL
endif
compile endif
compile endif
compile if IBM_IUO & SPELL_SUPPORT
compile if CHECK_FOR_LEXAM
if LEXAM_is_available then
compile endif
buildmenuitem menuname, 4, 404, PROOF_MENU__MSG, 'proof'PROOF_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_PROOF, 0)
buildmenuitem menuname, 4, 405, PROOF_WORD_MENU__MSG, 'proofword'PROOF_WORD_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_PROOFW, 0)
buildmenuitem menuname, 4, 406, SYNONYM_MENU__MSG, 'syn'SYNONYM_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_SYN, 0)
compile if CORE_STUFF
buildmenuitem menuname, 4, 426, DEFINE_WORD_MENU__MSG, 'define'DEFINE_WORD_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_DEFINE, 0)
compile endif -- CORE_STUFF
buildmenuitem menuname, 4, 407, \0, '', 4, 0
compile if CHECK_FOR_LEXAM
endif
compile endif
compile endif
; If no "Toggle stream mode" or "Toggle advanced marking" or "Enable ring", then
; place "Configure..." on main Options menu. Otherwise, put it on a Preferences
; pull-right with the other stuff.
compile if NEED_PREFERENCES
buildmenuitem menuname, 4, 400, PREFERENCES_MENU__MSG, PREFERENCES_MENUP__MSG, 17, mpfrom2short(HP_OPTIONS_PREFERENCES, 0)
compile endif
compile if WANT_APPLICATION_INI_FILE
buildmenuitem menuname, 4, 440, CONFIG_MENU__MSG, 'configdlg'CONFIG_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_CONFIG, 0)
compile if ENHANCED_ENTER_KEYS & WANT_STREAM_MODE <> 1 & EVERSION < 5.21 -- 5.21 adds this to config dialog
buildmenuitem menuname, 4, 444, SETENTER_MENU__MSG, 'config_enter'SETENTER_MENUP__MSG, ENTER__ATTRIB, mpfrom2short(HP_OPTIONS_CFGENTER, 0)
compile endif
compile endif
compile if WANT_CUA_MARKING = 'SWITCH'
buildmenuitem menuname, 4, 441, ADVANCEDMARK_MENU__MSG, 'CUA_MARK_toggle'ADVANCEDMARK_MENUP__MSG, MARK__ATTRIB, mpfrom2short(HP_OPTIONS_CUATOGGLE, 0)
compile endif
compile if WANT_STREAM_MODE = 'SWITCH'
buildmenuitem menuname, 4, 442, STREAMMODE_MENU__MSG, 'stream_toggle'STREAMMODE_MENUP__MSG, STREAM__ATTRIB, mpfrom2short(HP_OPTIONS_STREAM, 0)
compile endif
compile if RING_OPTIONAL
buildmenuitem menuname, 4, 443, RINGENABLED_MENU__MSG, 'ring_toggle'RINGENABLED_MENUP__MSG, RING__ATTRIB, mpfrom2short(HP_OPTIONS_RINGENABLE, 0)
compile endif
compile if WANT_STACK_CMDS = 'SWITCH'
buildmenuitem menuname, 4, 445, STACKCMDS_MENU__MSG, 'stack_toggle'STACKCMDS_MENUP__MSG, STACK__ATTRIB, mpfrom2short(HP_OPTIONS_STACKCMDS, 0)
compile endif
compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
buildmenuitem menuname, 4, 446, CUAACCEL_MENU__MSG, 'accel_toggle'CUAACCEL_MENUP__MSG, ACCEL__ATTRIB, mpfrom2short(HP_OPTIONS_CUAACCEL, 0)
compile endif
buildmenuitem menuname, 4, 401, \0, '', 4, 0
buildmenuitem menuname, 4, 402, AUTOSAVE_MENU__MSG, 'autosave ?'AUTOSAVE_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_AUTOSAVE, 0)
buildmenuitem menuname, 4, 403, \0, '', 4, 0
buildmenuitem menuname, 4, 412, MESSAGES_MENU__MSG, 'messagebox'MESSAGES_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_MESSAGES, 0)
buildmenuitem menuname, 4, 409, \0, '', 4, 0
; Note: 408 is referenced by TOGGLEFONT. If the number changes, update TOGGLEFONT.
compile if EVERSION < 5.50
compile if EVERSION < 5.20 -- Earlier EPM versions didn't do DEVESCAPE
if screenxysize('X')>1000 and one_two then -- BGA and 1.2 or above
compile else -- We can assume 1.2 or above; 1.1 no longer supported
if screenxysize('X')>1000 or dos_version()>=1030 then -- BGA *or* 1.3 for many fonts
compile endif
compile endif
compile if EVERSION < 5.21 -- In 5.21, on notebook config control
buildmenuitem menuname, 4, 408, CHANGE_FONT_MENU__MSG, 'fontlist'CHANGE_FONT_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_FONT, 0)
compile endif
compile if EVERSION < 5.50
else
if font then
buildmenuitem menuname, 4, 408, SMALL_FONT_MENU__MSG, 'togglefont'SMALL_FONT_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_FONT, 0)
else
buildmenuitem menuname, 4, 408, LARGE_FONT_MENU__MSG, 'togglefont'LARGE_FONT_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_FONT, 0)
endif
endif
compile endif
compile if EVERSION > 5.18
buildmenuitem menuname, 4, 425, FRAME_CTRLS_MENU__MSG, FRAME_CTRLS_MENUP__MSG, 17, mpfrom2short(HP_OPTIONS_FRAME, 0)
compile if EVERSION < 5.53
buildmenuitem menuname, 4, 413, STATUS_LINE_MENU__MSG, 'togglecontrol 7'STATUS_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_STATUS, 0)
buildmenuitem menuname, 4, 414, MSG_LINE_MENU__MSG, 'togglecontrol 8'MSG_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_MESSAGE, 0)
compile else
buildmenuitem menuname, 4, 413, STATUS_LINE_MENU__MSG, 'toggleframe 1'STATUS_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_STATUS, 0)
buildmenuitem menuname, 4, 414, MSG_LINE_MENU__MSG, 'toggleframe 2'MSG_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_MESSAGE, 0)
compile endif
buildmenuitem menuname, 4, 415, SCROLL_BARS_MENU__MSG, 'setscrolls'SCROLL_BARS_MENUP__MSG, 0, mpfrom2short(HP_FRAME_SCROLL, 0)
;; buildmenuitem menuname, 4, 416, 'Partial te~xt', 'togglecontrol 15', 32768+1, 0, 0
compile if EVERSION < 5.50
buildmenuitem menuname, 4, 416, FILEICON_MENU__MSG, 'togglecontrol 22'FILEICON_MENUP__MSG, 0, mpfrom2short(HP_FRAME_FILE, 0)
compile endif
compile if EVERSION < 5.53
buildmenuitem menuname, 4, 417, ROTATEBUTTONS_MENU__MSG,'togglecontrol 20'ROTATEBUTTONS_MENUP__MSG, 0, mpfrom2short(HP_FRAME_ROTATE, 0)
compile else
buildmenuitem menuname, 4, 417, ROTATEBUTTONS_MENU__MSG,'toggleframe 4'ROTATEBUTTONS_MENUP__MSG, 0, mpfrom2short(HP_FRAME_ROTATE, 0)
compile endif
compile if WANT_DYNAMIC_PROMPTS
buildmenuitem menuname, 4, 421, INFOATTOP_MENU__MSG, TOGGLEINFO || INFOATTOP_MENUP__MSG, 0, mpfrom2short(HP_FRAME_EXTRAPOS, 0)
buildmenuitem menuname, 4, 422, PROMPTING_MENU__MSG, 'toggleprompt'PROMPTING_MENUP__MSG, 32768+1, mpfrom2short(HP_FRAME_PROMPT, 0)
compile else
buildmenuitem menuname, 4, 421, INFOATTOP_MENU__MSG, TOGGLEINFO || INFOATTOP_MENUP__MSG, 32768+1, mpfrom2short(HP_FRAME_EXTRAPOS, 0)
compile endif
compile else
buildmenuitem menuname, 4, 413, STATUS_LINE_MENU__MSG, 'togglecontrol 7', 0, 0
buildmenuitem menuname, 4, 414, MSG_LINE_MENU__MSG, , 'togglecontrol 8', 0, 0
buildmenuitem menuname, 4, 415, SCROLL_BARS_MENU__MSG, 'setscrolls', 0, 0
;; buildmenuitem menuname, 4, 416, 'Partial te~xt', 'togglecontrol 15', 0, 0
compile endif
compile if WANT_APPLICATION_INI_FILE
buildmenuitem menuname, 4, 418, SAVE_OPTS_MENU__MSG, 'saveoptions'SAVE_OPTS_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_SAVE, 0)
compile endif
compile if EPATH = 'LAMPATH'
buildmenuitem menuname, 4, 419, \0, '', 4, 0
buildmenuitem menuname, 4, 420, TO_DESKTOP_MENU__MSG, 'popbook'TO_DESKTOP_MENUP__MSG, 0, 0
compile elseif SUPPORT_BOOK_ICON
buildmenuitem menuname, 4, 419, \0, '', 4, 0
buildmenuitem menuname, 4, 420, TO_BOOK_MENU__MSG, 'popbook'TO_BOOK_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_BOOK, 0)
compile endif
return
compile if MENU_LIMIT
defproc add_ring_menu(menuname)
buildsubmenu menuname, 5, RING_BAR__MSG, LIST_FILES_MENUP__MSG, 0 , 0
if .titletext=='' then
buildmenuitem menuname, 5, 500, .filename, '',0,0
else
buildmenuitem menuname, 5, 500, .titletext, '',0,0
endif
return
compile endif
defproc add_command_menu(menuname)
buildsubmenu menuname, 1, COMMAND_BAR__MSG, COMMAND_BARP__MSG, 0 , mpfrom2short(HP_COMMAND, 0)
buildmenuitem menuname, 1, 100, COMMANDLINE_MENU__MSG\9'Ctrl+I', 'commandline'COMMANDLINE_MENUP__MSG, 0, mpfrom2short(HP_COMMAND_CMD, 0)
compile if EVERSION >= 5.50
buildmenuitem menuname, 1, 65535, HALT_COMMAND_MENU__MSG, '', 0, mpfrom2short(HP_COMMAND_HALT, 0)
compile else
buildmenuitem menuname, 1, 0, HALT_COMMAND_MENU__MSG, '', 0, mpfrom2short(HP_COMMAND_HALT, 0)
compile endif
compile if WANT_EPM_SHELL = 1
buildmenuitem menuname, 1, 101, \0, '', 4, 0
buildmenuitem menuname, 1, 102, CREATE_SHELL_MENU__MSG, 'shell'CREATE_SHELL_MENUP__MSG, 0, mpfrom2short(HP_COMMAND_SHELL, 0)
buildmenuitem menuname, 1, 103, WRITE_SHELL_MENU__MSG, 'shell_write'WRITE_SHELL_MENUP__MSG, 0, mpfrom2short(HP_COMMAND_SHELL, 16384)
; buildmenuitem menuname, 1, 104, KILL_SHELL_MENU__MSG, 'shell_kill'KILL_SHELL_MENUP__MSG, 0, mpfrom2short(HP_COMMAND_SHELL, 16384)
compile endif
return
compile if EVERSION < 5.20
defproc add_help_menu(menuname, one_two)
attrib = 16384 * (not one_two) -- If OS/2 1.2 then 0; else 16384 (greyed out)
compile else
defproc add_help_menu(menuname)
attrib = 0
compile endif
buildsubmenu menuname, HELP_MENU_ID, HELP_BAR__MSG, 'help'HELP_BARP__MSG, /* 512 */ 0, mpfrom2short(HP_HELP, 0)
buildmenuitem menuname, HELP_MENU_ID, 603, HELP_INDEX_MENU__MSG, 'helpmenu 10'/*64044*/HELP_INDEX_MENUP__MSG, 0, mpfrom2short(HP_HELP_INDEX, attrib)
buildmenuitem menuname, HELP_MENU_ID, 601, EXT_HELP_MENU__MSG, 'helpmenu 4000'EXT_HELP_MENUP__MSG, 0, mpfrom2short(HP_HELP_EXTENDED, attrib)
buildmenuitem menuname, HELP_MENU_ID, 600, HELP_HELP_MENU__MSG, 'helpmenu 64027'HELP_HELP_MENUP__MSG, 0, mpfrom2short(HP_HELP_HELP, attrib)
buildmenuitem menuname, HELP_MENU_ID, 602, KEYS_HELP_MENU__MSG, 'helpmenu 1000'KEYS_HELP_MENUP__MSG, 0, mpfrom2short(HP_HELP_KEYS, attrib)
compile if IBM_IUO
buildmenuitem menuname, HELP_MENU_ID, 604, \0, '', 4, 0
buildmenuitem menuname, HELP_MENU_ID, 605, HELP_BROWSER_MENU__MSG, 'help'HELP_BROWSER_MENUP__MSG, 0, mpfrom2short(HP_HELP_BROWSE, 0)
compile endif
buildmenuitem menuname, HELP_MENU_ID, 606, \0, '', 4, 0
compile if 0
buildmenuitem menuname, HELP_MENU_ID, 607, '#211'||(3-(screenxysize('X')>1000)), 'IBMmsg'HELP_PROD_MENUP__MSG, 2, mpfrom2short(HP_HELP_IBM, 0)
-- Resource # 2112 or 2113 in ERES.DLL
compile else
buildmenuitem menuname, HELP_MENU_ID, 607, HELP_PROD_MENU__MSG, 'IBMmsg'HELP_PROD_MENUP__MSG, 0, mpfrom2short(HP_HELP_PROD, 0)
compile endif