Thanks. I'm chuckling quietly to myself how easy that was (when you know how).Upon further consideration of doing this at the Element level, not sure if this is a bug or just my understanding. One of the things I liked about using shapes to offset labels is that ROLightlyHighlightable highlighted both the element and the label when I hovered over either. Referring to example below, if I add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either. However if I add ROLightlyHighlightable to 'outer' - the blue square displays only around the outside of the 'outer' element, and no change to the 'inner' and 'innerLabel'. -------------------------------- | view outter inner innerLabel | view := ROView new. outter := ROElement new + ROBorder white. outter @ RODraggable @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outter add: inner; add: innerLabel. inner forward. innerLabel forward. "We layout the things" ROVerticalLineLayout on: outter elements. view add: outter. view openYou said: "add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either" => This is normal since inner and innerLabel forward all the events. If you want to have have the highlight on the children element while preserving the drag and dropping of the compound, then you have the following script: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view outter inner innerLabel | view := ROView new. outter := ROElement new + ROBorder white. outter @ RODraggable @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outter add: inner; add: innerLabel. inner forward: ROMouseDragging. innerLabel forward: ROMouseDragging. inner @ ROLightlyHighlightable. innerLabel @ ROLightlyHighlightable. "We layout the things" ROVerticalLineLayout on: outter elements. view add: outter. view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Cheers, Alexandre The next thing then is a slight addition to your script as below. My need is that the label move with the border of the 'inner' node. The initial layout looks fine. Effectively this is one node that has two bounds - an inner one for its children and an outer one that encompasses its labels (and perhaps other shapes). However currently the child nodes can be dragged on top of the label. If you can get this working then I think the below script would make a good ROExample. ------------- | view outer inner innerLabel | view := ROView new. outer := ROElement sprite. outer @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outer add: inner; add: innerLabel. 1 to: 5 do: [ :n | inner add: ROElement sprite ]. inner forward: ROMouseDragging. innerLabel forward: ROMouseDragging. inner @ ROLightlyHighlightable. innerLabel @ ROLightlyHighlightable. "We layout the things" ROGridLayout on: inner elements. ROVerticalLineLayout on: outer elements. view add: outer. view open. ----------------- _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Ben Coman wrote:
Alexandre Bergel wrote: >> Upon further consideration of doing this at the Element level, not sure if this is a bug or just my understanding. One of the things I liked about using shapes to offset labels is that ROLightlyHighlightable highlighted both the element and the label when I hovered over either. Referring to example below, if I add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either. However if I add ROLightlyHighlightable to 'outer' - the blue square displays only around the outside of the 'outer' element, and no change to the 'inner' and 'innerLabel'. >> -------------------------------- >> | view outter inner innerLabel | >> view := ROView new. >> >> outter := ROElement new + ROBorder white. >> outter @ RODraggable @ ROLightlyHighlightable . >> >> inner := ROElement sprite . >> innerLabel := ROElement labelOn: 'My sprite'. >> outter add: inner; add: innerLabel. >> >> inner forward. >> innerLabel forward. >> >> "We layout the things" >> ROVerticalLineLayout on: outter elements. >> >> view add: outter. >> view open >> > > You said: "add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either" > => This is normal since inner and innerLabel forward all the events. If you want to have have the highlight on the children element while preserving the drag and dropping of the compound, then you have the following script: > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > | view outter inner innerLabel | > view := ROView new. > > outter := ROElement new + ROBorder white. > outter @ RODraggable @ ROLightlyHighlightable . > > inner := ROElement sprite . > innerLabel := ROElement labelOn: 'My sprite'. > outter add: inner; add: innerLabel. > > inner forward: ROMouseDragging. > innerLabel forward: ROMouseDragging. > > inner @ ROLightlyHighlightable. > innerLabel @ ROLightlyHighlightable. > > "We layout the things" > ROVerticalLineLayout on: outter elements. > > view add: outter. > view open > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > Cheers, > Alexandre > Thanks. I'm chuckling quietly to myself how easy that was (when you know how). The next thing then is a slight addition to your script as below. My need is that the label move with the border of the 'inner' node. The initial layout looks fine. Effectively this is one node that has two bounds - an inner one for its children and an outer one that encompasses its labels (and perhaps other shapes). However currently the child nodes can be dragged on top of the label. If you can get this working then I think the below script would make a good ROExample. ------------- | view outer inner innerLabel | view := ROView new. outer := ROElement sprite. outer @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outer add: inner; add: innerLabel. 1 to: 5 do: [ :n | inner add: ROElement sprite ]. inner forward: ROMouseDragging. innerLabel forward: ROMouseDragging. inner @ ROLightlyHighlightable. innerLabel @ ROLightlyHighlightable. "We layout the things" ROGridLayout on: inner elements. ROVerticalLineLayout on: outer elements. view add: outer. view open. ----------------- I've just bumped into one potential downside of labelling elements using composition at the element. Essentially I am doing a lot of the following for each object in the model ... --- model := someObject. outer := ROElement spriteOn: model. innerChildren := ROElement spriteOn: model. innerLabel := ROElement labelOn: model. outer add: innerLabel; add: innerChildren. --- and then wanting to add edges between elements. To do this I will need to search the View for the two elements matching model objects that need to be connected. Using code taken from the Roassal Easel <Find> button as an example... --- stack firstView elementsDo: [ :el | el isNotEdge ifTrue: [ allModels add: el -> el model printString ] ]. --- I am not clear of the effect on searching the graph that having the three elements inner, innerLabel and outer with the same model will have. cheers -ben _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Ben Coman
Your example is quite interesting.
We would need to have some kind of constraints that says the label to always be below... Let me think about this... Alexandre On Sep 28, 2012, at 10:42 PM, Ben Coman <[hidden email]> wrote: > Alexandre Bergel wrote: >> >>> Upon further consideration of doing this at the Element level, not sure if this is a bug or just my understanding. One of the things I liked about using shapes to offset labels is that ROLightlyHighlightable highlighted both the element and the label when I hovered over either. Referring to example below, if I add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either. However if I add ROLightlyHighlightable to 'outer' - the blue square displays only around the outside of the 'outer' element, and no change to the 'inner' and 'innerLabel'. >>> -------------------------------- >>> | view outter inner innerLabel | >>> view := ROView new. >>> >>> outter := ROElement new + ROBorder white. >>> outter @ RODraggable @ ROLightlyHighlightable . >>> >>> inner := ROElement sprite . >>> innerLabel := ROElement labelOn: 'My sprite'. >>> outter add: inner; add: innerLabel. >>> >>> inner forward. >>> innerLabel forward. >>> >>> "We layout the things" >>> ROVerticalLineLayout on: outter elements. >>> >>> view add: outter. >>> view open >>> >> >> You said: "add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either" >> => This is normal since inner and innerLabel forward all the events. If you want to have have the highlight on the children element while preserving the drag and dropping of the compound, then you have the following script: >> >> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >> | view outter inner innerLabel | >> view := ROView new. >> >> outter := ROElement new + ROBorder white. >> outter @ RODraggable @ ROLightlyHighlightable . >> >> inner := ROElement sprite . >> innerLabel := ROElement labelOn: 'My sprite'. >> outter add: inner; add: innerLabel. >> >> inner forward: ROMouseDragging. >> innerLabel forward: ROMouseDragging. >> >> inner @ ROLightlyHighlightable. >> innerLabel @ ROLightlyHighlightable. >> >> "We layout the things" >> ROVerticalLineLayout on: outter elements. >> >> view add: outter. >> view open >> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >> >> Cheers, >> Alexandre >> > Thanks. I'm chuckling quietly to myself how easy that was (when you know how). > > The next thing then is a slight addition to your script as below. My need is that the label move with the border of the 'inner' node. The initial layout looks fine. Effectively this is one node that has two bounds - an inner one for its children and an outer one that encompasses its labels (and perhaps other shapes). > However currently the child nodes can be dragged on top of the label. If you can get this working then I think the below script would make a good ROExample. > > ------------- > | view outer inner innerLabel | > view := ROView new. > > outer := ROElement sprite. > outer @ ROLightlyHighlightable . > > inner := ROElement sprite . > innerLabel := ROElement labelOn: 'My sprite'. > outer add: inner; add: innerLabel. > 1 to: 5 do: [ :n | inner add: ROElement sprite ]. > > inner forward: ROMouseDragging. > innerLabel forward: ROMouseDragging. > > inner @ ROLightlyHighlightable. > innerLabel @ ROLightlyHighlightable. > > "We layout the things" > ROGridLayout on: inner elements. > ROVerticalLineLayout on: outer elements. > > view add: outer. > view open. > ----------------- > > _______________________________________________ > 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 Ben Coman
The class ROConstraint has been added. It contains some class methods that you may find interesting.
Your script can become: -=-=-=-=-=-=-= | view outer inner innerLabel | view := ROView new. outer := ROElement sprite. outer @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outer add: inner; add: innerLabel. 1 to: 5 do: [ :n | inner add: ROElement sprite ]. inner forward: ROMouseDragging. innerLabel forward: ROMouseDragging. inner @ ROLightlyHighlightable. innerLabel @ ROLightlyHighlightable. "We layout the things" ROGridLayout on: inner elements. ROVerticalLineLayout on: outer elements. ROConstraint stick: innerLabel below: inner. "<<<=== the new line" view add: outer. view open. -=-=-=-=-=-=-= Does this solve your problem? I have the impression that having constraints may open new way to compose objects... Cheers, Alexandre On Sep 28, 2012, at 10:42 PM, Ben Coman <[hidden email]> wrote: > Alexandre Bergel wrote: >> >>> Upon further consideration of doing this at the Element level, not sure if this is a bug or just my understanding. One of the things I liked about using shapes to offset labels is that ROLightlyHighlightable highlighted both the element and the label when I hovered over either. Referring to example below, if I add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either. However if I add ROLightlyHighlightable to 'outer' - the blue square displays only around the outside of the 'outer' element, and no change to the 'inner' and 'innerLabel'. >>> -------------------------------- >>> | view outter inner innerLabel | >>> view := ROView new. >>> >>> outter := ROElement new + ROBorder white. >>> outter @ RODraggable @ ROLightlyHighlightable . >>> >>> inner := ROElement sprite . >>> innerLabel := ROElement labelOn: 'My sprite'. >>> outter add: inner; add: innerLabel. >>> >>> inner forward. >>> innerLabel forward. >>> >>> "We layout the things" >>> ROVerticalLineLayout on: outter elements. >>> >>> view add: outter. >>> view open >>> >> >> You said: "add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either" >> => This is normal since inner and innerLabel forward all the events. If you want to have have the highlight on the children element while preserving the drag and dropping of the compound, then you have the following script: >> >> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >> | view outter inner innerLabel | >> view := ROView new. >> >> outter := ROElement new + ROBorder white. >> outter @ RODraggable @ ROLightlyHighlightable . >> >> inner := ROElement sprite . >> innerLabel := ROElement labelOn: 'My sprite'. >> outter add: inner; add: innerLabel. >> >> inner forward: ROMouseDragging. >> innerLabel forward: ROMouseDragging. >> >> inner @ ROLightlyHighlightable. >> innerLabel @ ROLightlyHighlightable. >> >> "We layout the things" >> ROVerticalLineLayout on: outter elements. >> >> view add: outter. >> view open >> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >> >> Cheers, >> Alexandre >> > Thanks. I'm chuckling quietly to myself how easy that was (when you know how). > > The next thing then is a slight addition to your script as below. My need is that the label move with the border of the 'inner' node. The initial layout looks fine. Effectively this is one node that has two bounds - an inner one for its children and an outer one that encompasses its labels (and perhaps other shapes). > However currently the child nodes can be dragged on top of the label. If you can get this working then I think the below script would make a good ROExample. > > ------------- > | view outer inner innerLabel | > view := ROView new. > > outer := ROElement sprite. > outer @ ROLightlyHighlightable . > > inner := ROElement sprite . > innerLabel := ROElement labelOn: 'My sprite'. > outer add: inner; add: innerLabel. > 1 to: 5 do: [ :n | inner add: ROElement sprite ]. > > inner forward: ROMouseDragging. > innerLabel forward: ROMouseDragging. > > inner @ ROLightlyHighlightable. > innerLabel @ ROLightlyHighlightable. > > "We layout the things" > ROGridLayout on: inner elements. > ROVerticalLineLayout on: outer elements. > > view add: outer. > view open. > ----------------- > > _______________________________________________ > 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 |
Thanks Alexandre. I will have a look at it shortly. Based on the
feedback from the Roassal Survey on the pharo-project mail-list, I've
spent the past few days attacking the idea of using Roassal for
interactive graph design rather than just scripting to report on
existing data. I am surprised by how far I got and will throw a
proof-of-concept package for discussion at you in the next couple of
days.
cheers -ben Alexandre Bergel wrote: The class ROConstraint has been added. It contains some class methods that you may find interesting. Your script can become: -=-=-=-=-=-=-= | view outer inner innerLabel | view := ROView new. outer := ROElement sprite. outer @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outer add: inner; add: innerLabel. 1 to: 5 do: [ :n | inner add: ROElement sprite ]. inner forward: ROMouseDragging. innerLabel forward: ROMouseDragging. inner @ ROLightlyHighlightable. innerLabel @ ROLightlyHighlightable. "We layout the things" ROGridLayout on: inner elements. ROVerticalLineLayout on: outer elements. ROConstraint stick: innerLabel below: inner. "<<<=== the new line" view add: outer. view open. -=-=-=-=-=-=-= Does this solve your problem? I have the impression that having constraints may open new way to compose objects... Cheers, Alexandre On Sep 28, 2012, at 10:42 PM, Ben Coman [hidden email] wrote:Alexandre Bergel wrote:Upon further consideration of doing this at the Element level, not sure if this is a bug or just my understanding. One of the things I liked about using shapes to offset labels is that ROLightlyHighlightable highlighted both the element and the label when I hovered over either. Referring to example below, if I add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either. However if I add ROLightlyHighlightable to 'outer' - the blue square displays only around the outside of the 'outer' element, and no change to the 'inner' and 'innerLabel'. -------------------------------- | view outter inner innerLabel | view := ROView new. outter := ROElement new + ROBorder white. outter @ RODraggable @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outter add: inner; add: innerLabel. inner forward. innerLabel forward. "We layout the things" ROVerticalLineLayout on: outter elements. view add: outter. view openYou said: "add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either" => This is normal since inner and innerLabel forward all the events. If you want to have have the highlight on the children element while preserving the drag and dropping of the compound, then you have the following script: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view outter inner innerLabel | view := ROView new. outter := ROElement new + ROBorder white. outter @ RODraggable @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outter add: inner; add: innerLabel. inner forward: ROMouseDragging. innerLabel forward: ROMouseDragging. inner @ ROLightlyHighlightable. innerLabel @ ROLightlyHighlightable. "We layout the things" ROVerticalLineLayout on: outter elements. view add: outter. view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Cheers, AlexandreThanks. I'm chuckling quietly to myself how easy that was (when you know how). The next thing then is a slight addition to your script as below. My need is that the label move with the border of the 'inner' node. The initial layout looks fine. Effectively this is one node that has two bounds - an inner one for its children and an outer one that encompasses its labels (and perhaps other shapes). However currently the child nodes can be dragged on top of the label. If you can get this working then I think the below script would make a good ROExample. ------------- | view outer inner innerLabel | view := ROView new. outer := ROElement sprite. outer @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outer add: inner; add: innerLabel. 1 to: 5 do: [ :n | inner add: ROElement sprite ]. inner forward: ROMouseDragging. innerLabel forward: ROMouseDragging. inner @ ROLightlyHighlightable. innerLabel @ ROLightlyHighlightable. "We layout the things" ROGridLayout on: inner elements. ROVerticalLineLayout on: outer elements. view add: outer. view open. ----------------- _______________________________________________ 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 |
Cool!
Sounds exciting! Cheers, Alexandre On Oct 1, 2012, at 2:40 PM, Ben Coman <[hidden email]> wrote: > Thanks Alexandre. I will have a look at it shortly. Based on the feedback from the Roassal Survey on the pharo-project mail-list, I've spent the past few days attacking the idea of using Roassal for interactive graph design rather than just scripting to report on existing data. I am surprised by how far I got and will throw a proof-of-concept package for discussion at you in the next couple of days. > > cheers -ben > > > Alexandre Bergel wrote: >> The class ROConstraint has been added. It contains some class methods that you may find interesting. >> >> Your script can become: >> -=-=-=-=-=-=-= >> | view outer inner innerLabel | >> view := ROView new. >> >> outer := ROElement sprite. >> outer @ ROLightlyHighlightable . >> >> inner := ROElement sprite . >> innerLabel := ROElement labelOn: 'My sprite'. >> outer add: inner; add: innerLabel. >> 1 to: 5 do: [ :n | inner add: ROElement sprite ]. >> >> inner forward: ROMouseDragging. >> innerLabel forward: ROMouseDragging. >> >> inner @ ROLightlyHighlightable. >> innerLabel @ ROLightlyHighlightable. >> >> "We layout the things" >> ROGridLayout on: inner elements. >> ROVerticalLineLayout on: outer elements. >> >> ROConstraint stick: innerLabel below: inner. "<<<=== the new line" >> >> view add: outer. >> view open. >> -=-=-=-=-=-=-= >> >> Does this solve your problem? I have the impression that having constraints may open new way to compose objects... >> >> Cheers, >> Alexandre >> >> >> On Sep 28, 2012, at 10:42 PM, Ben Coman >> <[hidden email]> >> wrote: >> >> >> >>> Alexandre Bergel wrote: >>> >>> >>>>> Upon further consideration of doing this at the Element level, not sure if this is a bug or just my understanding. One of the things I liked about using shapes to offset labels is that ROLightlyHighlightable highlighted both the element and the label when I hovered over either. Referring to example below, if I add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either. However if I add ROLightlyHighlightable to 'outer' - the blue square displays only around the outside of the 'outer' element, and no change to the 'inner' and 'innerLabel'. >>>>> -------------------------------- >>>>> | view outter inner innerLabel | >>>>> view := ROView new. >>>>> >>>>> outter := ROElement new + ROBorder white. >>>>> outter @ RODraggable @ ROLightlyHighlightable . >>>>> >>>>> inner := ROElement sprite . >>>>> innerLabel := ROElement labelOn: 'My sprite'. >>>>> outter add: inner; add: innerLabel. >>>>> >>>>> inner forward. >>>>> innerLabel forward. >>>>> >>>>> "We layout the things" >>>>> ROVerticalLineLayout on: outter elements. >>>>> >>>>> view add: outter. >>>>> view open >>>>> >>>>> >>>>> >>>> You said: "add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either" >>>> => This is normal since inner and innerLabel forward all the events. If you want to have have the highlight on the children element while preserving the drag and dropping of the compound, then you have the following script: >>>> >>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>>> | view outter inner innerLabel | >>>> view := ROView new. >>>> >>>> outter := ROElement new + ROBorder white. >>>> outter @ RODraggable @ ROLightlyHighlightable . >>>> >>>> inner := ROElement sprite . >>>> innerLabel := ROElement labelOn: 'My sprite'. >>>> outter add: inner; add: innerLabel. >>>> >>>> inner forward: ROMouseDragging. >>>> innerLabel forward: ROMouseDragging. >>>> >>>> inner @ ROLightlyHighlightable. >>>> innerLabel @ ROLightlyHighlightable. >>>> >>>> "We layout the things" >>>> ROVerticalLineLayout on: outter elements. >>>> >>>> view add: outter. >>>> view open >>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>>> >>>> Cheers, >>>> Alexandre >>>> >>>> >>>> >>> Thanks. I'm chuckling quietly to myself how easy that was (when you know how). >>> >>> The next thing then is a slight addition to your script as below. My need is that the label move with the border of the 'inner' node. The initial layout looks fine. Effectively this is one node that has two bounds - an inner one for its children and an outer one that encompasses its labels (and perhaps other shapes). >>> However currently the child nodes can be dragged on top of the label. If you can get this working then I think the below script would make a good ROExample. >>> >>> ------------- >>> | view outer inner innerLabel | >>> view := ROView new. >>> >>> outer := ROElement sprite. >>> outer @ ROLightlyHighlightable . >>> >>> inner := ROElement sprite . >>> innerLabel := ROElement labelOn: 'My sprite'. >>> outer add: inner; add: innerLabel. >>> 1 to: 5 do: [ :n | inner add: ROElement sprite ]. >>> >>> inner forward: ROMouseDragging. >>> innerLabel forward: ROMouseDragging. >>> >>> inner @ ROLightlyHighlightable. >>> innerLabel @ ROLightlyHighlightable. >>> >>> "We layout the things" >>> ROGridLayout on: inner elements. >>> ROVerticalLineLayout on: outer elements. >>> >>> view add: outer. >>> view open. >>> ----------------- >>> >>> _______________________________________________ >>> 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 |
In reply to this post by abergel
Sorry I've been offline a few days camping. Just tried that out. That works well. Just what I need right now. It also seems a good basis to try out some other possibilities generalizing it to the many different combinations of left/right/center alignment in vertical & horizontal direction - which I'll try out later on. btw, Have you had a chance trying to connect on MSN to [hidden email] ? It would be good to have a live chat to thrash out a couple of ideas I've got. cheers -ben Alexandre Bergel wrote: The class ROConstraint has been added. It contains some class methods that you may find interesting. Your script can become: -=-=-=-=-=-=-= | view outer inner innerLabel | view := ROView new. outer := ROElement sprite. outer @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outer add: inner; add: innerLabel. 1 to: 5 do: [ :n | inner add: ROElement sprite ]. inner forward: ROMouseDragging. innerLabel forward: ROMouseDragging. inner @ ROLightlyHighlightable. innerLabel @ ROLightlyHighlightable. "We layout the things" ROGridLayout on: inner elements. ROVerticalLineLayout on: outer elements. ROConstraint stick: innerLabel below: inner. "<<<=== the new line" view add: outer. view open. -=-=-=-=-=-=-= Does this solve your problem? I have the impression that having constraints may open new way to compose objects... Cheers, Alexandre On Sep 28, 2012, at 10:42 PM, Ben Coman [hidden email] wrote:Alexandre Bergel wrote:Upon further consideration of doing this at the Element level, not sure if this is a bug or just my understanding. One of the things I liked about using shapes to offset labels is that ROLightlyHighlightable highlighted both the element and the label when I hovered over either. Referring to example below, if I add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either. However if I add ROLightlyHighlightable to 'outer' - the blue square displays only around the outside of the 'outer' element, and no change to the 'inner' and 'innerLabel'. -------------------------------- | view outter inner innerLabel | view := ROView new. outter := ROElement new + ROBorder white. outter @ RODraggable @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outter add: inner; add: innerLabel. inner forward. innerLabel forward. "We layout the things" ROVerticalLineLayout on: outter elements. view add: outter. view openYou said: "add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either" => This is normal since inner and innerLabel forward all the events. If you want to have have the highlight on the children element while preserving the drag and dropping of the compound, then you have the following script: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view outter inner innerLabel | view := ROView new. outter := ROElement new + ROBorder white. outter @ RODraggable @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outter add: inner; add: innerLabel. inner forward: ROMouseDragging. innerLabel forward: ROMouseDragging. inner @ ROLightlyHighlightable. innerLabel @ ROLightlyHighlightable. "We layout the things" ROVerticalLineLayout on: outter elements. view add: outter. view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Cheers, AlexandreThanks. I'm chuckling quietly to myself how easy that was (when you know how). The next thing then is a slight addition to your script as below. My need is that the label move with the border of the 'inner' node. The initial layout looks fine. Effectively this is one node that has two bounds - an inner one for its children and an outer one that encompasses its labels (and perhaps other shapes). However currently the child nodes can be dragged on top of the label. If you can get this working then I think the below script would make a good ROExample. ------------- | view outer inner innerLabel | view := ROView new. outer := ROElement sprite. outer @ ROLightlyHighlightable . inner := ROElement sprite . innerLabel := ROElement labelOn: 'My sprite'. outer add: inner; add: innerLabel. 1 to: 5 do: [ :n | inner add: ROElement sprite ]. inner forward: ROMouseDragging. innerLabel forward: ROMouseDragging. inner @ ROLightlyHighlightable. innerLabel @ ROLightlyHighlightable. "We layout the things" ROGridLayout on: inner elements. ROVerticalLineLayout on: outer elements. view add: outer. view open. ----------------- _______________________________________________ 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 |
> Sorry I've been offline a few days camping. Just tried that out. That works well. Just what I need right now. It also seems a good basis to try out some other possibilities generalizing it to the many different combinations of left/right/center alignment in vertical & horizontal direction - which I'll try out later on.
Yes. We could imagine more constraints (e.g., below and centered). > btw, Have you had a chance trying to connect on MSN to [hidden email] ? It would be good to have a live chat to thrash out a couple of ideas I've got. Yes, I am often online. Strange. I've added you once more Alexandre > > Alexandre Bergel wrote: >> The class ROConstraint has been added. It contains some class methods that you may find interesting. >> >> Your script can become: >> -=-=-=-=-=-=-= >> | view outer inner innerLabel | >> view := ROView new. >> >> outer := ROElement sprite. >> outer @ ROLightlyHighlightable . >> >> inner := ROElement sprite . >> innerLabel := ROElement labelOn: 'My sprite'. >> outer add: inner; add: innerLabel. >> 1 to: 5 do: [ :n | inner add: ROElement sprite ]. >> >> inner forward: ROMouseDragging. >> innerLabel forward: ROMouseDragging. >> >> inner @ ROLightlyHighlightable. >> innerLabel @ ROLightlyHighlightable. >> >> "We layout the things" >> ROGridLayout on: inner elements. >> ROVerticalLineLayout on: outer elements. >> >> ROConstraint stick: innerLabel below: inner. "<<<=== the new line" >> >> view add: outer. >> view open. >> -=-=-=-=-=-=-= >> >> Does this solve your problem? I have the impression that having constraints may open new way to compose objects... >> >> Cheers, >> Alexandre >> >> >> On Sep 28, 2012, at 10:42 PM, Ben Coman >> <[hidden email]> >> wrote: >> >> >> >>> Alexandre Bergel wrote: >>> >>> >>>>> Upon further consideration of doing this at the Element level, not sure if this is a bug or just my understanding. One of the things I liked about using shapes to offset labels is that ROLightlyHighlightable highlighted both the element and the label when I hovered over either. Referring to example below, if I add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either. However if I add ROLightlyHighlightable to 'outer' - the blue square displays only around the outside of the 'outer' element, and no change to the 'inner' and 'innerLabel'. >>>>> -------------------------------- >>>>> | view outter inner innerLabel | >>>>> view := ROView new. >>>>> >>>>> outter := ROElement new + ROBorder white. >>>>> outter @ RODraggable @ ROLightlyHighlightable . >>>>> >>>>> inner := ROElement sprite . >>>>> innerLabel := ROElement labelOn: 'My sprite'. >>>>> outter add: inner; add: innerLabel. >>>>> >>>>> inner forward. >>>>> innerLabel forward. >>>>> >>>>> "We layout the things" >>>>> ROVerticalLineLayout on: outter elements. >>>>> >>>>> view add: outter. >>>>> view open >>>>> >>>>> >>>>> >>>> You said: "add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all happens when I hover over either" >>>> => This is normal since inner and innerLabel forward all the events. If you want to have have the highlight on the children element while preserving the drag and dropping of the compound, then you have the following script: >>>> >>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>>> | view outter inner innerLabel | >>>> view := ROView new. >>>> >>>> outter := ROElement new + ROBorder white. >>>> outter @ RODraggable @ ROLightlyHighlightable . >>>> >>>> inner := ROElement sprite . >>>> innerLabel := ROElement labelOn: 'My sprite'. >>>> outter add: inner; add: innerLabel. >>>> >>>> inner forward: ROMouseDragging. >>>> innerLabel forward: ROMouseDragging. >>>> >>>> inner @ ROLightlyHighlightable. >>>> innerLabel @ ROLightlyHighlightable. >>>> >>>> "We layout the things" >>>> ROVerticalLineLayout on: outter elements. >>>> >>>> view add: outter. >>>> view open >>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>>> >>>> Cheers, >>>> Alexandre >>>> >>>> >>>> >>> Thanks. I'm chuckling quietly to myself how easy that was (when you know how). >>> >>> The next thing then is a slight addition to your script as below. My need is that the label move with the border of the 'inner' node. The initial layout looks fine. Effectively this is one node that has two bounds - an inner one for its children and an outer one that encompasses its labels (and perhaps other shapes). >>> However currently the child nodes can be dragged on top of the label. If you can get this working then I think the below script would make a good ROExample. >>> >>> ------------- >>> | view outer inner innerLabel | >>> view := ROView new. >>> >>> outer := ROElement sprite. >>> outer @ ROLightlyHighlightable . >>> >>> inner := ROElement sprite . >>> innerLabel := ROElement labelOn: 'My sprite'. >>> outer add: inner; add: innerLabel. >>> 1 to: 5 do: [ :n | inner add: ROElement sprite ]. >>> >>> inner forward: ROMouseDragging. >>> innerLabel forward: ROMouseDragging. >>> >>> inner @ ROLightlyHighlightable. >>> innerLabel @ ROLightlyHighlightable. >>> >>> "We layout the things" >>> ROGridLayout on: inner elements. >>> ROVerticalLineLayout on: outer elements. >>> >>> view add: outer. >>> view open. >>> ----------------- >>> >>> _______________________________________________ >>> 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 |
In reply to this post by Ben Coman
> model := someObject.
> outer := ROElement spriteOn: model. > innerChildren := ROElement spriteOn: model. > innerLabel := ROElement labelOn: model. > outer add: innerLabel; add: innerChildren. > --- > and then wanting to add edges between elements. To do this I will need to search the View for the two elements matching model objects that need to be connected. Yes, this is a limitation of the Mondrian DSL. However, since you are working with the core of Roassal, this should not be a problem. > Using code taken from the Roassal Easel <Find> button as an example... > --- > stack firstView elementsDo: [ :el | > el isNotEdge ifTrue: [ allModels add: el -> el model printString ] ]. > --- > I am not clear of the effect on searching the graph that having the three elements inner, innerLabel and outer with the same model will have. It is true that the find button expect all the model to be different. Maybe the textual representation of the element can be delegate to a dedicated object to particular. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: 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 moose-technology
Updates:
Labels: Milestone-4.7 Comment #15 on issue 842 by [hidden email]: ROTranslatingShape mouse hotspot mis-alignment http://code.google.com/p/moose-technology/issues/detail?id=842 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |