Hi,

I am wondering what is the proper level at which should be addressed composition of elements.

Imagine I want to create a diagram of UML class but I want to be able to dynamically add and remove new lines and sections, including various formatting (underline, italics, bold, ...) of each line separately. The RTUMLClassBuilder (or any other builder for that matter) is not an option since it's a one time build.

The option I see is to subclass RTShape (let's name it MyRTUmlClass) and implement method trachelShapeFor: .
Now the issue is, that I cannot use other RTShape (Roassal) elements, because they would have to be inserted into RTView which may not be available at the time - is there a way around it?

So the other option is to use TRShape (Trachel) elements instead which would be fine except I feel like I am duplicating code of roassal elements (so for TRLabelShape I would copy RTLabel trachelShapeFor: and bend it for my needs), and the second issue is that in updateFor:trachelShape: I would need to access internal structure of the element and change it (because for example a new method was added) - does that break encapsulation?

And finally, from conceptual standpoint what should be the content of RTView elements? Because if I have diagram full of UML classes I probably don't care about the content of them when doing layouting - so I would prefer to have only MyRTUmlClass elements there and not every single label inside it (as is the case of RTUmlClassBuilder), because otherwise having access to RTView elements is useless and I must keep reference to correct objects myself.

Thanks!

Peter

p.s.: Is it currently possible to format text? I saw only color, font and size... what about underline/italics/bold?