Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roassal revised ROSelection and example #894

Closed
seandenigris opened this issue Aug 3, 2015 · 9 comments
Closed

Roassal revised ROSelection and example #894

seandenigris opened this issue Aug 3, 2015 · 9 comments

Comments

@seandenigris
Copy link
Contributor

Originally reported on Google Code with ID 894

Initially I contributed ROSelection as part of the rubberbanding feature.  The attached
changeset generalizes it a bit and provides the folllowing  example of its use.  

-------------
activeSelection := ROSelection new                  
    onInclusion: [ :element | ROHighlightElement on: element color: Color red ];
    onExclusion: [ :element | ROUnhighlightElement on: element ].
statusBar := (ROElement on: activeSelection) + (ROLabel text: [ :el | el model asString
]) + ROBox white.
view stack add: statusBar.
statusBar translateTo: 0 @ 480.

view shape label.
view interaction on: ROMouseLeftClick do: 
[   :ann | 
    activeSelection clear.
    activeSelection add: ann element.                       
].
view nodes: #(1 2 3 4 5).
view gridLayout.
---------------

There are two things I need help with:
1. Deselecting all elements when clicking on the background.**
2. Multiple selection, which if I knew the right way to work with the announcement
events, would conceptually be as simple as the following modification...

[   :ann | 
    ann isShiftClicked ifFalse: [ activeSelection clear ].
    activeSelection add: ann element.                       
].

**may also relate to Issue 884 comment #9 .

Reported by benjamin.t.coman on 2012-12-09 04:27:32

@seandenigris
Copy link
Contributor Author

Fixed minor glitch.  Last update ... :) really!

Reported by benjamin.t.coman on 2012-12-09 05:21:22


- _Attachment: [ROSelectionAndExample.3.cs](https://storage.googleapis.com/google-code-attachments/moose-technology/issue-894/comment-2/ROSelectionAndExample.3.cs)_

@seandenigris
Copy link
Contributor Author

Ben, there is some 'as yet unclassified' category. Can you provide some proper category.
Tests are also very welcome

Reported by alexandre.bergel on 2012-12-11 23:55:45

  • Labels added: Component-Roassal

@seandenigris
Copy link
Contributor Author

ROSelection methods categorized in attachment.

Reported by benjamin.t.coman on 2012-12-12 15:27:29


- _Attachment: [ROSelection.st](https://storage.googleapis.com/google-code-attachments/moose-technology/issue-894/comment-4/ROSelection.st)_

@seandenigris
Copy link
Contributor Author

In 1.236

Reported by alexandre.bergel on 2012-12-13 17:00:39

  • Status changed: Fixed

@seandenigris
Copy link
Contributor Author

Can this be reopened?  I agree that it was fixed per successful integration of  cs and
st files I provided, but I would like to expand the scope to address points (1.) and
(2.) above.

First regarding point (2.), the following script demonstrates multiple selection using
attached RoassalMorphic-BenComan.81.mcz & Roassal-BenComan.387.mcz (I wasn't sure if
you also needed the intermediate mczs so I included them also. One auxillary thing
that slipped is the 'position' I added to ROElement>>printOn: which you may want to
revert.)
---------
activeSelection := ROSelection new                  
    onInclusion: [ :element | ROHighlightElement on: element color: Color red ];
    onExclusion: [ :element | ROUnhighlightElement on: element ].
statusBar := (ROElement on: activeSelection) + (ROLabel text: [ :el | el model asString
]) + ROBox white.
view stack add: statusBar.
statusBar translateTo: 0 @ 480.

view shape label.
view interaction on: ROMouseLeftClick do: 
[   :ann | 
    ann shiftKeyPressed ifFalse: [ activeSelection clear ].
    activeSelection add: ann element.                       
].
view nodes: #(1 2 3 4 5).
view gridLayout.
-------------

Regarding point (1.) I haven't a clue. It would really good if someone could assist
with that to complete ROSelection example. 

Sorry no tests yet, but I updated the ROExample.

Reported by benjamin.t.coman on 2012-12-16 11:31:52


- _Attachment: [RoassalMorphic-BenComan.81.mcz](https://storage.googleapis.com/google-code-attachments/moose-technology/issue-894/comment-6/RoassalMorphic-BenComan.81.mcz)_ - _Attachment: [Roassal-BenComan.387.mcz](https://storage.googleapis.com/google-code-attachments/moose-technology/issue-894/comment-6/Roassal-BenComan.387.mcz)_ - _Attachment: [Roassal-BenComan.386.mcz](https://storage.googleapis.com/google-code-attachments/moose-technology/issue-894/comment-6/Roassal-BenComan.386.mcz)_ - _Attachment: [Roassal-BenComan.385.mcz](https://storage.googleapis.com/google-code-attachments/moose-technology/issue-894/comment-6/Roassal-BenComan.385.mcz)_ - _Attachment: [Roassal-BenComan.384.mcz](https://storage.googleapis.com/google-code-attachments/moose-technology/issue-894/comment-6/Roassal-BenComan.384.mcz)_

@seandenigris
Copy link
Contributor Author

Reported by alexandre.bergel on 2012-12-16 16:59:19

  • Status changed: Accepted

@seandenigris
Copy link
Contributor Author

Is this still an issue?

Reported by tudor@tudorgirba.com on 2013-05-07 05:35:48

@seandenigris
Copy link
Contributor Author

I'm not sure.  I think I remember Alex integrating my contribution for CTRL and SHIFT
key modifiers to do the multiple selection, but there is no record here, and its too
long ago (wow! has it been that long).  As far as I know the issue of resetting the
selection to empty by clicking on the background (point 1. above) has not been addressed.


I think the multiple-selection would be a really good feature for Roassal, however...
* I haven't been very attentive to it.  I plan to have it in my application but its
on the backburner until I finish a few other things. 
* I think Roassal has moved on a lot since then, so I'm not sure how much love it will
need now.

So perhaps for now it should be closed again.  Once I get my dissertation submitted,
I plan to move my application to latest Moose.  Then this will probably arise again,
but I can open a new issue at that time once I have something more definite and time
to assist.

Reported by benjamin.t.coman on 2013-05-07 15:16:05

@seandenigris
Copy link
Contributor Author

hi Ben,

your code is indeed part of Roassal. I have the impression however that we do not fully
exploit the possibilities of this. 
I fix this.

Reported by alexandre.bergel on 2013-05-07 15:55:40

  • Status changed: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant