Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


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

Re: Changing indirected data address

From Martin Wuerthner <spamtrap@mw-software.com>
Newsgroups comp.sys.acorn.programmer
Subject Re: Changing indirected data address
Date 2011-06-21 01:20 +0200
Organization MW Software
Message-ID <addd88e651.martin@bach.planiverse.com> (permalink)
References <7a8601e651.martin@blueyonder.co.uk> <mpro.ln283k0nm950g01jm.news@stevefryatt.org.uk> <51e6362bf1Paul@sprie.nl> <ec757ce651.martin@bach.planiverse.com> <51e67eb2f7Paul@sprie.nl>

Show all headers | View raw


In message <51e67eb2f7Paul@sprie.nl>
          Paul Sprangers <Paul@sprie.nl> wrote:

> In article <ec757ce651.martin@bach.planiverse.com>,
>    Martin Wuerthner <spamtrap@mw-software.com> wrote:

>>> And what about changing the Outline font of an icon that has been
>>> created in a Template file? Is there a way to do this in Basic?

>> Yes, that is easy.

> Thank you for rubbing the salt into the wound (Dutch expression).

Surely, that must be good news - I do not suppose you would have 
preferred me telling you that it is very difficult? :-)

>> The font handle is stored in the icon flags word,
>> so Wimp_SetIconState allows you to change it.

> As far as I understand the Stronghelp file on this topic, bit 6 of the icon
> flags has to be set, after which bit 24-31 contain the fonthandle.
> But how should I set those bits if I want to change the original font to,
> say, GillSans.Medium?

You need to set the bits to a font handle, which is a number for a 
font at a particular size that you can get from the FontManager via 
Font_FindFont. Your program needs to keep track of which handles it 
owns and release them before quitting (otherwise they are lost to the 
system and there are not too many available). If there is a screen 
mode change you need to renew the handles.

That sounds like quite a lot of work, but that is just the general 
administration work any program has to do that wants to deal with 
outline fonts. If you use outline fonts in your template file your 
program already has to deal with all of that anyway (except the very 
first Font_FindFont step), otherwise it cannot work correctly, no 
matter whether you want to change the font or not.

-- 
Martin
---------------------------------------------------------------------
Martin Wuerthner         MW Software      http://www.mw-software.com/
        RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------

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


Thread

Changing indirected data address Martin Bazley <martin.bazley@blueyonder.co.uk> - 2011-06-19 23:41 +0100
  Re: Changing indirected data address Steve Fryatt <news@stevefryatt.org.uk> - 2011-06-20 00:04 +0100
    Re: Changing indirected data address Paul Sprangers <Paul@sprie.nl> - 2011-06-20 10:16 +0200
      Re: Changing indirected data address Martin Wuerthner <spamtrap@mw-software.com> - 2011-06-20 23:04 +0200
        Re: Changing indirected data address Paul Sprangers <Paul@sprie.nl> - 2011-06-20 23:29 +0200
          Re: Changing indirected data address Martin Wuerthner <spamtrap@mw-software.com> - 2011-06-21 01:20 +0200
            Re: Changing indirected data address Paul Sprangers <Paul@sprie.nl> - 2011-06-21 11:27 +0200
              Re: Changing indirected data address Martin Wuerthner <spamtrap@mw-software.com> - 2011-06-21 11:40 +0200
                Re: Changing indirected data address Paul Sprangers <Paul@sprie.nl> - 2011-06-21 12:15 +0200
                Re: Changing indirected data address Martin Wuerthner <spamtrap@mw-software.com> - 2011-06-21 12:41 +0200
                Re: Changing indirected data address Paul Sprangers <Paul@sprie.nl> - 2011-06-21 13:37 +0200
    Re: Changing indirected data address Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-06-20 14:18 +0100
      Re: Changing indirected data address cferris@freeRemoveuk.com.invalid - 2011-06-20 14:55 +0100
        Re: Changing indirected data address Martin Bazley <martin.bazley@blueyonder.co.uk> - 2011-06-20 18:10 +0100
      Re: Changing indirected data address Martin Bazley <martin.bazley@blueyonder.co.uk> - 2011-06-20 18:13 +0100
    Re: Changing indirected data address Martin Bazley <martin.bazley@blueyonder.co.uk> - 2011-06-20 18:18 +0100
      Re: Changing indirected data address Alan Adams <alan@adamshome.org.uk> - 2011-06-20 19:08 +0100

csiph-web