Uncommon Knowledge - WC_VWindow%
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Sprezzatura Ltd | 01 APR 1992 | 2.11+ | EXPERT | WINDOW_COMMON%, WC_VWINDOW%, VSPACE, VIDEO.RW, VIRTUAL.PARAMS |
The Vspace image of the current window. Note that this image does not contain the border of the window. Note further that in the case of table mode, the box image will be included (although not that of the heading which is in Vhead q.v.). As a VSpace image may conceivably be wider than the physical screen it cannot normally be manipulated for use by Video.Rw per VPrev but it can be directly updated using Vspace calls.
Thus for example, if it was wished to provide the user with a softkey which showed the current prompt width and then at a keypress returned to the screen, one could use a code fragment such as the sample below which uses VSpace to save off whatever is currently displayed on screen using a VSave call, displays a string of * as long as Vsp_Len then waits for a keypress. At a keypress it restores the image saved by the VSave call using a VRstr call.
Subroutine Display_Length $Insert Include, Window_Common% $Insert Include, Virtual.Params Declare Subroutine VSpace Win = WC_VWindow% ; X = WC_Vsp_VX% Y = WC_Vsp_VY% ; Len = WC_Vsp_VLen% * Firstly save what is on screen already VSpace(VSave,OK,Win,X,Y,X+Len,Y,Img) * Now put up the length mask VSpace(VPrnt,OK,Win,X,Y,Str("*",Len)) * Wait for a keypress Call Input.Char(Dummy) * Now restore the old screen image VSpace(VRSTR,OK,Win,X,Y,X+Len,Y,Img) Return
(Volume 3, Issue 10, Page 15)