home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / epmmac.zip / SELECT.E < prev    next >
Text File  |  1994-09-22  |  4KB  |  136 lines

  1. compile if not defined(LOCAL_MOUSE_SUPPORT)
  2.  const LOCAL_MOUSE_SUPPORT = 0
  3. compile endif
  4. const
  5.   TransparentMouseHandler = "TransparentMouseHandler"
  6.  
  7. compile if eversion >= '4.12'
  8. ;  SELECT.E                                                 Bryan Lewis 1/2/89
  9. ;
  10. ;  This replaces the clumsy old select_edit_keys() procedure, which had to
  11. ;  be explicitly called after any action that might change the current file.
  12. ;  This DEFSELECT event is automatically triggered whenever the current file
  13. ;  after an action is different from the one before the action.  It never
  14. ;  needs to be (and can't be) explicitly called.
  15. ;
  16. ;  This is triggered after all command processing is done, if the then-current
  17. ;  file is different from the one before the command.  If a command switches
  18. ;  to a temporary file but switches back to the original file before ending,
  19. ;  this event will not be triggered.
  20. ;
  21. ;  Because of other improvements -- keyset, tabs and margins are bound to
  22. ;  the file now, and are selected at load time in a DEFLOAD event -- there's
  23. ;  not much work to be done here.
  24. ;
  25. defproc select_edit_keys()
  26.    /* Dummy proc for compatibility.  Select_edit_keys() isn't used any more.*/
  27.  
  28. defselect
  29.    universal messy
  30. compile if LOCAL_MOUSE_SUPPORT
  31.    universal LMousePrefix
  32.    universal EPM_utility_array_ID
  33. compile endif
  34. compile if WANT_EBOOKIE = 'DYNALINK'
  35.    universal bkm_avail
  36. compile endif
  37. compile if WANT_EPM_SHELL & INCLUDE_STD_MENUS
  38.    universal shell_index
  39.    if shell_index then
  40.       is_shell = leftstr(.filename, 15) = ".command_shell_"
  41.  compile if not defined(STD_MENU_NAME)
  42.       SetMenuAttribute( 103, 16384, is_shell)
  43.   compile if EPM32
  44.       SetMenuAttribute( 104, 16384, is_shell)
  45.   compile endif
  46.  compile elseif STD_MENU_NAME = 'ovshmenu.e'
  47.       SetMenuAttribute( 152, 16384, is_shell)
  48.   compile if EPM32
  49.       SetMenuAttribute( 153, 16384, is_shell)
  50.   compile endif
  51.  compile elseif STD_MENU_NAME = 'fevshmnu.e'
  52.       SetMenuAttribute( 142, 16384, is_shell)
  53.   compile if EPM32
  54.       SetMenuAttribute( 143, 16384, is_shell)
  55.   compile endif
  56.  compile endif
  57.    endif  -- shell_index
  58. compile endif
  59. compile if LOCAL_MOUSE_SUPPORT
  60.    getfileid ThisFile
  61.    OldRC = Rc
  62.    rc = get_array_value(EPM_utility_array_ID, "LocalMausSet."ThisFile, NewMSName)
  63.    if RC then
  64.       if rc=-330 then
  65.          -- no mouseset bound to file yet, assume blank.
  66.          LMousePrefix = TransparentMouseHandler"."
  67.       else
  68.          call messagenwait('RC='RC)
  69.       endif
  70.       RC = OldRC
  71.    else
  72.       LMousePrefix = NewMSName"."
  73.    endif
  74. compile endif
  75.  
  76. compile if WANT_EBOOKIE
  77.  compile if WANT_EBOOKIE = 'DYNALINK'
  78.    if bkm_avail <> '' then
  79.  compile endif
  80.       call bkm_defselect()
  81.  compile if WANT_EBOOKIE = 'DYNALINK'
  82.    endif
  83.  compile endif
  84. compile endif  -- WANT_EBOOKIE
  85.  
  86.    -- sayerror 'DEFSELECT occurred for file '.filename'.'
  87.  
  88. compile else          -- This is for the old way of doing SELECT.
  89.  
  90.  compile if SHOW_MODIFY_METHOD
  91. defproc show_modify
  92.  compile endif
  93.  compile if SHOW_MODIFY_METHOD = 'COLOR'
  94.    if .modify then
  95.       .markcolor= MODIFIED_MARKCOLOR
  96.       .windowcolor= MODIFIED_WINDOWCOLOR
  97.    else
  98.       .markcolor= MARKCOLOR
  99.       .windowcolor= WINDOWCOLOR
  100.    endif
  101.  compile endif
  102.  
  103.  compile if SHOW_MODIFY_METHOD = 'FKTEXTCOLOR'
  104.    if .modify then
  105.       .functionkeytextcolor= MODIFIED_FKTEXTCOLOR
  106.    else
  107.       .functionkeytextcolor= FUNCTIONKEYTEXTCOLOR
  108.    endif
  109.  compile endif
  110.  
  111.  compile if SHOW_MODIFY_METHOD = 'TITLE'
  112.    if .modify then
  113.       .filenamecolor= MODIFIED_FILENAMECOLOR
  114.       .monofilenamecolor= MODIFIED_MONOFILENAMECOLOR
  115.    else
  116.       .filenamecolor= FILENAMECOLOR
  117.       .monofilenamecolor= MONOFILENAMECOLOR
  118.    endif
  119.  compile endif
  120.  
  121. defproc select_edit_keys    /* Selection keys for particular file extension */
  122.  compile if ALTERNATE_KEYSETS
  123.    universal expand_on
  124.    universal messy
  125.  
  126.    ext=filetype()
  127.  compile endif
  128.  
  129.    keys edit_keys          /* default keyset */
  130.  
  131.  compile if SHOW_MODIFY_METHOD
  132.    call show_modify()
  133.  compile endif
  134.  
  135. compile endif
  136.