std-save-zoom, std-restore-zoom | ![]() |
These two complementing functions are used in error handling to save the current Zoom Window on init and restore the old state on restore.
STD-SAVE-ZOOM returns two points, which migh be a list or a UCS name and is usable for STD-RESTORE-ZOOM only. It is simply defined as:
(defun STD-SAVE-ZOOM () (std-zoom-pts))
But it could be also implemented as STD-VIEW-SAVE which would return a string of the temporary view name.
STD-RESTORE-ZOOM takes the object returned by STD-SAVE-ZOOM (currently a list of two points) and sets the zoom area according to this object. It is simply defined as:
(defun STD-RESTORE-ZOOM (zoom) (command "'_ZOOM" "_W" (car zoom) (cadr zoom)))
Both functions are normally used by the error handling pair (STD-VAR-INIT '((:ZOOM))) and (STD-VAR-RESTORE) resp. (STD-VAR-PUSH alist) and (STD-VAR-POP) if the ZOOM or PAN command is used inside the user function, to save and restore the old setting, esp. on user-breaks or errors.
(std-var-init '((:ZOOM))) ... (command "_ZOOM" "_C" pt "") ... (std-var-restore)
zoom-pts: a list of two points specifying the lower left and upper right corner of the actual view.
STD-SAVE-ZOOM returns a zoom object which is currently a list of two 2D points, see (STD-ZOOM-PTS)
The return value of STD-RESTORE-ZOOM is nil.
std-restore-zoom changes the current VIEW.
(std-require 'STDTBL)
Defined in STDTBL