Nesting and composed shape

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Nesting and composed shape

abergel
"Nesting and composed shape”. Not really a new topic isn’t it?

I have worked on a way to indicate where in a composed shape inner elements can be inserted. 

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v |
v := RTView new.
v @ RTDraggableView.

shape := RTMultiCompositeShape new.
shape add: RTLabel new.
shape add: (RTBox new size: 20; color: (Color blue alpha: 0.3)).

es := shape elementsOn: RTShape withAllSubclasses.
v addAll: es.

es do: [ :e | 
methodElements := RTBox new elementsOn: e model methods.
RTGridLayout on: methodElements.
RTNest new
on: e 
inShape: #second 
nest: methodElements
layout: #vertical.
v addAll: methodElements.
].

RTFlowLayout on: es.
es @ RTDraggable.
v open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

The call of RTNest, indicated in bold, is the new thing. 
The #vertical says we what to have the two shapes added to RTMultiCompositeShape have to use a vertical layout. 

Here is the result:

Any comment?

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev