home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
kl.zip
/
KLMouse.Doc
< prev
next >
Wrap
Text File
|
1997-03-17
|
3KB
|
78 lines
┌──────────────────────────────────────────────────────────────────────────┐
│ │
│ Introduction to KLMouse.kex for KL macro. Ver 1.0 │
│ │
│ Author: Shintaroh Hori Date: 95/12/25 │
└──────────────────────────────────────────────────────────────────────────┘
o Function
--------
If you are editing multiple files, you can move through the KEDIT ring by
clicking on an ID line of a file by a Mouse button-1 or button-2.
Since the ID line is turned off in a KL list, you cannot use Mouse buttons
to go through the ring. You cannot enjoy the power of Mouse function of KEDIT
when a KL list is on the ring.
The macro KLMouse solves this problem. That is, clicking on a File Specifier
Line of a KL list by either Mouse button-1 or button-2, you can go through
the ring backward or forward, respectively.
KLMouse has other two functions:
a) Clicking on a Field Description Line by Mouse button-1 or button-2 causes
a KL list sorted by a field where Mouse pointer is placed. Sort order
is Descending for button-1, or Ascending for button-2.
b) You can execute a KL command string against a file on a KL list by
double-clicking a Mouse button.
(Typical use of this function would be to pass 'X' to edit a file.)
Note that KLMouse macro *DOES NOTHING* when it is invoked in a normal file
session. It only returns 0 as a return code. The macro does the functions
mentioned above only in a KL list session, and returns 1 as a return code.
o Installation:
------------
Mouse events in KEDIT are handled in KEDIT's built-in macros(See KEDIT User
Guide.), KLMouse macro should be invoked from the built-in macros. So you
need to modify your KML file.
To install KLMouse macro, do as follows;
1) If your KML file does not have code for the built-in macros "BUTTON1DOWN"
and "BUTTON2DOWN", get the code for them by executing "macros button1"
and "macros button2", from KEDIT command line, respectively, and define
the code in your KML file.
2) Insert following statement just after ":button1down:" and ":button2down"
labels in the KML file;
'macro KLMouse'
3) To use the function (b) mentioned above, include the built-in macro
"BUTTON1DBLCLK" code in your KML file, and then insert following
statement just after ":button1dblclk" label.
'macro KLMouse klcmd'
where klcmd is a KL command string that you want to assign to a
Mouse button-1. (In my KML file, klcmd is X to open a file or to list
a directory.)
You can also define another KL command for double-clicking of Mouse
button-2 the same way.
Note: If you want to run KLMouse macro only in KL list session, but not run
the original Mouse built-in macros in in KL list session, check the
return code(RC) from KLMouse macro and issue 'EXIT' if RC is not 0.
(For example, the first statement of :button1dblclk label is
'macro KLMouse X'; if rc\=0 then Exit
in my KML file.)