Hi Nicolai,I investigated the new RTNest and your example and it seems that it does pretty much all I was looking for, so thank you both!> (looks a bit ugly, and I don't know why I have to make some boxes translucent to make the text show up).The reason is quite simple, the elements are placed to the view in the order in which they were added. So the colored boxes are added on top of the label.You can also see this when you move them, they kind of go through each other. Maybe it would be more natural to move all elements to top when they are being dragged?One possible solution would be to add them to a collection and then change the order on canvas... something like-------------------"your other code...."labels := RTGroup new.RTNest new for: classesElements add: [ :group :model | ........labels addAll: varShapes.labels add: methodShape.].labels do: [ :each | each trachelShape pushFront ]."the rest of your code"-------------------------However this feels hacky...Perhaps there could be TRAddCallback (as a counterpart to TRRemoveCallback), which would be called when the element was added to the view? It would also eliminate the need to have view already available in places like RTLabelled.PeterOn Tue, Oct 7, 2014 at 5:38 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:I started to write a chapter about Trachel:
https://dl.dropboxusercontent.com/u/31543901/AgileVisualization/Trachel/0103-Trachel.html
There is not much for now… But it is growing. By the way, if someone could help, it would be fantastic :-)
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Oct 3, 2014, at 5:03 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
> 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?
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev