Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #217
| Date | 2011-04-27 07:38 +0100 |
|---|---|
| From | Matthew Phillips <mnews@sinenomine.freeserve.co.uk> |
| Newsgroups | comp.sys.acorn.programmer |
| Subject | Re: How to put a caret in a window |
| Message-ID | <8a105eca51.Matthew@sinenomine.freeserve.co.uk> (permalink) |
| References | <51c98770d3Paul@sprie.nl> <3f7697c951.Matthew@sinenomine.freeserve.co.uk> <51c9a7e1b5Paul@sprie.nl> <702330ca51.Matthew@sinenomine.freeserve.co.uk> |
In message <702330ca51.Matthew@sinenomine.freeserve.co.uk> on 26 Apr 2011 Matthew Phillips wrote: > In message <51c9a7e1b5Paul@sprie.nl> > on 25 Apr 2011 Paul Sprangers wrote: > > > SYS "Font_Paint",,string$,16,ox%+10,oy%-30 > > SYS "Font_ScanString",0,string$,&20100,0,0 TO ,,,cx%,cy% > > SYS "Wimp_SetCaretPosition",wh%,-1,cx%,cy%,????? > > The values in cx% and cy% will be relative to plotting the string at 0,0 so > you will need to adjust the caret placement according to where you are > actually painting the string. Font_Paint takes the x and y relative to the > screen origin, but Wimp_SetCaretPosition will be relative to the window > work area origin. Nasty sums! Sorry, perhaps I wasn't very clear. I mean that the values returned into cx% and cy% by Font_ScanString will be as though the string was painted at 0,0 (or maybe at the location specified in the transformation matrix if you were using one, which you're not). So before passing to Wimp_SetCaretPosition they'll need adjusting to take account of the window work area co-ordinates at which you are painting the string. -- Matthew Phillips Durham
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-25 17:34 +0200
Re: How to put a caret in a window Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-04-25 19:29 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-25 23:28 +0200
Re: How to put a caret in a window Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-04-26 23:17 +0100
Re: How to put a caret in a window Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-04-27 07:38 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-27 13:31 +0200
Re: How to put a caret in a window Jeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk> - 2011-04-27 13:14 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-27 17:15 +0200
Re: How to put a caret in a window pdm <pd.miller2@tiscali.co.uk> - 2011-04-27 08:59 -0700
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-27 21:50 +0200
Re: How to put a caret in a window pdm <pd.miller2@tiscali.co.uk> - 2011-04-27 23:19 -0700
Re: How to put a caret in a window Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-04-27 19:58 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-27 22:15 +0200
Re: How to put a caret in a window Martin Wuerthner <spamtrap@mw-software.com> - 2011-04-30 17:12 +0200
Re: How to put a caret in a window Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-04-30 19:12 +0200
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-05-02 09:37 +0200
Re: How to put a caret in a window Alan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk> - 2011-05-02 08:49 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-05-02 09:59 +0200
Re: How to put a caret in a window Alan Adams <alan@adamshome.org.uk> - 2011-05-02 21:27 +0100
Re: How to put a caret in a window Steve Fryatt <news@stevefryatt.org.uk> - 2011-05-02 09:08 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-30 12:54 +0200
Re: How to put a caret in a window Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-04-30 13:52 +0200
Re: How to put a caret in a window cferris@freeRemoveuk.com.invalid - 2011-04-30 13:34 +0100
Re: How to put a caret in a window Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-04-30 15:39 +0200
Re: How to put a caret in a window Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-04-28 08:20 +0100
Re: How to put a caret in a window pdm <pd.miller2@tiscali.co.uk> - 2011-04-28 02:16 -0700
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-29 17:49 +0200
Re: How to put a caret in a window Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-04-30 00:05 +0200
csiph-web