libera/#clim - IRC Chatlog
Search
12:10:19
mrcom
IIUC, to have a graph node that is usable as a presentation type I need to define a new class and presentation type that inherits from GRAPH-NODE-OUTPUT-RECORD, PRESENTATION, and DISPLAYED-OUTPUT-RECORD.
12:11:22
mrcom
Which means I also need to duplicate method GENERATE-GRAPH-NODES, since that's hard-coded to create STANDARD-GRAPH-NODE-OUTPUT-RECORD nodes.
12:13:48
jackdaniel
perhaps when you present the node, you could wrap it in (with-output-as-presentation ...) ?
12:14:17
jackdaniel
that presentation will be moved along with the node itself, since the graph-node-output-record will be its parent
12:15:17
mrcom
Oh. Duh. I was just wondering why the nodes were OUTPUT-RECORD and not DISPLAYED-OUTPUT-RECORD.
12:21:03
mrcom
I guess I don't need to worry about GRAPH-NODE-RECORD being SEQUENTIAL-OUTPUT-RECORD rather than TREE-. I've got about 1k root nodes, so the top-level node will be fighting O(n) a little, but all the other nodes are 3 or 4 children.
12:23:56
jackdaniel
if you have [graph-node [presentation-node . content]] then the graph-node has only as single element
12:39:50
mrcom
Bad news is that each new node does a (SETF OUTPUT-RECORD-POSITION), which as we discovered is recalculating TREE-EXTENT each time.