Edit a line of text


        term% = EDLINE%(#chan%, maxl%, text$)

        term% = terminal character: 10, 27, 208 (Up), 216 (Down)

        chan% = a (mandatory for now) channel number

        maxl% = the max allowable string length

        text$ = the string to edit (if any) AND the return string!
                This MUST be a string variable, not an expression, etc

You can use most of the usual editing keystrokes available to the OS you
are using. In SMSQ/E this includes ALT Left/Right, SHIFT Left/Right, etc.
Also F10 to copy the string into the Stuffer Buffer. Under Minerva some of
these keystrokes are available; on Qdos its pretty grim, Im afraid.

Pressing ESC returns 27; the original string remains unchanged. (Not Qdos.)

NEW in this version (0.04): You can position the edit line in pixel

        CURSOR 4, 11: term% = EDLINE%(#channel; max%, string$)

Program Status

The orginal version of this toolkit was part of the QL WORLD DIY TOOLKIT,
written by Simon N Goodwin. There were issues with it when using Minerva
and later, SMSQ/E, so a rewrite was prepared by Laurence W Reeves.

V0.04, pjw, 2022 Apr 02, Pixel positioning. ESC stack bug fixed.

V0.03, pjw, 2022 Mar 01, Many changes:

       Source code:
            SMSQ/E mnemonics, SMSQ/E includes, Qmac-compatible
            Split init into separate file for Pick'n'mix toolkit

            Returns terminating key code; string returned in parameter
            (ie probably not Turbo-compatible)

            Homogenize, optimize and tidy code (this was a hack!)
            Optional channel number
            Cursor at end OR start of string (selectable)

               Conditions and DISCLAIMER as per Knoware.no