Multiple selection in Roassal

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

Multiple selection in Roassal

abergel
Hi!

After having discussed yesterday with Yuriy, I gave a try at having multiple selection in Roassal. If you update Roassal, you can try:

-=-=-=-=-=-=-=-=-=-=-=-=
b := RTMondrian new.
b nodes: Collection withAllSubclasses.
b layout flow.
b normalizer 
normalizeSize: #numberOfMethods.

b build.

"Adding a label"
labelShape := RTLabel new text: 'Nothing selected'.
label := labelShape element.
b view add: label.
TRConstraint move: label below: b view elements.

"Changing the label according to the selection"
b view elements @ (RTSelectable new selectionCallback: [ :es | label trachelShape text: es size asString, ' selected elements']).

b view
-=-=-=-=-=-=-=-=-=-=-=-=
Try clicking on the square and the white background.

Wouldn’t it be nice to connect this with GTInspector?

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Multiple selection in Roassal

Peter Uhnak
This is cool!

It would be also interesting to add marquee selection support and synchronized movement. But those are probably more advanced problems.

Peter

On Tue, Mar 3, 2015 at 3:35 PM, Alexandre Bergel <[hidden email]> wrote:
Hi!

After having discussed yesterday with Yuriy, I gave a try at having multiple selection in Roassal. If you update Roassal, you can try:

-=-=-=-=-=-=-=-=-=-=-=-=
b := RTMondrian new.
b nodes: Collection withAllSubclasses.
b layout flow.
b normalizer 
normalizeSize: #numberOfMethods.

b build.

"Adding a label"
labelShape := RTLabel new text: 'Nothing selected'.
label := labelShape element.
b view add: label.
TRConstraint move: label below: b view elements.

"Changing the label according to the selection"
b view elements @ (RTSelectable new selectionCallback: [ :es | label trachelShape text: es size asString, ' selected elements']).

b view
-=-=-=-=-=-=-=-=-=-=-=-=
Try clicking on the square and the white background.

Wouldn’t it be nice to connect this with GTInspector?

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




_______________________________________________
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