ED is an object-oriented editor toolkit using a subset of
BRIEF's key sequences; you can drive it from your programs or
simply use it as a text editor. You can easily remap any key sequence to
any function, or even implement new features.
Basically, ED provides four levels of
editor that you access through four creators (meta-functions):
(make-editor [window] ['EXIT-FREELY]) ![]() (make-enhanced-editor ...) ![]() (make-color-editor ...) ![]() (make-scheme-editor ...) ![]() |
Typical use:
(define ed (make-[...-]editor)); create a full-screen editor (ed 'REMAP-KEY 27 '@GOTO-LINE); remap ESC to ''go to line'' (ed [filename]); open the editor |
If you want a multi-window editor, you can define two or more editors in different window ports; scrapbook and keystroke assignements will be shared by all. |
This part has been written by Marc Vuilleumier. |
Microsoft(TM) specified a standard interface to drive the mouse from within applications. Practically all mouse vendors adhered to this interface, so it made sense to access the mouse though it from within PCSCHEME. Unfortunately, the standard was designed for interfacing to assembly language and thus contains some peculiarities, like event handlers, that have carefully to be dealt with. |
The solution proposed is a slight extension of PCSCHEME's core—the virtual machine. An op-code has been added to support the int 33h calls, as well as an assembly-language event handler that dispatches requests to a Scheme closure. The solution is not perfect in the sense event handling cannot be honored in the middle of a basic instruction (for instance, during a call to readline). The slowdown due to Scheme handling of even the most simple events (like recording a move), and the context switching required, may render event handling unpractical on slow processors; the system has nevertheless successfully been used on a fast 80486 PC. |
This part has been written by Larry Bartholdi. |