I have a tree of data that I would like to present to the user in a top-down manner, the way you see parse trees presented. Conceptually, the data have a lot in common with what an NSOutlineView
would present: hierarchical structure, tree nodes can be be expanded and reordered, etc. I'm trying to figure out how I might be able to manipulate or subclass NSOutlineView
(or NSTableColumn
?) in order to get the visual layout of tree nodes that I want, but I'm having a hard time getting started. Does anyone have any tips on a good way to go about this task? Should I just subclass NSControl
and start from there?
Edit: I guess what it comes down to is that I'm trying to influence the way an outline is drawn, so that instead of the standard presentation, you get something that looks like this. My main problem is that I'm not sure how I should take over control of when and where the data cell draws its contents. Originally I had thought that NSTableColumn
was responsible for drawing itself, but it appears I was wrong about that. So is all the layout of cells done by NSOutlineView
's drawRect:
method?