Some time ago, Andy Piper wrote...
I'm guessing this is what Kirill is thinking of. We'll see -
Kirill is more
than capable of sorting it out :)
Ok, my model is as follows.
First, you create a printer *device*, which represents a connection to a
printer, CreateDC().
Next, you create a *frame* on that device, which represents a print job,
StartDoc(). Frame positioning on device surface determines printing margins,
among other factors.
The redisplay for the device is not performed automatically, redisplay()
just skips redisplay_device() for those devices. It is done rather by
(redisplay-frame) only.
A frame may contain one buffer, or we can create three horizontally layered
windows, for header and footer. It is a lisp code job, I do not care from
the C part. If modeline is not disabled from the lisp code, it will be printed.
If minibuffer is enabled, it will be printed. Just layout everything from the
lisp code, call (redisplay-frame), and one page goes out.
You then move the starting position of the window one windowfull down,
adjust page number if used, and call (redisplay-frame) again, to get to
the next page, all this from lisp.
Deleting the frame commits print job.
Deleting the device disconnects from the printer.
The architecture is not MS-Windows specific. Are there any X libraries which
treat paper surface just like window surface, to allow for WYSIWYG printing?
Comments?
Big K