Hi!
I’ve just introduced a new class TRExtensibleLabelShape and TRLabelShape. This will ease the problem we are experiencing with using labels in a composed shape. I would like now to discuss about how to compose shapes. This has been a big discussion for at least 5 years. I propose a solution in this email, I hope this will make most of us happy :-) Consider the example: -=-=-=-=-=-=-=-= | v s1 s2 c es | v := RTView new. s1 := (RTEllipse new size: #yourself; color: (Color blue alpha: 0.4)). s2 := (RTLabel new text: 'Hello World'; height: 10). c := RTCompositeShape new shape1: s1; shape2: s2; offset2: 0 @ -30. es := c elementsOn: #(30 60 80). es @ RTDraggable. v addAll: es. es when: TRMouseClick do: [ :evt | evt element remove. v signalUpdate ]. RTHorizontalLineLayout on: v elements. v open -=-=-=-=-=-=-=-= This is the output: If you click on an element, then the element with its label is properly removed. Yupi! Leo will be happy with that :-) The reason is that how can I specify to have s2 above s1? What should I put in offset2 ? Instead of fiddling with blocks like [:shape1 :shape2 :element | … ] I have introduced RTHorizontalCompositeShape and RTVerticalCompositeShape just to try whether it make sense or not. We can have -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | v s1 s2 c es | v := RTView new. s1 := (RTEllipse new size: #yourself; color: (Color blue alpha: 0.4)). s2 := (RTLabel new text: 'Hello World'; height: 10). c := RTHorizontalCompositeShape new shape1: s1; shape2: s2. es := c elementsOn: #(30 60 80). es @ RTDraggable. v addAll: es. RTHorizontalLineLayout on: v elements. v -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Replacing Horizontal by Vertical works as expected. You can also compose these things. Look at that: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | v s1 s2 c es | v := RTView new. s1 := (RTEllipse new size: #yourself; color: (Color blue alpha: 0.4)). s2 := (RTLabel new text: 'Hello World'; height: 10). c2 := RTVerticalCompositeShape new shape1: s1; shape2: s2. c := RTHorizontalCompositeShape new shape1: s1; shape2: c2. es := c elementsOn: #(30 60 80). es @ RTDraggable. v addAll: es. RTHorizontalLineLayout on: v elements. v -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Are we happy with RTVerticalCompositeShape, RTHorizontalCompositeShape and RTCompositeShape ? If yes, then RTLabelling (and its problem of passing the view along :-) will be obsolete. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
As I use a lot of CompositeShape in my project I will give you a lot of feedbacks ;-) I like the composition of composite shape itself. I needed it now it will so much easier. But is it possible the put a RTCompositeShape as fixed ? Let me give you an example to show you
I'm working on a Menu in my vizualisation so i want them fix. But a menu is a label and its "background' so a composite shape. Can I set it as fixed ?
On Thu, Apr 24, 2014 at 3:39 PM, Alexandre Bergel <[hidden email]> wrote:
Leo Perard
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
I just committed the possibility for element to be fixed or not.
For example: testAdding | e1 e2 | e1 := RTBox element. e2 := RTBox element. e1 setAsFixed. view add: e1. view add: e2. self assert: view canvas numberOfFixedShapes = 1. self assert: view canvas numberOfShapes = 1. Let me know whether this works as you expect. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On Apr 24, 2014, at 11:49 AM, Leo Perard <[hidden email]> wrote: > As I use a lot of CompositeShape in my project I will give you a lot of feedbacks ;-) > I like the composition of composite shape itself. I needed it now it will so much easier. > > But is it possible the put a RTCompositeShape as fixed ? Let me give you an example to show you > I'm working on a Menu in my vizualisation so i want them fix. But a menu is a label and its "background' so a composite shape. Can I set it as fixed ? > > > On Thu, Apr 24, 2014 at 3:39 PM, Alexandre Bergel <[hidden email]> wrote: > Hi! > > I’ve just introduced a new class TRExtensibleLabelShape and TRLabelShape. This will ease the problem we are experiencing with using labels in a composed shape. > > I would like now to discuss about how to compose shapes. This has been a big discussion for at least 5 years. I propose a solution in this email, I hope this will make most of us happy :-) > > > Consider the example: > > -=-=-=-=-=-=-=-= > | v s1 s2 c es | > v := RTView new. > > s1 := (RTEllipse new size: #yourself; color: (Color blue alpha: 0.4)). > s2 := (RTLabel new text: 'Hello World'; height: 10). > > c := RTCompositeShape new > shape1: s1; > shape2: s2; > offset2: 0 @ -30. > > es := c elementsOn: #(30 60 80). > es @ RTDraggable. > v addAll: es. > > es when: TRMouseClick do: [ :evt | evt element remove. v signalUpdate ]. > > RTHorizontalLineLayout on: v elements. > v open > -=-=-=-=-=-=-=-= > > This is the output: > <Screen Shot 2014-04-24 at 10.15.58 AM.png> > > If you click on an element, then the element with its label is properly removed. Yupi! Leo will be happy with that :-) > The reason is that how can I specify to have s2 above s1? What should I put in offset2 ? Instead of fiddling with blocks like [:shape1 :shape2 :element | … ] I have introduced RTHorizontalCompositeShape and RTVerticalCompositeShape just to try whether it make sense or not. > > We can have > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > | v s1 s2 c es | > v := RTView new. > > s1 := (RTEllipse new size: #yourself; color: (Color blue alpha: 0.4)). > s2 := (RTLabel new text: 'Hello World'; height: 10). > > c := RTHorizontalCompositeShape new > shape1: s1; > shape2: s2. > > es := c elementsOn: #(30 60 80). > es @ RTDraggable. > v addAll: es. > > RTHorizontalLineLayout on: v elements. > v > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > <Screen Shot 2014-04-24 at 10.29.45 AM.png> > > Replacing Horizontal by Vertical works as expected. > > You can also compose these things. Look at that: > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > | v s1 s2 c es | > v := RTView new. > > s1 := (RTEllipse new size: #yourself; color: (Color blue alpha: 0.4)). > s2 := (RTLabel new text: 'Hello World'; height: 10). > > c2 := RTVerticalCompositeShape new > shape1: s1; > shape2: s2. > c := RTHorizontalCompositeShape new > shape1: s1; > shape2: c2. > > es := c elementsOn: #(30 60 80). > es @ RTDraggable. > v addAll: es. > > RTHorizontalLineLayout on: v elements. > v > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > <Screen Shot 2014-04-24 at 10.31.00 AM.png> > > Are we happy with RTVerticalCompositeShape, RTHorizontalCompositeShape and RTCompositeShape ? > > If yes, then RTLabelling (and its problem of passing the view along :-) will be obsolete. > > Cheers, > Alexandre > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > > > -- > Leo Perard > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Leo Perard
Hop few points and questions. If I don't want one that one of the scales its size on the element size on can I do that ? And I think there is some bug in the layout of composite shape composed with others composite shape.
On the screenshot I would like : - the red ellipse do not scale and keep the size I initialized
- the layout don't do creepy things ^^ On Thu, Apr 24, 2014 at 4:49 PM, Leo Perard <[hidden email]> wrote:
Leo Perard
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by abergel
On Thu, Apr 24, 2014 at 5:12 PM, Alexandre Bergel <[hidden email]> wrote:
I just committed the possibility for element to be fixed or not. No I get this error : The canvas of the composite shape is nil
-- Leo Perard _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
There is a bug when I update an element which has a RTCompositeShape with one of its shape as a RTCompositeShape too On Thu, Apr 24, 2014 at 5:29 PM, Leo Perard <[hidden email]> wrote:
Leo Perard
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
How can I reproduce this bug? What do you do exactly?
Alexandre On Apr 24, 2014, at 1:07 PM, Leo Perard <[hidden email]> wrote: > There is a bug when I update an element which has a RTCompositeShape with one of its shape as a RTCompositeShape too > > <update-composite-shape.png> > > > > On Thu, Apr 24, 2014 at 5:29 PM, Leo Perard <[hidden email]> wrote: > On Thu, Apr 24, 2014 at 5:12 PM, Alexandre Bergel <[hidden email]> wrote: > I just committed the possibility for element to be fixed or not. > > For example: > > testAdding > > | e1 e2 | > e1 := RTBox element. > e2 := RTBox element. > > e1 setAsFixed. > view add: e1. > view add: e2. > > self assert: view canvas numberOfFixedShapes = 1. > self assert: view canvas numberOfShapes = 1. > > Let me know whether this works as you expect. > > No I get this error : > <error-setAsFixed.png> > > The canvas of the composite shape is nil > > -- > Leo Perard > > > > -- > Leo Perard > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Leo Perard
> If I don't want one that one of the scales its size on the element size on can I do that ?
What do you want exactly? That the red dot has always the same size? Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On Thu, Apr 24, 2014 at 10:01 PM, Alexandre Bergel <[hidden email]> wrote:
Exactly
Leo Perard
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by abergel
On Thu, Apr 24, 2014 at 10:00 PM, Alexandre Bergel <[hidden email]> wrote: -- How can I reproduce this bug? What do you do exactly? With this example you can reproduce it easily : view := RTView new. box := RTBox new color: Color green. label := RTLabel new. el := (RTCompositeShape new shape1: box; shape2: label).
el := (RTHorizontalCompositeShape new shape1: el; shape2: (RTEllipse new color: Color red)) elementOn: 'Hello World'. view add: el. view addMenu: 'Color' callback: [ el shape shape2 color: Color blue. el update. view signalUpdate ].
view open And even if I don't have a composite shape composed with another composite shape, the update is not good. Leo Perard
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi!
I’ve worked a bit on the composition. So far, we have three ways to compose shapes: 1 - RTCompositeShape. This is the composition that is used with + -=-=-=-=-=-=-=-=-=-= | v s1 s2 e | v := RTView new. s1 := RTBox new size: #yourself; color: Color blue. s2 := RTEllipse new size: [ :value | value / 2 ]; color: Color red. e := (RTCompositeShape with: s1 with: s2) elementOn: 50. v add: e. v -=-=-=-=-=-=-=-=-=-= 2 - RTHorizontalCompositeShape Here is the effect of replacing RTCompositeShape by RTHorizontalCompositeShape in the previous example 3 - RTVerticalCompositeShape All the shapes composed with RTCompositeShape have the same size. This is useful for example if you do: (RTBox new + RTLabel) elementOn: ‘Hello World’. You typically want the label and the box have the same size. When you want to line up shapes, I guess you do not care of having all the shapes of the same size. This new behavior for horizontal and vertical should address what you need Leo. The nice thing, in my opinion, is that we should be able to have any kind of strategy, for example, a grid of shapes. This is really a matter of small programming. Let me know if this is what you expect. Just update Roassal for this. Cheers, Alexandre On Apr 25, 2014, at 5:55 AM, Leo Perard <[hidden email]> wrote: On Thu, Apr 24, 2014 at 10:00 PM, Alexandre Bergel <[hidden email]> wrote: -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Alex, This starts to look good. The next thing is to specify where nested children go :). For example, I would want to be able to specify that the nested children should be in the blue rectangle. For this, we would probably need something in the direction of a ChildrenShape :). Also, the other challenge is to not let the RTNest make the decision of where to place the children.
What do you say? Doru On Sun, Apr 27, 2014 at 9:37 PM, Alexandre Bergel <[hidden email]> wrote:
"Every thing has its own flow"
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Question : Why need a special shape to composite shapes together and not do it like Morphic where each morph acts also as a container for other Morphs ? I also like the fact that a morph can have not only children but also a parent.
On Sun, Apr 27, 2014 at 10:59 PM, Tudor Girba <[hidden email]> wrote:
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Tudor Girba-2
Great excatly the kind of thing I expected. I'm agree with Tudor, the nested element on a CompositeElement are really not great now. I maked some tests last weeks but no one was working.
On Sun, Apr 27, 2014 at 9:59 PM, Tudor Girba <[hidden email]> wrote:
Leo Perard
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Leo, can you provide an example of what was not working? Alexandre
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Sure. view := RTView new. container := (RTHorizontalCompositeShape new shape1: RTBox new; shape2: RTLabel new)
elementOn: 'Container'. els := (RTBox new size: 9; color: Color red) elementsOn: (1 to: 16). container @ RTDraggable.
RTNest new layout: RTGridLayout; on: container nest: els. view add: container; addAll: els. view open I tried to "cheat" with the order of the calls. I nested the els just with the box and then I created a composite shape with + but no success.
view := RTView new. container := RTBox new elementOn: 'Container'. els := (RTBox new size: 9; color: Color red) elementsOn: (1 to: 16). RTNest new layout: RTGridLayout; on: container nest: els.
container + RTLabel. container @ RTDraggable. view add: container; addAll: els. view open On Mon, Apr 28, 2014 at 12:09 PM, Alexandre Bergel <[hidden email]> wrote:
Leo Perard
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by abergel
Alexandre Bergel wrote:
Hi!At first glance that seems a little restrictive. I immediately think of trying to make a bulleye target as a composite of concentric circles of different sizes. Though I can't think of any other examples off hand. cheers -ben
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
I found 2 bugs when I tried to change color of one of the shape in the RTCompositeShape view := RTView new. el := (RTCompositeShape new
shape1: RTBox new; shape2: RTLabel new) elementOn: 'Element'.
view add: el. view canvas addMenu: 'Color' callback: [ el shape shape1 color: Color red. el update. view canvas signalUpdate ]. view open
The color of the box is changed but it does not have the good size anymore. The second one is with one of the shape is a RTCompositeShape itself view := RTView new.
el := (RTHorizontalCompositeShape new shape1: (RTCompositeShape new shape1: RTBox new; shape2: RTLabel new); shape2: (RTEllipse new size: 10; color: Color blue))
elementOn: 'Element'. view add: el. view canvas addMenu: 'Color' callback: [ el shape shape2 color: Color red. el update. view canvas signalUpdate ].
view open Raise an error : RTCompositeShape>>#updateFor:trachelShape: is missing -- Cheers, Leo PerardUniversity of Lille 1 _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Tudor Girba-2
I was expecting this question :-)
Two problems I see: - layout are made to work with elements, not shape. A shape does not have a position - RTNest is made to work with elements I will think about it. Alexandre On Apr 27, 2014, at 4:59 PM, Tudor Girba <[hidden email]> wrote: > Hi Alex, > > This starts to look good. > > The next thing is to specify where nested children go :). For example, I would want to be able to specify that the nested children should be in the blue rectangle. For this, we would probably need something in the direction of a ChildrenShape :). Also, the other challenge is to not let the RTNest make the decision of where to place the children. > > What do you say? > > Doru > > > On Sun, Apr 27, 2014 at 9:37 PM, Alexandre Bergel <[hidden email]> wrote: > Hi! > > I’ve worked a bit on the composition. > So far, we have three ways to compose shapes: > > 1 - RTCompositeShape. This is the composition that is used with + > > -=-=-=-=-=-=-=-=-=-= > | v s1 s2 e | > v := RTView new. > s1 := RTBox new size: #yourself; color: Color blue. > s2 := RTEllipse new size: [ :value | value / 2 ]; color: Color red. > e := (RTCompositeShape with: s1 with: s2) elementOn: 50. > v add: e. > v > -=-=-=-=-=-=-=-=-=-= > <Screen Shot 2014-04-27 at 4.30.40 PM.png> > > 2 - RTHorizontalCompositeShape > Here is the effect of replacing RTCompositeShape by RTHorizontalCompositeShape in the previous example > <Screen Shot 2014-04-27 at 4.33.32 PM.png> > > 3 - RTVerticalCompositeShape > <Screen Shot 2014-04-27 at 4.33.52 PM.png> > > All the shapes composed with RTCompositeShape have the same size. This is useful for example if you do: (RTBox new + RTLabel) elementOn: ‘Hello World’. You typically want the label and the box have the same size. When you want to line up shapes, I guess you do not care of having all the shapes of the same size. > > This new behavior for horizontal and vertical should address what you need Leo. > > The nice thing, in my opinion, is that we should be able to have any kind of strategy, for example, a grid of shapes. This is really a matter of small programming. > > Let me know if this is what you expect. Just update Roassal for this. > > Cheers, > Alexandre > > > > On Apr 25, 2014, at 5:55 AM, Leo Perard <[hidden email]> wrote: > >> On Thu, Apr 24, 2014 at 10:00 PM, Alexandre Bergel <[hidden email]> wrote: >> How can I reproduce this bug? What do you do exactly? >> With this example you can reproduce it easily : >> >> view := RTView new. >> box := RTBox new color: Color green. >> label := RTLabel new. >> el := (RTCompositeShape new shape1: box; shape2: label). >> el := (RTHorizontalCompositeShape new shape1: el; shape2: (RTEllipse new color: Color red)) elementOn: 'Hello World'. >> view add: el. >> >> view addMenu: 'Color' callback: [ el shape shape2 color: Color blue. el update. view signalUpdate ]. >> >> view open >> >> And even if I don't have a composite shape composed with another composite shape, the update is not good. >> -- >> Leo Perard >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > > > -- > www.tudorgirba.com > > "Every thing has its own flow" > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by kilon.alios
Hi Kilon,
> Question : Why need a special shape to composite shapes together and not do it like Morphic where each morph acts also as a container for other Morphs ? I also like the fact that a morph can have not only children but also a parent. Over the year, I got convinced that having an element a container is a bad idea. Having containment is a complex thing. Horribly complex. If you have containment, you will then face the following situations: - dragging inner elements. What happens when an inner element reaches the border of the container? Should it extend the container? Push it? Or simply be stopped? - What do you do with event? Should you propagate events to the parent if the children has no callback? - If you want to structure your object differently, let’s say using a quad tree, what do you do with the nesting relationship? - What do you do with edges that crosses depth (e.g., going from a top level element to an inner element)? How do you order edges? Using a z-order I guess… again more complexity Answering all these questions (as I did with Roassal1), inevitably brings complexity to the whole system. Roassal2 does not have containment, and the root of the element and shape hierarchy is quite small, which was not the case for Roassal1 and Mondrian. I have been thinking a lot (really a lot) about this. Cheers, Alexandre > > > On Sun, Apr 27, 2014 at 10:59 PM, Tudor Girba <[hidden email]> wrote: > Hi Alex, > > This starts to look good. > > The next thing is to specify where nested children go :). For example, I would want to be able to specify that the nested children should be in the blue rectangle. For this, we would probably need something in the direction of a ChildrenShape :). Also, the other challenge is to not let the RTNest make the decision of where to place the children. > > What do you say? > > Doru > > > On Sun, Apr 27, 2014 at 9:37 PM, Alexandre Bergel <[hidden email]> wrote: > Hi! > > I’ve worked a bit on the composition. > So far, we have three ways to compose shapes: > > 1 - RTCompositeShape. This is the composition that is used with + > > -=-=-=-=-=-=-=-=-=-= > | v s1 s2 e | > v := RTView new. > s1 := RTBox new size: #yourself; color: Color blue. > s2 := RTEllipse new size: [ :value | value / 2 ]; color: Color red. > e := (RTCompositeShape with: s1 with: s2) elementOn: 50. > v add: e. > v > -=-=-=-=-=-=-=-=-=-= > <Screen Shot 2014-04-27 at 4.30.40 PM.png> > > 2 - RTHorizontalCompositeShape > Here is the effect of replacing RTCompositeShape by RTHorizontalCompositeShape in the previous example > <Screen Shot 2014-04-27 at 4.33.32 PM.png> > > 3 - RTVerticalCompositeShape > <Screen Shot 2014-04-27 at 4.33.52 PM.png> > > All the shapes composed with RTCompositeShape have the same size. This is useful for example if you do: (RTBox new + RTLabel) elementOn: ‘Hello World’. You typically want the label and the box have the same size. When you want to line up shapes, I guess you do not care of having all the shapes of the same size. > > This new behavior for horizontal and vertical should address what you need Leo. > > The nice thing, in my opinion, is that we should be able to have any kind of strategy, for example, a grid of shapes. This is really a matter of small programming. > > Let me know if this is what you expect. Just update Roassal for this. > > Cheers, > Alexandre > > > > On Apr 25, 2014, at 5:55 AM, Leo Perard <[hidden email]> wrote: > >> On Thu, Apr 24, 2014 at 10:00 PM, Alexandre Bergel <[hidden email]> wrote: >> How can I reproduce this bug? What do you do exactly? >> With this example you can reproduce it easily : >> >> view := RTView new. >> box := RTBox new color: Color green. >> label := RTLabel new. >> el := (RTCompositeShape new shape1: box; shape2: label). >> el := (RTHorizontalCompositeShape new shape1: el; shape2: (RTEllipse new color: Color red)) elementOn: 'Hello World'. >> view add: el. >> >> view addMenu: 'Color' callback: [ el shape shape2 color: Color blue. el update. view signalUpdate ]. >> >> view open >> >> And even if I don't have a composite shape composed with another composite shape, the update is not good. >> -- >> Leo Perard >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > > > -- > www.tudorgirba.com > > "Every thing has its own flow" > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |