Groups | Search | Server Info | Login | Register


Groups > comp.sys.acorn.programmer > #6550

Re: Text in a wimp window

From Steve Fryatt <news@stevefryatt.org.uk>
Newsgroups comp.sys.acorn.programmer
Subject Re: Text in a wimp window
Date 2025-08-18 11:50 +0100
Organization A noiseless patient Spider
Message-ID <slrn10a61bo.372r.news@stevefryatt.org.uk> (permalink)
References <5c4be2e7bbbob@sick-of-spam.invalid> <5c4c6c50b0basura@invalid.addr.uk> <5c4cd689e8bob@sick-of-spam.invalid> <mpro.t11uf400fdgng0dmf.news@stevefryatt.org.uk> <5c4d57a507bob@sick-of-spam.invalid>

Show all headers | View raw


On 2025-08-16, Bob Latham <bob@sick-of-spam.invalid> wrote:

> These icons are just temporary and in effect they place a line of
> text on the window and then the icon no longer exists, just leaving
> the text on the screen.

More or less. They never actually exist as icons at all.

It might be more correct to think of it as your borrowing the Wimp's icon 
redraw routine to plot some text and graphics into your window.

> That means you can create them as you need without any count?

Indeed. They never exist as an icon, as far as the Wimp is concerned.

> Is this on the right lines..
>   Plot an icon for line 1 near top of screen.
>
> Next text line comes along...
>   Plot an icon for line 2 under line 1.
>
> Continue until screen is filled then....
> Next line comes in.
> Plot a new bottom icon which covers the previous one.
>
> Plot an icon 1 line higher with the text for what was the bottom line
> last time. etc.

More or less... Wimp redraw doesn't really work that way around.

You'll need to have a list of all of the lines of text, which you can add 
to (or shift up if you're discarding the oldest line each time). You then 
invalidate the redraw state of the lines that you want to replace using 
Wimp_ForceRedraw and let your redraw routine handle the plotting.

> As for the redraw loop..
>  Can I cheat to start with? ie. rely on the clip window and redraw
> the entire window each time? Have that as a sort of base camp for
> this mountain climb.

Yes, that's completely fine. Modern hardware won't really notice unless 
you have a lot of lines, and you can come in to optimise things later.

> Not sure I'm clever enough to work all this out but I'm going to try.

What language are you working in? I could probably put a quick example 
together in BASIC later this week, if that would help?

-- 
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Text in a wimp window Bob Latham <bob@sick-of-spam.invalid> - 2025-08-13 20:18 +0100
  Re: Text in a wimp window druck <news@druck.org.uk> - 2025-08-14 09:35 +0100
    Re: Text in a wimp window Bob Latham <bob@sick-of-spam.invalid> - 2025-08-14 09:54 +0100
    Re: Text in a wimp window Theo <theom+news@chiark.greenend.org.uk> - 2025-08-14 10:03 +0100
      Re: Text in a wimp window Bob Latham <bob@sick-of-spam.invalid> - 2025-08-14 10:45 +0100
        Re: Text in a wimp window Sebastian Barthel <naitsabes@freenet.de> - 2025-08-14 14:37 +0000
          Re: Text in a wimp window Bob Latham <bob@sick-of-spam.invalid> - 2025-08-14 17:57 +0100
      Re: Text in a wimp window Theo <theom+news@chiark.greenend.org.uk> - 2025-08-14 16:12 +0100
  Re: Text in a wimp window Richard Ashbery <basura@invalid.addr.uk> - 2025-08-14 21:19 +0100
    Re: Text in a wimp window Bob Latham <bob@sick-of-spam.invalid> - 2025-08-15 16:39 +0100
      Re: Text in a wimp window Steve Fryatt <news@stevefryatt.org.uk> - 2025-08-15 20:06 +0100
        Re: Text in a wimp window Bob Latham <bob@sick-of-spam.invalid> - 2025-08-16 16:10 +0100
          Re: Text in a wimp window Steve Fryatt <news@stevefryatt.org.uk> - 2025-08-18 11:50 +0100
            Re: Text in a wimp window Bob Latham <bob@sick-of-spam.invalid> - 2025-08-18 12:58 +0100
            Re: Text in a wimp window Bob Latham <bob@sick-of-spam.invalid> - 2025-08-20 18:35 +0100
              Re: Text in a wimp window Sebastian Barthel <naitsabes@freenet.de> - 2025-08-21 13:01 +0000
              Re: Text in a wimp window Harriet Bazley <harriet@bazleyfamily.co.uk> - 2025-08-23 00:31 +0100
      Re: Text in a wimp window Jean-Michel <jmc.bruck@orange.fr> - 2025-08-17 18:01 +0200

csiph-web