Re: Inform: boxes and windows


04 Nov 1995 19:38:53 GMT

Julian Arnold <jools@arnod.demon.co.uk> wrote:
> If I am printing to window 1, and I use the box command, it seems to
> print the box properly, and then put me back into window 0, so I need
> to @set_window 1 to get back to window 1. Is this what's happening?

Text boxes have to be printed in window 1 (because window 0 does not
allow direct character positioning). I imagine that the `box' command
generates something similar to the following assembly code:

(calculate <x> and <y>)
@set_window 1;
@set_cursor <x> <y>;
@set_text_style 1;
@print_table <address> <width> <height>;
@set_text_style 0;
@set_window 0;

But in fact that isn't quite true; if you use the -a command-line option
to see the actual assembler for a short program you'll see that it's
implemented a bit differently (partly to correctly print the text to the
transcript file, if any). But it does have a `@set_window 0;' near the
end.

--
Gareth Rees