>
LispWorks IDE User Guide>
6 Manipulating Graphs 6.7 Using graphs in your programsYou can read about the CAPI class graph-pane
in the CAPI User Guide and Reference Manual for detailed API information for using graphs in your own programs. We will also look at a short example in this section. The following code listing defines a callback function and creates a graph-pane object:
(defun node-children (node)
(if (equal node 'pets)
(list 'dog 'parrot)
(if (equal node 'dog)
(list 'Kito 'Otis 'Sammy 'Teddy)
(if (equal node 'parrot)
(list 'Brady)))))
(setq test-graph
(capi:contain
(make-instance 'capi:graph-pane
:roots '(pets)
:children-function
'node-children)
:best-width 300
:best-height 400))
The children function node-children
should return nil
for a leaf node in the graph or a list of child nodes for a non-leaf node. Sample Graph from a User Program shows the generated graph-pane.
Figure 6.12 Sample Graph from a User Program
LispWorks IDE User Guide (Unix version) - 13 Sep 2017
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4