CLIM mail archive
[Prev][Next][Index][Thread]
format-graph-from-root and Updating-output
has anyone gotten updating-output to work with format-graph-from-root?
what I want to do is have a tree showing, and have a node/leaf go
black when I select it, but not redraw the whole tree. I can't seem to
get this to work properly. I am (i blieve) using :unique-id :id-test
and :cache-value properly...
here's the code:
(clim:updating-output (stream
:unique-id (name myself)
:id-test #'string-equal
:cache-value (highlighted myself))
(clim:with-output-as-presentation (:object myself :stream stream :single-box t)
(multiple-value-bind (xpos ypos)
(clim:stream-cursor-position* stream)
(setq wid (ceiling (/ (clim:stream-string-width stream (string (name myself)))
2)))
(clim:draw-rectangle* stream (- xpos wid) ypos (+ xpos wid) (+ ypos 25)
:filled (slot-value myself 'highlighted)
:ink clim:+foreground+
)
(clim:draw-text* stream (string (name myself)) xpos (+ ypos 10)
:align-x :center :align-y :center
:ink (if (slot-value myself 'highlighted)
clim:+flipping-ink+
clim:+foreground+))
)
)
)
each node is an object that has a name which is a string. whether it
should be black or not is based on the value of the slot
'highlighted'.
any thoughts?
Allegro 4.1
Clim 1.1
Motif 1.1
Sparc 2
-- clint
0,,
Main Index |
Thread Index