Lisp HUG Maillist Archive

Spacing in CAPI graph panes

Is there a way to control the spacing between nodes in a
CAPI:GRAPH-PANE?

I have a graph pane whose nodes are bitmaps, and I have labels
displayed close to the nodes showing the name of each node.
I want to increase the horizontal spacing between the nodes
so that the labels aren't on top of each other.

In case it helps to be more specific, is there a simple change
I can make to the following example from the CAPI reference
manual to make it use more horizontal space?


(defun node-children (node)
  (when (< node 16)
    (list (* node 2)
          (1+ (* node 2)))))

(capi:contain
 (make-instance 'capi:graph-pane
                :roots '(1)
                :children-function 'node-children)
 :best-width 300
 :best-height 400)


Simon


Re: Spacing in CAPI graph panes

Simon Katz wrote:
> Is there a way to control the spacing between nodes in a
> CAPI:GRAPH-PANE?
> 
> I have a graph pane whose nodes are bitmaps, and I have labels
> displayed close to the nodes showing the name of each node.
> I want to increase the horizontal spacing between the nodes
> so that the labels aren't on top of each other.

Could you define your own node-pinboard-class which will contain your 
bitmap placed wherever you want in it?  The example 
circled-graph-nodes.lisp might be useful.

Mitch


Updated at: 2020-12-10 08:44 UTC