3 * \file PrinterParams.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef PRINTERPARAMS_H
13 #define PRINTERPARAMS_H
21 This class contains (or should contain) all the parameters required for
22 printing a buffer. Some work still needs to be done on this class and
23 printing handling in general to make it nice and full-featured.
24 The main things I'd like to add now is the ability to print a read-only
25 document with different orientation, papersize or single/duplex state
26 than the document's settings. ARRae 20000423
40 std::string printer_name;
42 std::string file_name;
45 /** Print a page range. Both from_page and to_page used to be strings
46 because they're actually easier to work with that way. I've
47 switched to_page to be an int. However, from_page will remain a
48 string because I want the from_page field to be able to be used as
49 a page range "1,3-5" and so on.
50 I've modified the invariant test to match. ARRae 20000518
52 unsigned int from_page;
60 unsigned int count_copies;
65 // The settings below should allow us to print any read-only doc in
66 // whatever size/orientation we want it -- overriding the documents
68 // Override the documents orientation
70 // Print n pages per physical sheet
72 // Override document settings for duplex.
75 /** Test that all the fields contain valid entries. It's unlikely
76 that the internal code will get this wrong however new ports
77 and external scripts might drive the wrong values in.
79 void testInvariant() const;
81 PrinterParams(Target t = PRINTER,
82 std::string const & pname = lyxrc.printer,
83 std::string const & fname = std::string(),
85 unsigned int from = 1,
89 unsigned int copies = 1,
91 bool reverse = false);
93 PrinterParams(PrinterParams const & pp);