User

There are applications in visualization and user interface development.

Ideal:

Compute X-Y coordinates for different points on the box model.

Allow for naming the different points of the box model.

Support different layout methods: absolute positioning, positioning by traits (padding, border, margin, contents), positioning by tensions, horizontal or vertical or grid or absolute positioning of interior contents, and so on.

Is there anything easily reusable in Python that presently does this sort of work?

(Perhaps WxPython can be (ab)used for this purpose..? Can you do all the size calculations, without ever rendering anything, or initializing wx?)

Example

Here's some Python code that can track horizontal layouts.

That is, as long as you nest cells horizontally, everything works out and gets calculated.