Mouse wheel

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

Mouse wheel

Louis LaBrunda
Hi All,

Does anyone know how to get info about the mouse wheel being scrolled? Is this handled by events?  It doesn't seem to be.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/J6C28_9OhDkJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Mouse wheel

Louis LaBrunda
Hi All,

I ended up sub-classing OSWidget (and a couple other classes to use my sub-class) so I could override #wmMousewheel:with:.  This allowed me to post and catch the event to do what I want.

I really like VA Smalltalk, so I don't want what I am about to say to sound like a complaint more of an observation.  It seems the mouse wheel support very much models support for the OS widgets.  By this I mean it supports those widgets with scroll bars and using the mouse wheel with any other widget is very hard.  I don't think it would have taken much effort (easy for me to say) for the mouse wheel scrolling to be handled much like a mouse button click over any widget.  At the lowest level, I think this is the case but the event gets swallowed and not posted up the line.

It seems to me that assuming the mouse wheel is only for widgets that scroll is not the Smalltalk way.  After all Smalltalk gives us LargeIntegers and other classes that don't map directly to what the hardware can handle natively.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/m5z1tLPe7W8J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Mouse wheel

Thomas Koschate-2
Lou, I released a mousewheel support add-on for VA 7.5.2 and earlier versions that probably does what you've already done.  Starting with 8.0, Instantiations incorporated mousewheel support into the base image, making my package obsolete.  Regardless, the package only ever worked under Windows - UNIX operating systems don't seem to generate the mousewheel events.

Tom

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/HEwZVs5ZCkIJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Mouse wheel

Louis LaBrunda
In reply to this post by Louis LaBrunda
Hi Tom,

I'm working with V8.5.  Maybe I'm missing something but I don't see how to hook a mouse wheel event like one would hook say a mouse move event:

imageView primaryWidget
addEventHandler: PointerMotionMask
receiver: receiver
selector: #pointerMotion:clientData:callData:
clientData: self.

where imageView is something like an AbtDrawingAreaView.

If there was a wheel event mask like PointerMotionMask, I would have been all set.

I'm now playing with an extension to OSWidget and a sub-class to OSInput that I can piggy back on a ButtonReleaseMask get rid of my other sub-classes.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/QtW3j5_TmEsJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Mouse wheel

Wayne Johnston
In reply to this post by Thomas Koschate-2
Tom, hearing that VA 8.0.0 has native mouse wheel support, I removed MouseWheelAdditionsApp.  Mouse scrolling works like before it seems except in one window (so far) in our application where it has no effect.  I don't see anything special about that window or its scrolling list to explain that.  

Our "preload" image has MouseWheelAdditionsApp.  I see that if I unload the app, its #removing method does this:
OSWidget eventTableAt: WmMousewheel put: nil
but even putting back #wmMousewheel:with: (as OSWidget's #initializeEventTable would do) doesn't help.

Any ideas?  Thanks!

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/s4FtcMghevwJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Mouse wheel

Thomas Koschate-2
On Tuesday, February 28, 2012 7:32:18 AM UTC-5, Wayne Johnston wrote:

Tom, hearing that VA 8.0.0 has native mouse wheel support, I removed MouseWheelAdditionsApp.  Mouse scrolling works like before it seems except in one window (so far) in our application where it has no effect.  I don't see anything special about that window or its scrolling list to explain that.  

I don't know what kind of window you're having issues with, but one thing that might make a difference is in OSListBox.  The additions include an explicit #setFocus if a scroll wheel event is received by the widget.  This doesn't seem to have made it into Instantiation's version.
 
Our "preload" image has MouseWheelAdditionsApp.  I see that if I unload the app, its #removing method does this:
OSWidget eventTableAt: WmMousewheel put: nil
but even putting back #wmMousewheel:with: (as OSWidget's #initializeEventTable would do) doesn't help.

Any ideas?  Thanks!

Well, there's the usual idea of loading the clean config map into a virgin image, rather than trying to remove the app from a previously loaded image...   Also, make sure that you explicitly fire OSWidget class>>#initializeEventTable to ensure that the table is rebuilt properly.

Tom

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/LgthGVDM8N8J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Mouse wheel

Wayne Johnston
I see that OSWidget class>>#initializeEventTable by itself won't reinitialize, but setting EventTable to nil then executing that didn't help.  Nor did bringing in the one change to OSListBox. Oh well.  I cannot go back to an image without the goodie at the moment, maybe someday I will.  Guess I'll keep the goodie in for now.  Thanks.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/OnH6roVXBRAJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Mouse wheel

Thomas Koschate-2
On Tuesday, February 28, 2012 9:58:04 AM UTC-5, Wayne Johnston wrote:

I see that OSWidget class>>#initializeEventTable by itself won't reinitialize, but setting EventTable to nil then executing that didn't help.  Nor did bringing in the one change to OSListBox. Oh well.  I cannot go back to an image without the goodie at the moment, maybe someday I will.  Guess I'll keep the goodie in for now.  Thanks.

 The fact that you feel you can't build an image up from scratch is a danger sign in itself of serious problems, but we'll leave that for the moment.  The other thing you may want to try if you haven't already is a good old-fashioned "System abtScrubImage".

Tom

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/sNOr1FMa4F4J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.