The roots of the graph.
A graph pane calculates the items of the graph by calling the
on each of its
, and then calling it again on each of the children recursively until no more children are found. The
gets called with an item of the graph and should return a list of the children of that item.
Lay the graph out from the left to the right.
Lay the graph out from the top down.
Lay the graph out from the right to the left.
Lay the graph out from the bottom up.
act on the underlying layout to decide where to place the nodes. The values should be a keyword or a list of the form
is an integer. These values of
are interpreted as by pane-adjusted-position.
:top is the default for
:left is the default for
When a graph pane wants to display nodes and edges, it creates instances of
which default to item-pinboard-object and line-pinboard-object respectively. These classes must be subclasses of simple-pane or pinboard-object, and there are some examples of the use of these keywords below.
is called to create an element for each node, and by default it creates an instance of
. It gets passed the graph pane and the item corresponding to the node, and should return an instance of a subclass of simple-pane or pinboard-object. Note that the name of the initarg is a little misleading, as in most cases you should return a pinboard-object rather than a pane. If you use your own class which has its own geometry requirements, you should define a calculate-constraints method for it, which should use with-geometry on the object to set
%width% to the desired width, and
%min-height% to the desired height. See the example in:
edge-pane-function is called to create an element for an edge. The default creates an object of the class specified by edge-pinboard-class . If edge-pane-function is supplied, it must be a function that takes three arguments: the pane and the two items that are connected by the edge, and must return an element (a simple-pane or a pinboard-object).
The highlighting of the children is controlled as described for pinboard-layout, but for
graph-pane the default value of
The output-pane initarg
:drawing-mode controls quality of drawing in a
graph-pane, including anti-aliasing of any text displayed on Microsoft Windows and GTK+.
Choices - panes with items
Creating Panes with Your Own Drawing and Input
CAPI User Guide and Reference Manual (Unix version) - 3 Aug 2017