]> 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 71894683e030766da7af49a4ab149ddc74ca9d4e..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 {
@@ -98,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,
@@ -117,6 +120,7 @@ enum LyXRCTags {
        RC_SHOW_BANNER,
        RC_WHEEL_JUMP,
        RC_CONVERTER,
+       RC_COPIER,
        RC_VIEWER,
        RC_FORMAT,
        RC_DEFAULT_LANGUAGE,
@@ -128,6 +132,7 @@ enum LyXRCTags {
        RC_USE_SPELL_LIB,
        RC_USER_NAME,
        RC_USER_EMAIL,
+       RC_INDEX_COMMAND,
        RC_LAST
 };
 
@@ -139,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);
        ///
@@ -196,6 +209,10 @@ enum LyXRCTags {
        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;
        ///
@@ -342,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;
        ///
@@ -353,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;
 ///