Page 1 of 1

QPTR how to save a window's contents

Posted: Sun Aug 25, 2024 12:08 pm
by RalfR
I have read through some of the manual, but I don't understand everything:

The question may seem naive: How do I save a window and retrieve the contents again? There is the "WREST" command, but there is no "WSAVE" command, although the "IOP.WSAV" trap exists, if I have understood correctly. Can I do all this via "OUTLN"?

If so, how?

Re: QPTR how to save a window's contents

Posted: Sun Aug 25, 2024 3:40 pm
by Artificer
When a program's window definition has been created and pulled down using DR_PPOS#ch,window_definition or DR_PULD window_definition the area of the screen covered by the opened window is saved by WMAN.

When the window is moved or resized using WMAN , the screen area hidden behind the opened window is restored where appropriate by WMAN when using CH_WIN

When a pogram's subwindow has been opened using DR_PPOS#ch,window_definition and then closed and discarded using DR_UNST window_definition, WREST#ch can be used to restore the main screen area of the program that has been hidden by the sub window.

Similarly if you are not using a window definition with DR_PPOS or DR_PULD but OUTLN#ch command in SBASIC creates a managed window so stores a copy of the area outlined and so what was covered by the window can be restored on screen using WREST#ch.

Thats only how I understand it and have used with the QPTR toolkit, but probably not a complete explanation.

Re: QPTR how to save a window's contents

Posted: Sun Aug 25, 2024 4:02 pm
by RalfR
Artificer wrote: Sun Aug 25, 2024 3:40 pmSimilarly if you are not using a window definition with DR_PPOS or DR_PULD but OUTLN#ch command in SBASIC creates a managed window so stores a copy of the area outlined and so what was covered by the window can be restored on screen using WREST#ch.

Thats only how I understand it and have used with the QPTR toolkit, but probably not a complete explanation.
Thank you, that works.
I just want to use the Pointer I/F, not the Window Manager.

Test program:

10 OPEN#4,con_
20 OUTLN#4,400,100,100,100,5,5
30 PAPER#4,4: CLS#4
40 PAUSE 200
50 WREST#4
60 CLOSE#4