Discussion:
Scrollwheel support
(too old to reply)
Harriet Bazley
2018-02-14 17:26:39 UTC
Permalink
I want my program to scroll its window in response to mouse scrollwheel
events, which doesn't seem to happen automatically under RISC OS 5 (I
assumed the Wimp simply translated them into clicks on the scroll icons, but
apparently not). Searching on the Web suggests that the scrollwheel
actually issues "Scroll Request" events (Wimp_Poll reason code 10) instead,
so I tried monitoring those - but the app doesn't seem to be receiving any.
I'm calling Wimp_Poll with a mask of &1, so they shouldn't be masked out.

How do I support a scrollwheel?
--
Harriet Bazley == Loyaulte me lie ==

Radioactive cats have 18 half-lives.
Alan Wrigley
2018-02-14 17:42:58 UTC
Permalink
Post by Harriet Bazley
How do I support a scrollwheel?
You have to set the window flag for User Scroll.

Alan
--
RISC OS - you know it makes cents
Harriet Bazley
2018-02-15 02:35:50 UTC
Permalink
On 14 Feb 2018 as I do recall,
Post by Alan Wrigley
Post by Harriet Bazley
How do I support a scrollwheel?
You have to set the window flag for User Scroll.
That would be window flags bit 8 or 9, I take it?
Is it possible to do this from WinEd, and/or is it possible to change the
window flags after creating it? Or do I need to create the window manually
instead of loading it from the template?
--
Harriet Bazley == Loyaulte me lie ==

The nice thing about standards is that there are so many to choose from
Alan Wrigley
2018-02-15 09:23:03 UTC
Permalink
Post by Harriet Bazley
On 14 Feb 2018 as I do recall,
Post by Alan Wrigley
Post by Harriet Bazley
How do I support a scrollwheel?
You have to set the window flag for User Scroll.
That would be window flags bit 8 or 9, I take it?
Is it possible to do this from WinEd
I would imagine so. I use FormEd so I just select the option from the window
menu. I use bit 8 - I'm not sure whether it makes much difference which bit
is used because I think the wheel generates a set of discrete events as you
scroll it so auto-repeat wouldn't have much relevance. But that's just a
guess on my part.

Alan
--
RISC OS - you know it makes cents
Steve Fryatt
2018-02-15 09:34:07 UTC
Permalink
On 15 Feb, Harriet Bazley wrote in message
Post by Harriet Bazley
On 14 Feb 2018 as I do recall,
Post by Alan Wrigley
You have to set the window flag for User Scroll.
That would be window flags bit 8 or 9, I take it?
0x100 and 0x200, yes.
Post by Harriet Bazley
Is it possible to do this from WinEd,
Yes. Use the 'Debounced' or 'Auto Repeat' options in the 'Scroll Behaviour'
section of the Edit Window dialogue.
Post by Harriet Bazley
and/or is it possible to change the window flags after creating it?
Debounced:

window_definition->flags |= wimp_WINDOW_SCROLL;

Auto Repeat:

window_definition->flags |= wimp_WINDOW_SCROLL_REPEAT;
Post by Harriet Bazley
Or do I need to create the window manually instead of loading it from the
template?
You can also do that, but there's no difference from loading the block in
from a template.
--
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/
Harriet Bazley
2018-02-16 00:34:26 UTC
Permalink
On 15 Feb 2018 as I do recall,
Post by Steve Fryatt
On 15 Feb, Harriet Bazley wrote in message
Post by Harriet Bazley
On 14 Feb 2018 as I do recall,
Post by Alan Wrigley
You have to set the window flag for User Scroll.
That would be window flags bit 8 or 9, I take it?
0x100 and 0x200, yes.
Post by Harriet Bazley
Is it possible to do this from WinEd,
Yes. Use the 'Debounced' or 'Auto Repeat' options in the 'Scroll Behaviour'
section of the Edit Window dialogue.
Aha - there's a whole extra section of window down below the visible area of
that dialogue box. For some reason I hadn't spotted the scrollbar....

Now receiving the expected events OK, so I have only to work out how to
implement them.
--
Harriet Bazley == Loyaulte me lie ==

Positive: Mistaken at the top of one's voice.
Harriet Bazley
2018-02-16 01:12:09 UTC
Permalink
On 16 Feb 2018 as I do recall,
Harriet Bazley wrote:


[snip]
Post by Harriet Bazley
Now receiving the expected events OK, so I have only to work out how to
implement them.
It's working!
--
Harriet Bazley == Loyaulte me lie ==

Hypocrisy is underrated.
Erik G
2018-02-26 20:40:41 UTC
Permalink
On 16/02/2018 01:34, Harriet Bazley wrote:

[WinEd]
Post by Harriet Bazley
Aha - there's a whole extra section of window down below the visible area of
that dialogue box. For some reason I hadn't spotted the scrollbar....
A pet peeve of mine: Scrollable dialogue boxes where the default layout lets
you overlook the scrollbar.

Consider a scrollable dialogue box where part of the box is visible in the window
and part of it is hidden.

Now consider a similar box which only consists of the visible part of the first
box, and the hidden part does not exist.

If the default size of the first box is the same as the size of the second box
then it hides the fact that more settings are available, because it looks the
same as the second box (i.e. a box with no more extra settings). The only
difference being the scrollbar.

A user can easily overlook the presence of that scrollbar (as demonstrated by
Harriet's experience) and so fail to find the other available settings.

I advocate for developers to choose the default size of a scrollable dialogue box
such that at the bottom of the box only about half (or two-thirds, or another
fraction that looks good) of a line of icons is visible.
This would make it obvious that more settings are available.
--
Erik G.
From address is fake
See http://erikgrnh.home.xs4all.nl/
Alan Wrigley
2018-02-26 22:49:44 UTC
Permalink
Post by Erik G
A user can easily overlook the presence of that scrollbar
How can you overlook the presence of a scrollbar?

Alan
--
RISC OS - you know it makes cents
Harriet Bazley
2018-02-26 23:19:03 UTC
Permalink
On 26 Feb 2018 as I do recall,
Post by Alan Wrigley
Post by Erik G
A user can easily overlook the presence of that scrollbar
How can you overlook the presence of a scrollbar?
Quite easily, apparently - quod erat demonstrandum! Particularly when all
the information visible in the pane corresponds to all the flags you
previously knew about, and the 'hidden' information is new material for a
later version of the OS....

(I think having the neat frame round the outside of the subsection and a
floating pane at the bottom with 'Cancel' and 'Update' on it helped mislead
me, as well; if I hadn't been able to see 'the bottom of the window' and had
needed to scroll down to find the action buttons, I'd have been more likely
to realise that there *was* a 'down' to scroll to.)
--
Harriet Bazley == Loyaulte me lie ==

Nothing is foolproof - to a sufficiently talented fool
Loading...