Use the function and/or data in compound-drawing-objects.
compute-drawing-object-from-data does something only when it is applied to a compound-drawing-object, otherwise it just returns
nil. When the object is a compound-drawing-object,
compute-drawing-object-from-data checks if the object has either
non-nil. For the object to have a non-nil
, this must have been supplied when it was created (for example when creating geometry-drawing-object). The
can be passed in creation or set later by
If the object has a non-nil
compute-drawing-object-from-data calls it with
as a single argument, and uses the result. Otherwise, if the object has a non-nil
compute-drawing-object-from-data calls the generic function
as a single argument, and uses the result. If this result is
compute-drawing-object-from-data just returns
get-drawing-object has a default method that returns
Otherwise, the result must be a "drawing-object-spec", which means either an instance of (a subclass of) drawing-object or a list of "drawing-object-specs".
compute-drawing-object-from-data then sets the
of the object to the result, and returns
recurse-compute-drawing-object should be an objects-displayer, a pinboard-objects-displayer, a list, or a compound-drawing-object. For other objects
recurse-compute-drawing-object just returns
recurse-compute-drawing-object recurses the hierarchy under
, and for each compound-drawing-object that it finds calls
get-drawing-objectand passing the appropriate data . Then the tree can be told to recompute itself by calling
recurse-compute-drawing-objectis applied to objects-displayer or pinboard-objects-displayer. You will have to do it yourself by using force-objects-redraw on the root of the hierarchy or hierarchies which need redrawing.
recurse-compute-drawing-objectdoes not check against duplication, so if the same object appears in the hierarchy more than once, it will be updated repeatedly.
CAPI User Guide and Reference Manual (Macintosh version) - 25 Feb 2015