CLIM mail archive

[Prev][Next][Index][Thread]

Moving objects and incremental redisplay



    Date: Wed, 29 Sep 1993 14:01 EDT
    From: bha@ata.ca.boeing.com (Brian Anderson 234-0878)

    >     What is happening is that when I move an object, all the objects that
    >     were drawn "after" the moved object are displaced an amount equivalent
    >     to the displacement of the moved object.  That is, if I move an object
    >     to the right, all objects that were drawn "after" the moved object are
    >     also displaced to the right an equivalent amount.  Also, if I move an
    >     object "over" another object, then move it off that object, the hidden
    >     object's appearance is trashed.
    > 
    > Try supplying :FIXED-POSITION T in your calls to UPDATING-OUTPUT to see
    > what happens.

    This makes things work *much* better.  Now, everything appears in the
    correct position after an object is moved.

Now that I know it works for you, I'll see if I can explain what is
going on.  As you know, when CLIM does textual output, it maintains a
text cursor position.  When you do output that follows textual output
inside of incremental redisplay, CLIM guesses that that output should
be positioned *relative* to the text output.  For example, consider
drawing some graphics after some lines of text; if you change the
text, the graphics will move because the ending text cursor of the new
text is different.

In some cases, the programmer does not intend for output to be placed
in a position relative to previous output.  In this case, supplying
:FIXED-POSITION T will inform CLIM of that fact.

We could have made the default be :FIXED-POSITION T, but I guess we
decided that the current behavior is slightly more common.

I think that this is the most "magic" part of incremental redisplay.
We don't really mention it anywhere because it's hard to explain, and
it just seems intuitively right (to me, anyway) for it to happen.

    But, I still have problems with overlapping output.  I tried the
    clim:r-tree-output-history but this doesn't solve the problem.
    Actually, the behavior does not seem to be noticably different between
    the default output history and clim:r-tree-output-history.

OK, my guess is that you are indeed moving the wrong record.  You should
probably be keeping track the UPDATING-OUTPUT record that each of your
nodes live inside of, and move that record instead.  Right now, you are
clearly keeping track of the node output record; just keep track of the
UPDATING-OUTPUT record that is just "outside" of it.

By the way, I haven't forgotten about your long reply.  I'll respond to
it when I can.

Follow-Ups: References:

Main Index | Thread Index