Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Were there no women, men might live like gods." -- Thomas Dekker


devel / comp.sys.acorn.programmer / Re: Update iconbar icon

SubjectAuthor
* Update iconbar iconRob Hemmings
+* Re: Update iconbar iconSteve Fryatt
|`- Re: Update iconbar iconRob Hemmings
`- Re: Update iconbar iconHarriet Bazley

1
Update iconbar icon

<5a1560a69erhemmings@rgvk.co.uk>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=184&group=comp.sys.acorn.programmer#184

 copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!aioe.org!ybtpsfpBdXSX7q662GSFDw.user.46.165.242.91.POSTED!not-for-mail
From: rhemmi...@rgvk.co.uk (Rob Hemmings)
Newsgroups: comp.sys.acorn.programmer
Subject: Update iconbar icon
Date: Tue, 09 Aug 2022 19:05:22 +0100
Organization: None
Message-ID: <5a1560a69erhemmings@rgvk.co.uk>
Injection-Info: gioia.aioe.org; logging-data="41193"; posting-host="ybtpsfpBdXSX7q662GSFDw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Pluto/3.18 (RISC OS/5.29) NewsHound/v1.52-32
X-Notice: Filtered by postfilter v. 0.9.2
 by: Rob Hemmings - Tue, 9 Aug 2022 18:05 UTC

It is a long time since I've done any programming on RISC OS and I'd be
very grateful for a quick bit of advice on something I've forgotten.

Is it possible to change the state of an iconbar icon? I'm writing a
very simple BASIC program to toggle the state of a system variable and
I'd like a visual indication of which state it is in. It seems a waste
to open a separate window just for that so it would be neater to just
make an alteration to the iconbar icon but I can't remember if that is
possible?

Thanks in advance for any advice.

--
-------------------------------------------------------------
Rob Hemmings Southport
robnews@rgvk.co.uk

Re: Update iconbar icon

<mpro.rgd1zj00n9svt03u0.news@stevefryatt.org.uk>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=185&group=comp.sys.acorn.programmer#185

 copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!aioe.org!wUBOHGVSkkz9PTvSBH1HKg.user.46.165.242.75.POSTED!not-for-mail
From: new...@stevefryatt.org.uk (Steve Fryatt)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Update iconbar icon
Date: Tue, 9 Aug 2022 19:28:36 +0100
Organization: Aioe.org NNTP Server
Lines: 20
Message-ID: <mpro.rgd1zj00n9svt03u0.news@stevefryatt.org.uk>
References: <5a1560a69erhemmings@rgvk.co.uk>
Content-Type: text/plain; charset=us-ascii
Injection-Info: gioia.aioe.org; logging-data="64427"; posting-host="wUBOHGVSkkz9PTvSBH1HKg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Messenger-Pro/2.73.6.4252 (Qt/5.12.8) (Linux-x86_64)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Steve Fryatt - Tue, 9 Aug 2022 18:28 UTC

On 9 Aug, Rob Hemmings wrote in message
<5a1560a69erhemmings@rgvk.co.uk>:

> Is it possible to change the state of an iconbar icon? I'm writing a very
> simple BASIC program to toggle the state of a system variable and I'd like
> a visual indication of which state it is in. It seems a waste to open a
> separate window just for that so it would be neater to just make an
> alteration to the iconbar icon but I can't remember if that is possible?

Yes: it's just a normal icon. Anything that you can do via Wimp_SetIconState
or changing indirected data will work, and I assume that you'll be able to
use Wimp_ResizeIcon on RISC OS 3.5+.

Just collect the handle when you create the icon with Wimp_CreateIcon, and
use it in the usual way.

--
Steve Fryatt - Leeds, England

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

Re: Update iconbar icon

<73f963155a.harriet@bazleyfamily.co.uk>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=186&group=comp.sys.acorn.programmer#186

 copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: harr...@bazleyfamily.co.uk (Harriet Bazley)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Update iconbar icon
Date: Tue, 09 Aug 2022 19:41:40 +0100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <73f963155a.harriet@bazleyfamily.co.uk>
References: <5a1560a69erhemmings@rgvk.co.uk>
Injection-Info: reader01.eternal-september.org; posting-host="7d26c22b2065652b8e76c3b4134599f0";
logging-data="1549920"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Y5SbwIaQS7xtMjExDNGDBRRyJclx4x2o="
User-Agent: Messenger-Pro/8.04 (MsgServe/8.04) (RISC-OS/5.29) NewsHound/v1.53-32 RC1
Cancel-Lock: sha1:kSWtUSpEXsSejUGcXSJ82F94AJE=
X-Clacks-Overhead: GNU Terry Pratchett
 by: Harriet Bazley - Tue, 9 Aug 2022 18:41 UTC

On 9 Aug 2022 as I do recall,
Rob Hemmings wrote:
>
> Is it possible to change the state of an iconbar icon? I'm writing a
> very simple BASIC program to toggle the state of a system variable and
> I'd like a visual indication of which state it is in. It seems a waste
> to open a separate window just for that so it would be neater to just
> make an alteration to the iconbar icon but I can't remember if that is
> possible?
>
You can change the indirected text underneath the icon in the usual way
by poking new contents into the buffer, and call Wimp_SetIconState to
force a redraw. (The 'window handle' for an iconbar icon is set to
-2.)

DEF PROCseticontext(window%,icon%,text$)
!block%=window%:block%!4=icon%
SYS"Wimp_GetIconState",,block%
$(block%!28)=text$
block%!8=0:block%!12=0
SYS"Wimp_SetIconState",,block%
ENDPROC

I imagine you can do the same thing to change the contents of an
indirected sprite icon, but I've never actually done it!

--
Harriet Bazley == Loyaulte me lie ==

Down with categorical imperatives!

Re: Update iconbar icon

<5a15b00d13rhemmings@rgvk.co.uk>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=187&group=comp.sys.acorn.programmer#187

 copy link   Newsgroups: comp.sys.acorn.programmer
Path: i2pn2.org!i2pn.org!aioe.org!ybtpsfpBdXSX7q662GSFDw.user.46.165.242.91.POSTED!not-for-mail
From: rhemmi...@rgvk.co.uk (Rob Hemmings)
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Update iconbar icon
Date: Wed, 10 Aug 2022 09:32:38 +0100
Organization: None
Message-ID: <5a15b00d13rhemmings@rgvk.co.uk>
References: <5a1560a69erhemmings@rgvk.co.uk> <mpro.rgd1zj00n9svt03u0.news@stevefryatt.org.uk>
Injection-Info: gioia.aioe.org; logging-data="64946"; posting-host="ybtpsfpBdXSX7q662GSFDw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Pluto/3.18 (RISC OS/5.29) NewsHound/v1.52-32
X-Notice: Filtered by postfilter v. 0.9.2
 by: Rob Hemmings - Wed, 10 Aug 2022 08:32 UTC

In article <mpro.rgd1zj00n9svt03u0.news@stevefryatt.org.uk>,
Steve Fryatt <news@stevefryatt.org.uk> wrote:
> On 9 Aug, Rob Hemmings wrote in message
> <5a1560a69erhemmings@rgvk.co.uk>:

> > Is it possible to change the state of an iconbar icon? I'm writing a very
> > simple BASIC program to toggle the state of a system variable and I'd like
> > a visual indication of which state it is in. It seems a waste to open a
> > separate window just for that so it would be neater to just make an
> > alteration to the iconbar icon but I can't remember if that is possible?

> Yes: it's just a normal icon. Anything that you can do via Wimp_SetIconState
> or changing indirected data will work, and I assume that you'll be able to
> use Wimp_ResizeIcon on RISC OS 3.5+.

> Just collect the handle when you create the icon with Wimp_CreateIcon, and
> use it in the usual way.

Thanks Steve and Harriet for the helpful advice and reminder.

--
-------------------------------------------------------------
Rob Hemmings Southport
rhnews@dsl.pipex.com

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor