]> git.lyx.org Git - lyx.git/blobdiff - src/PrinterParams.h
Merge branch 'master' of git.lyx.org:lyx
[lyx.git] / src / PrinterParams.h
index 8ce49bf5db20ccda8b30023ee0e66a33bcb561fe..73b10c368ccb50ff178a7120f8148f3b83af7592 100644 (file)
 #ifndef PRINTERPARAMS_H
 #define PRINTERPARAMS_H
 
-#include "lyxrc.h"
+#include <string>
+
+
+namespace lyx {
 
 /**
-  This struct contains (or should contain) all the parameters required for
-  printing a buffer.  Some work still needs to be done on this struct and
+  This class contains (or should contain) all the parameters required for
+  printing a buffer.  Some work still needs to be done on this class and
   printing handling in general to make it nice and full-featured.
   The main things I'd like to add now is the ability to print a read-only
   document with different orientation, papersize or single/duplex state
   than the document's settings. ARRae 20000423
 */
-struct PrinterParams {
+class PrinterParams
+{
+public:
+       ///
+       PrinterParams();
+
        ///
        enum Target {
                ///
@@ -30,12 +38,20 @@ struct PrinterParams {
                ///
                FILE
        };
+
+       /** Test that all the fields contain valid entries.  It's unlikely
+           that the internal code will get this wrong however new ports
+           and external scripts might drive the wrong values in.
+        */
+       void testInvariant() const;
+
+public:
        ///
        Target target;
        ///
-       string printer_name;
+       std::string printer_name;
        ///
-       string file_name;
+       std::string file_name;
        ///
        bool all_pages;
        /** Print a page range. Both from_page and to_page used to be strings
@@ -68,26 +84,9 @@ struct PrinterParams {
        // Override document settings for duplex.
        // bool duplex;
 
-       /** Test that all the fields contain valid entries.  It's unlikely
-           that the internal code will get this wrong (at least for the
-           xforms code anyway) however new ports and external scripts
-           might drive the wrong values in.
-        */
-       void testInvariant() const;
-       ///
-       PrinterParams(Target t = PRINTER,
-                     string const & pname = lyxrc.printer,
-                     string const & fname = string(),
-                     bool all = true,
-                     unsigned int from = 1,
-                     unsigned int to = 0,
-                     bool odd = true,
-                     bool even = true,
-                     unsigned int copies = 1,
-                     bool sorted = false,
-                     bool reverse = false);
-       ///
-       PrinterParams(PrinterParams const & pp);
 };
 
+
+} // namespace lyx
+
 #endif