[racket] Text% and editor-canvas% typewriter scrolling

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Oct 31 08:41:09 EDT 2011

I'm sure you could implement this with your own canvas and
`editor-admin%' classes.

It may be possible to implement this with the existing `editor-canvas%'
class, but probably not. If `scroll-to' in `editor-canvas%' could
really be overridden, for example, that might get close; the layer at
which you can override `scroll-to', however, is not the layer where the
canvas's editor admin calls `scroll-to' (i.e., there's a layer of
indirection in the implementation).

If you'd like to try changing the `editor-canvas%' implementation, the
code is in "collects/mred/private/wxme". You may also need to change
something in the `editor-canvas%' wrapper layer, which is

At Sun, 30 Oct 2011 20:44:38 +0000, Erich Rast wrote:
> Is it possible to (halfway easily) implement "typewriter" scrolling on
> the basis of an editor-canvas% and text%. I've discovered
> scroll-with-bottom-base which already goes in the right direction. Now
> here is what I'm looking for:
> - Editing always takes place on the same line, the edit line, whose
> location is user-definable e.g. as the 20th line from the topmost
> visible line or x pixels from the top or bottom of the editor canvas.
> - Scrolling up: the cursor stays on the edit line and the text around it
> scrolls down a line. (So part of the text might show up below the edit
> line.)
> - Scrolling down: the cursor stays on the edit line and the text around
> it moves up a line (if there is more text below the edit line.)
> - Editing: like scroll-with-bottom-base but on the user-defined edit
> line (usually somewhere in the middle of third half of the canvas, but
> must be definable somehow)
> Is this possible? Any ideas how? Are there some internal classes I could
> modify?
> Best,
> Erich
> _________________________________________________
>   For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/users

Posted on the users mailing list.