]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrc.h
Change to use preffered calling of Boost.Function
[lyx.git] / src / lyxrc.h
index 6f17e49565b221da27c47e673f811570e39ab85e..e948e6489fcf8ec6ae1b56988da30fe1b677f23b 100644 (file)
@@ -355,7 +355,13 @@ public:
        ///
        bool show_banner;
        ///
-       bool preview;
+       enum PreviewStatus {
+               PREVIEW_OFF,
+               PREVIEW_NO_MATH,
+               PREVIEW_ON
+       };
+       ///
+       PreviewStatus preview;
        ///
        bool preview_hashed_labels;
        ///
@@ -366,6 +372,19 @@ public:
        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;
 ///