Fellow TeXmac'ers,
I've committed the necessary files and changes for the new printer_widget.
It needs testing and opinions. Basically I created a new qt_widget_rep wich
displays a dialog, trying to use the options currently set from within
TeXmacs, then reading what the user did back into TeXmacs after the dialog
closes. Then it calls either the ps/pdf renderer to print to file if the
user so chose, or the system printing_cmd. The latter isn't yet quite
finished because I need to look into the docs of the relevant command line
tools (i.e. lpr). Besides, I have no printer here in Munich (I just moved)
so I can't really test (though that shouldn't be a problem, I reckon). I
woud love to hear your comments on the following issues:
1. The DPI setting as returned by the OS is in my case always 72 and the
user can't change that in the dialog, so that gets ignored and we use the
value set within TeXmacs.
2. There's currently a bit of a mess, I think, with where the parameters
come from. I've written a small container "PrinterSettings" which could
be put somewhere other than in the Qt directory where it is now and then be
used (with modifications, it's current a bit Qt-centric) by all the
printing-related subsystems. Incidentally, I'd then get to know what are and
what mean all the parameters, so I could try to fine-tune.
3. Multiple copies and collation are not implemented. If I may tinker a
bit with editor_main_rep::print(), I could fix that.
4. I had to add a new slot_id in message.hpp to read the configuration
from the printer_widget. I called it SLOT_PRINTER_SETTINGS. Is that ok?
It's #ifdef'ed out, just in case.
5. I couldn't get me to read all the memory management code, so I don't
really know who's deleting the widget I built with
tm_new<qt_printer_widget_rep>(blabla). I understand there's reference
counting by the non-_rep classes (or was it the other way around) but
still, please give me some pointers (he) so I don't leak memory.
6. I have no acces to Windows machines here and know next to nothing
about their OS. How do I send a file to the printer? Straight out of google
comes that copy /b "filename".ps "lpt1" or copy -b "filename.ext"
..... > \\{your system network name}\{USB printer shared name}might do
the trick...
Best regards,
________________
Miguel de Benito.
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev