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
18 This class contains (or should contain) all the parameters required for
19 printing a buffer. Some work still needs to be done on this class and
20 printing handling in general to make it nice and full-featured.
21 The main things I'd like to add now is the ability to print a read-only
22 document with different orientation, papersize or single/duplex state
23 than the document's settings. ARRae 20000423
37 std::string printer_name
;
39 std::string file_name
;
42 /** Print a page range. Both from_page and to_page used to be strings
43 because they're actually easier to work with that way. I've
44 switched to_page to be an int. However, from_page will remain a
45 string because I want the from_page field to be able to be used as
46 a page range "1,3-5" and so on.
47 I've modified the invariant test to match. ARRae 20000518
49 unsigned int from_page
;
57 unsigned int count_copies
;
62 // The settings below should allow us to print any read-only doc in
63 // whatever size/orientation we want it -- overriding the documents
65 // Override the documents orientation
67 // Print n pages per physical sheet
69 // Override document settings for duplex.
72 /** Test that all the fields contain valid entries. It's unlikely
73 that the internal code will get this wrong (at least for the
74 xforms code anyway) however new ports and external scripts
75 might drive the wrong values in.
77 void testInvariant() const;
79 PrinterParams(Target t
= PRINTER
,
80 std::string
const & pname
= lyxrc
.printer
,
81 std::string
const & fname
= std::string(),
83 unsigned int from
= 1,
87 unsigned int copies
= 1,
89 bool reverse
= false);
91 PrinterParams(PrinterParams
const & pp
);