]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrc.h
get rid of broken_header.h and some unneeded tests
[lyx.git] / src / lyxrc.h
index d9240392535b000a34642bd257d9b63a3284cf2a..5cd5bc34b6036bade70afe485349b330e78ae050 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,
@@ -118,6 +120,7 @@ enum LyXRCTags {
        RC_SHOW_BANNER,
        RC_WHEEL_JUMP,
        RC_CONVERTER,
+       RC_COPIER,
        RC_VIEWER,
        RC_FORMAT,
        RC_DEFAULT_LANGUAGE,
@@ -129,6 +132,7 @@ enum LyXRCTags {
        RC_USE_SPELL_LIB,
        RC_USER_NAME,
        RC_USER_EMAIL,
+       RC_INDEX_COMMAND,
        RC_LAST
 };
 
@@ -140,11 +144,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 +203,16 @@ 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;
+       /// command to run makeindex incl. options or other index programs
+       std::string index_command;
        ///
        std::string document_path;
        ///
@@ -206,8 +220,6 @@ enum LyXRCTags {
        ///
        std::string tempdir_path;
        ///
-       bool use_tempdir;
-       ///
        bool auto_region_delete;
        /// flag telling whether lastfiles should be checked for existance
        bool auto_reset_options;
@@ -347,7 +359,13 @@ enum LyXRCTags {
        ///
        bool show_banner;
        ///
-       bool preview;
+       enum PreviewStatus {
+               PREVIEW_OFF,
+               PREVIEW_NO_MATH,
+               PREVIEW_ON
+       };
+       ///
+       PreviewStatus preview;
        ///
        bool preview_hashed_labels;
        ///
@@ -358,6 +376,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;
 ///