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

Re: window-hardcopy for 'window

Greg Wilcox (wilcox@cmns.think.com) writes:
  Does anyone have a definition for the following function?
 (defmethod window-hardcopy ((self window) &optional (print-dialog? t))

You're in luck. I spent some time developing a general set of printing
utilities. Bill St. Clair and Steve Mitchell both helped me to
get the code not to hang.  The code can run with MCL 2.0b1p3 and
MCL2.0f3.  The code is in
The code supports printing various objects, including windows,
pictures, and generalized documents.

I've tested the code by producing both hardcopy (on a QMS laser printer)
and Post Script files. I have not tested it on other printers at
other settings. 

You're welcome to use the code and "debug" it for me, since Bill
St. Clair is swamped.


The following is extracted from the documentation in the

 The following methods and functions are exported:
        picture-hardcopy   for quickdraw pictures
        print-contents     for drawing the nested views of a window
        get-printer-error  for returning the error condition or nil (no error)

 Internal (unexported) routines of interest
        document-hardcopy  for printing a general document
        window-hardcopy    for printing the contents of a window using

With this package you can print a picture by
   (picture-hardcopy a-picture-handle)
To print the contents of a window:
    (print-contents window)
    or select the window and issue the File menu Print command

Print-contents supports the following types of views:
    window                    - draws a box around the content area
                                of the window and prints the contents
                                of the subviews.

    static-text-dialog-item   - draws a box around the item
                                and prints the text with the view font

    editable-text-dialog-item - draws a box around the item
                                and prints the text with the view font

    button-dialog-item        - draws the button and the text within

    view                      - prints the contents of the subviews

    sv                        - does nothing