use a (sophisticated) chain of responsibility to handle visualization

The VisualizationChain knows three different kinds of NodeVisualization:
- for visualization of the RootBox
- for visualization of the document structure
- for visualization of inline content

For each kind of visualization, there is a prioritized list of possible
NodeVisualizations, that are requested in order of highest priority to
visualize a given node. The first NodeVisualization which returns an
actual box wins.

This architecture allows to have:
- individual visualizations for each document type
- easy extension with custom NodeVisualization implementations
- simple and decoupled building blocks for visualization

Signed-off-by: Florian Thienel <>
1 file changed