]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrc.h
fix reading the author field.
[lyx.git] / src / lyxrc.h
index 019aa61a901565af339a955d2263654901837486..e948e6489fcf8ec6ae1b56988da30fe1b677f23b 100644 (file)
 #include "paper.h"
 #include "graphics/GraphicsTypes.h"
 
+#include <iosfwd>
 #include <string>
 
+class LyXLex;
 
 /// This contains the runtime configuration of LyX
 class LyXRC //: public noncopyable {
@@ -87,7 +89,6 @@ enum LyXRCTags {
        RC_CHECKLASTFILES,
        RC_VIEWDVI_PAPEROPTION,
        RC_DEFAULT_PAPERSIZE,
-       RC_PS_COMMAND,
        RC_ACCEPT_COMPOUND,
        RC_SPELL_COMMAND,
        RC_USE_INP_ENC,
@@ -99,6 +100,7 @@ enum LyXRCTags {
        RC_PERS_DICT,
        RC_ESC_CHARS,
        RC_CHKTEX_COMMAND,
+       RC_BIBTEX_COMMAND,
        RC_CURSOR_FOLLOWS_SCROLLBAR,
        RC_DIALOGS_ICONIFY_WITH_MAIN,
        RC_MAKE_BACKUP,
@@ -140,11 +142,19 @@ enum LyXRCTags {
        ///
        int read(std::string const & filename);
        ///
-       void write(std::string const & filename) const;
+       int read(std::istream &);
+private:
        ///
-       void print() const;
+       int read(LyXLex &);
+public:
        ///
-       void output(std::ostream & os) const;
+       void write(std::string const & filename,
+                  bool ignore_system_lyxrc) const;
+       ///
+       void write(std::ostream & os,
+                  bool ignore_system_lyxrc) const;
+       ///
+       void print() const;
        ///
        static std::string const getDescription(LyXRCTags);
        ///
@@ -191,14 +201,14 @@ enum LyXRCTags {
        std::string custom_export_command;
        ///
        std::string custom_export_format;
-       /// postscript interpreter (in general "gs", if it is installed)
-       std::string ps_command;
        /// option for telling the dvi viewer about the paper size
        std::string view_dvi_paper_option;
        /// default paper size for local xdvi/dvips/ghostview/whatever
        PAPER_SIZE default_papersize;
        /// command to run chktex incl. options
        std::string chktex_command;
+       /// command to run bibtex incl. options
+       std::string bibtex_command;
        ///
        std::string document_path;
        ///
@@ -345,7 +355,13 @@ enum LyXRCTags {
        ///
        bool show_banner;
        ///
-       bool preview;
+       enum PreviewStatus {
+               PREVIEW_OFF,
+               PREVIEW_NO_MATH,
+               PREVIEW_ON
+       };
+       ///
+       PreviewStatus preview;
        ///
        bool preview_hashed_labels;
        ///
@@ -356,6 +372,19 @@ enum LyXRCTags {
        std::string user_email;
 };
 
+
+/** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
+ *  It can be forward-declared and passed as a function argument without
+ *  having to expose lyxrc.h.
+ */
+class LyXRC_PreviewStatus {
+        LyXRC::PreviewStatus val_;
+public:
+       LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
+        operator LyXRC::PreviewStatus() const{ return val_; }
+};
+
+
 ///
 extern LyXRC lyxrc;
 ///