[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New version of print-u

I've uploaded a new version of print-u.lisp in binhex format
at cambridge.apple.com in:
Print-u supports generalized printing routines for 
windows, pictures and other objects. 

The previous version supported only two print styles:
one for fred windows and one for all other objects.
The new version contains support for private print records
which contain the printing style for an object.

With the new version you can associate a different print style
with each window and print the window using that style
without changing the Page Setup attributes.

Since the print style attributes for fred-windows are saved with the file,
the print style will be reloaded when the file is reloaded
and will not affect other windows.

;; NOTE: Every window has a private print record which controls the
;;       way the window will be printed and the attributes in the
;;       print-style-dialog box. The private print record is stored in the
;;       resource fork of the file when it is saved (:type :prec :resource-d 128)
;;       and when the Page Setup method is selected.
;;       The private print record is restored when the file is edited again.
;;       Every specific view uses the private print record of the outermost
;;       view containing the specific view.
;;       A private print record of a window is saved when the window
;;       is saved (using Save, Save As, or Save Copy As and when the
;;       window is closed and needs to be saved. Methods are defined
;;       for fred windows.
;;       For all other windows, you must provide a method for saving
;;       the file (ccl::window-save using ccl::window-file-save which
;;       must return the pathname) and a method for (view-file-name window)
;;       When a titled fred-window is saved (using the file menu
;;       items "save", "Save As ..." "Save Copy As..."), the page 
;;       setup attributes are saved in a print record in the file. 
;;       The record is placed in the :prec resource with id 128.  
;;       When the file is reopened in a fred-window, the page setup 
;;       attributes are restored.
;;       Every other object uses a shared, public print record *print-hc-prec*.
;;       This print record is initialized at the beginning of a session.