CLIM mail archive


Re: Is there a way to manually "tweak" inferior presentations

Perhaps you need code similar to this:

  (defun replace-graph-node (graph-node stream continuation &optional left top)
    (unless (and left top) 
      ;; If the caller has not passed in the coordinates then compute them
      (multiple-value-setq (left top) 
	(convert-from-relative-to-absolute-coordinates stream graph-node)))
    (erase-output-record (car (clim::output-record-elements graph-node)) stream)
    (let ((record (with-output-to-output-record (stream)
		    (funcall continuation stream))))
      (output-record-set-position* record 0 0)
      (add-output-record-element graph-node record)
      (replay-1 record  stream +everywhere+ left top)))

In the example graph-node has a single child.  This is removed from the
output history by erase-output-record Then with-output-to-output-record is
used to create a new output record that is then added to the history The
output record is then replayed to make it visible.

In this code, CONTINUATION is some function that draws to the stream




Main Index | Thread Index