home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / kl.zip / KLMouse.Doc < prev    next >
Text File  |  1997-03-17  |  3KB  |  78 lines

  1.   ┌──────────────────────────────────────────────────────────────────────────┐
  2.   │                                                                          │
  3.   │   Introduction to KLMouse.kex for KL macro.                  Ver 1.0     │
  4.   │                                                                          │
  5.   │   Author: Shintaroh Hori           Date: 95/12/25                        │
  6.   └──────────────────────────────────────────────────────────────────────────┘
  7.  
  8. o Function
  9.   --------
  10.  
  11.   If you are editing multiple files, you can move through the KEDIT ring by
  12.   clicking on an ID line of a file by a Mouse button-1 or button-2.
  13.  
  14.   Since the ID line is turned off in a KL list, you cannot use Mouse buttons
  15.   to go through the ring. You cannot enjoy the power of Mouse function of KEDIT
  16.   when a KL list is on the ring.
  17.  
  18.   The macro KLMouse solves this problem. That is, clicking on a File Specifier
  19.   Line of a KL list by either Mouse button-1 or button-2, you can go through
  20.   the ring backward or forward, respectively.
  21.  
  22.   KLMouse has other two functions:
  23.  
  24.     a) Clicking on a Field Description Line by Mouse button-1 or button-2 causes
  25.        a KL list sorted by a field where Mouse pointer is placed. Sort order
  26.        is Descending for button-1, or Ascending for button-2.
  27.  
  28.     b) You can execute a KL command string against a file on a KL list by
  29.        double-clicking a Mouse button.
  30.        (Typical use of this function would be to pass 'X' to edit a file.)
  31.  
  32.   Note that KLMouse macro *DOES NOTHING* when it is invoked in a normal file
  33.   session. It only returns 0 as a return code. The macro does the functions
  34.   mentioned above only in a KL list session, and returns 1 as a return code.
  35.  
  36.  
  37. o Installation:
  38.   ------------
  39.  
  40.   Mouse events in KEDIT are handled in KEDIT's built-in macros(See KEDIT User
  41.   Guide.), KLMouse macro should be invoked from the built-in macros. So you
  42.   need to modify your KML file.
  43.  
  44.   To install KLMouse macro, do as follows;
  45.  
  46.    1) If your KML file does not have code for the built-in macros "BUTTON1DOWN"
  47.       and "BUTTON2DOWN", get the code for them by executing "macros button1"
  48.       and "macros button2", from KEDIT command line, respectively, and define
  49.       the code in your KML file.
  50.  
  51.    2) Insert following statement just after ":button1down:" and ":button2down"
  52.       labels in the KML file;
  53.  
  54.           'macro KLMouse'
  55.  
  56.    3) To use the function (b) mentioned above, include the built-in macro
  57.       "BUTTON1DBLCLK" code in your KML file, and then insert following
  58.       statement just after ":button1dblclk" label.
  59.  
  60.           'macro KLMouse klcmd'
  61.  
  62.       where klcmd is a KL command string that you want to assign to a
  63.       Mouse button-1.  (In my KML file, klcmd is X to open a file or to list
  64.       a directory.)
  65.  
  66.       You can also define another KL command for double-clicking of Mouse
  67.       button-2 the same way.
  68.  
  69.  
  70.  Note: If you want to run KLMouse macro only in KL list session, but not run
  71.        the original Mouse built-in macros in in KL list session, check the
  72.        return code(RC) from KLMouse macro and issue 'EXIT' if RC is not 0.
  73.        (For example, the first statement of :button1dblclk label is
  74.  
  75.             'macro KLMouse X'; if rc\=0 then Exit
  76.  
  77.        in my KML file.)
  78.