Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #1013 > unrolled thread
| Started by | Alan Adams <alan@adamshome.org.uk> |
|---|---|
| First post | 2011-11-10 19:40 +0000 |
| Last post | 2011-11-10 21:31 +0000 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.sys.acorn.programmer
Detecting click in writable icon Alan Adams <alan@adamshome.org.uk> - 2011-11-10 19:40 +0000
Re: Detecting click in writable icon Steve Fryatt <news@stevefryatt.org.uk> - 2011-11-10 20:40 +0000
Re: Detecting click in writable icon Alan Adams <alan@adamshome.org.uk> - 2011-11-10 21:31 +0000
| From | Alan Adams <alan@adamshome.org.uk> |
|---|---|
| Date | 2011-11-10 19:40 +0000 |
| Subject | Detecting click in writable icon |
| Message-ID | <584c193052.Alan.Adams@laptop.adamshome.org.uk> |
I need to be able to detect when the user has clicked (anywhere) in one of a BASIC program's windows. At the moment I can detect the window background, by setting its button type to click, and I can detect the action buttons. The writable icons however are a problem. Button type has to be 14 or 15 as far as I can see, and neither return an event when the user clicks. Looking at the Window Manager manual, events 14 and 15 looked possible, activated by setting the poll flag bit 25, but that simply returns an error when calling wimp_poll - invalid parameter. I assume therefore this is a Select feature - I am on RO 5.16 and this program needs to work for window manager 3.80 - i.e. universal boot version. I can detect pointer entering window, but it might occur, if the pointer doesn't leave the window before re-entering. In any case, that's too general. Any ideas? -- Alan Adams, from Northamptonshire alan@adamshome.org.uk http://www.nckc.org.uk/
[toc] | [next] | [standalone]
| From | Steve Fryatt <news@stevefryatt.org.uk> |
|---|---|
| Date | 2011-11-10 20:40 +0000 |
| Message-ID | <mpro.lugpfk04fo8q801k3.news@stevefryatt.org.uk> |
| In reply to | #1013 |
On 10 Nov, Alan Adams wrote in message
<584c193052.Alan.Adams@laptop.adamshome.org.uk>:
> I need to be able to detect when the user has clicked (anywhere) in one of
> a BASIC program's windows. At the moment I can detect the window
> background, by setting its button type to click, and I can detect the
> action buttons. The writable icons however are a problem.
>
> Button type has to be 14 or 15 as far as I can see, and neither return an
> event when the user clicks.
Are you sure? Type 14 certainly returns click (*1) and drag (*16) events,
and the wording of type 0 in the PRM suggests that type 15 could also return
click events.
> Looking at the Window Manager manual, events 14 and 15 looked possible,
> activated by setting the poll flag bit 25, but that simply returns an
> error when calling wimp_poll - invalid parameter. I assume therefore this
> is a Select feature
It is documented in the RISC OS 6 PRM, so I'd assume so.
--
Steve Fryatt - Leeds, England
http://www.stevefryatt.org.uk/
[toc] | [prev] | [next] | [standalone]
| From | Alan Adams <alan@adamshome.org.uk> |
|---|---|
| Date | 2011-11-10 21:31 +0000 |
| Message-ID | <416e233052.Alan.Adams@laptop.adamshome.org.uk> |
| In reply to | #1014 |
In message <mpro.lugpfk04fo8q801k3.news@stevefryatt.org.uk>
Steve Fryatt <news@stevefryatt.org.uk> wrote:
> On 10 Nov, Alan Adams wrote in message
<snip>
>> Button type has to be 14 or 15 as far as I can see, and neither return an
>> event when the user clicks.
> Are you sure? Type 14 certainly returns click (*1) and drag (*16) events,
> and the wording of type 0 in the PRM suggests that type 15 could also return
> click events.
Testing again - type 14 does return reason code 6, click. Type 15
doesn't return a click, but does return code 12 if the caret wasn't
previously in the icon.
I'm not sure what i did wrong the first time...
--
Alan Adams, from Northamptonshire
alan@adamshome.org.uk
http://www.nckc.org.uk/
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.acorn.programmer
csiph-web