home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / e / epmmac2.zip / SELECT.E < prev    next >
Text File  |  1992-08-03  |  4KB  |  122 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
  38.    universal shell_index
  39.    if shell_index then
  40.       is_shell = leftstr(.filename, 15) = ".command_shell_"
  41.       SetMenuAttribute( 103, 16384, is_shell)
  42. ;     SetMenuAttribute( 104, 16384, is_shell)
  43.    endif
  44. compile endif
  45. compile if LOCAL_MOUSE_SUPPORT
  46.    getfileid ThisFile
  47.    OldRC = Rc
  48.    rc = get_array_value(EPM_utility_array_ID, "LocalMausSet."ThisFile, NewMSName)
  49.    if RC then
  50.       if rc=-330 then
  51.          -- no mouseset bound to file yet, assume blank.
  52.          LMousePrefix = TransparentMouseHandler"."
  53.       else
  54.          call messagenwait('RC='RC)
  55.       endif
  56.       RC = OldRC
  57.    else
  58.       LMousePrefix = NewMSName"."
  59.    endif
  60. compile endif
  61.  
  62. compile if WANT_EBOOKIE
  63.  compile if WANT_EBOOKIE = 'DYNALINK'
  64.    if bkm_avail <> '' then
  65.  compile endif
  66.       call bkm_defselect()
  67.  compile if WANT_EBOOKIE = 'DYNALINK'
  68.    endif
  69.  compile endif
  70. compile endif  -- WANT_EBOOKIE
  71.  
  72.    -- sayerror 'DEFSELECT occurred for file '.filename'.'
  73.  
  74. compile else          -- This is for the old way of doing SELECT.
  75.  
  76.  compile if SHOW_MODIFY_METHOD
  77. defproc show_modify
  78.  compile endif
  79.  compile if SHOW_MODIFY_METHOD = 'COLOR'
  80.    if .modify then
  81.       .markcolor= MODIFIED_MARKCOLOR
  82.       .windowcolor= MODIFIED_WINDOWCOLOR
  83.    else
  84.       .markcolor= MARKCOLOR
  85.       .windowcolor= WINDOWCOLOR
  86.    endif
  87.  compile endif
  88.  
  89.  compile if SHOW_MODIFY_METHOD = 'FKTEXTCOLOR'
  90.    if .modify then
  91.       .functionkeytextcolor= MODIFIED_FKTEXTCOLOR
  92.    else
  93.       .functionkeytextcolor= FUNCTIONKEYTEXTCOLOR
  94.    endif
  95.  compile endif
  96.  
  97.  compile if SHOW_MODIFY_METHOD = 'TITLE'
  98.    if .modify then
  99.       .filenamecolor= MODIFIED_FILENAMECOLOR
  100.       .monofilenamecolor= MODIFIED_MONOFILENAMECOLOR
  101.    else
  102.       .filenamecolor= FILENAMECOLOR
  103.       .monofilenamecolor= MONOFILENAMECOLOR
  104.    endif
  105.  compile endif
  106.  
  107. defproc select_edit_keys    /* Selection keys for particular file extension */
  108.  compile if ALTERNATE_KEYSETS
  109.    universal expand_on
  110.    universal messy
  111.  
  112.    ext=filetype()
  113.  compile endif
  114.  
  115.    keys edit_keys          /* default keyset */
  116.  
  117.  compile if SHOW_MODIFY_METHOD
  118.    call show_modify()
  119.  compile endif
  120.  
  121. compile endif
  122.