QPTR how to save a window's contents

Anything QL Software or Programming Related.
Post Reply
User avatar
RalfR
QL Wafer Drive
Posts: 1177
Joined: Fri Jun 15, 2018 8:58 pm

QPTR how to save a window's contents

Post 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?


7000 4E75
User avatar
Artificer
Trump Card
Posts: 156
Joined: Fri Nov 24, 2017 8:43 am

Re: QPTR how to save a window's contents

Post 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.


User avatar
RalfR
QL Wafer Drive
Posts: 1177
Joined: Fri Jun 15, 2018 8:58 pm

Re: QPTR how to save a window's contents

Post 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


7000 4E75
Post Reply