[plt-scheme] Re: scrolling inside an editor-snip?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Oct 7 06:41:05 EDT 2007

At Fri, 05 Oct 2007 22:54:36 -0000, harsha wrote:
> I want to write a set-view method, but am not sure if this is possible
> just using the mred interface and forming subclasses or if it requires
> a small change in the source.
> What commands should i be using to get the refresh method to start
> drawing a subregion from the begining of the snip?

You need to create a new variant of editor-snip% and its associated
editor-admin%, instead of a new variant of text%. One of the
editor-admin%'s jobs is to tell the enclosing editor% about coordinate

For example, the innermost text% will consult its administrator for
coordinate changes not only during drawing, but also during event
handling. So, just trying to change the drawing offset at the last
minute (in text%) won't work well enough, because a corresponding
change is needed for mouse-event handling.

Also, you can change the handling of scroll requests from the inner
text% directly in the editor-admin%. That is, you probably don't need a
new text% class at all, since the text% class already sends appropriate
scroll requests to its administrator.


Posted on the users mailing list.