Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #6365
| From | Paul Sprangers <Paul@sprie.nl> |
|---|---|
| Subject | Re: Wimp_RedrawWindow protocols |
| Newsgroups | comp.sys.acorn.programmer |
| Date | 2022-04-16 17:18 +0200 |
| Message-ID | <59da1846b2Paul@sprie.nl> (permalink) |
| References | <59da004dcaPaul@sprie.nl> <mpro.rafl8502cchs903j7.news@stevefryatt.org.uk> <59da0a93c2Paul@sprie.nl> <845f0dda59.harriet@bazleyfamily.co.uk> |
| Organization | None |
In article <845f0dda59.harriet@bazleyfamily.co.uk>, Harriet Bazley <harriet@bazleyfamily.co.uk> wrote: > I think what Martin Avison was saying in message > <59d9b91b68News03@avisoft.f9.co.uk> was that Wimp_RedrawWindow should > not be called by your program *at all* save in response to a Wimp_Poll > redraw window request (reason code 1): Ah, I see. And that's what I do. Wimp_RedrawWindow occurs only once in the entire program, as a response to reason code 1. > Looking through the StrongHelp manuals (I've never done any window > updating outside the poll loop), I think you may be intended to call > Wimp_ForceRedraw (which will cause your window to receive the above > mentioned Wimp_Poll request) or Wimp_UpdateWindow, which does the same > thing, only not via the poll loop but immediately. I already use the Wimp_UpdateWindow call for direct update of distinct parts of the window. So, I think I've done this part of the redraw protocols right. > > DEF PROCredraw(wh%) > > !block% = wh% > > SYS "Wimp_RedrawWindow",,block% TO more% > > WHILE more% > > ox% = block%!4 - block%!20 > > oy% = block%!16 - block%!24 > > etc... > If that is a concern, how about moving the ox% & oy% calculations from > within the WHILE to just before it? I do not think that the visible > area will change between redraws - although obviously the redraw > rectangle will. Moving those calculations to just before the WHILE works indeed, but only after the RedrawWindow call. Moving them before that call generates an error, unless it is preceded by the GetWindowInfo call. This may be obvious for the better informed, but not for me. The redraw routine now looks like this: DEF PROCredraw(wh%) !block% = wh% SYS "Wimp_RedrawWindow",,block% TO more% ox% = block%!4 - block%!20 oy% = block%!16 - block%!24 WHILE more% etc... To me those calculations between the call and WHILE look a bit silly, but well... it works, and I no longer need the GetWindowInfo call. Many thanks for your thoughts! Paul -- http://riscos.sprie.nl
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Wimp_RedrawWindow protocols Paul Sprangers <Paul@sprie.nl> - 2022-04-16 12:57 +0200
Re: Wimp_RedrawWindow protocols Steve Fryatt <news@stevefryatt.org.uk> - 2022-04-16 12:57 +0100
Re: Wimp_RedrawWindow protocols Paul Sprangers <Paul@sprie.nl> - 2022-04-16 14:49 +0200
Re: Wimp_RedrawWindow protocols Harriet Bazley <harriet@bazleyfamily.co.uk> - 2022-04-16 14:19 +0100
Re: Wimp_RedrawWindow protocols Paul Sprangers <Paul@sprie.nl> - 2022-04-16 17:18 +0200
Re: Wimp_RedrawWindow protocols Martin <News03@avisoft.f9.co.uk> - 2022-04-16 14:49 +0100
csiph-web