All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

NextPrevUpTopContentsIndex

stacked-tree-default-color-function

Function
Summary

Returns a color like the default algorithm of stacked-tree.

Package

capi

Signature

stacked-tree-default-color-function stacked-tree item => color

Arguments

stacked-tree

A stacked-tree.

item

Any object.

Values

color

A color specification.

Description

The function stacked-tree-default-color-function returns a color for item using the same algorithm that stacked-tree uses if you do not specify color-function or colors .

stacked-tree-default-color-function is useful when you want to associate some items with a fixed color. Your code will be something like:

(defun my-stacked-tree-color-function (pane node)
  (let ((key (my-get-a-key-from-node node))
        (hash-table (my-find-caching-table)))
    (or (gethash key hash-table)
        (setf (gethash key hash-table)
              (stacked-tree-default-color-function
               pane node)))))
Note

The Profiler tool in the LispWorks IDE uses stacked-tree-default-color-function to make all occurences of the same function in the tree have the same color even though the items are not eq.

Currently stacked-tree-default-color-function actually ignores stacked-tree and item and returns a random color.

See also

stacked-tree


CAPI User Guide and Reference Manual (Macintosh version) - 3 Aug 2017

NextPrevUpTopContentsIndex