]> git.lyx.org Git - lyx.git/blobdiff - src/bufferparams.h
add GuiView parent to QToc for proper memory management.
[lyx.git] / src / bufferparams.h
index 036a8efbca8b1ac0e6b62fc31cb466cfb0c89091..720526e9bcb7b3bc7c96d69d8e1305f02f7e1427 100644 (file)
@@ -23,6 +23,8 @@
 #include "support/copied_ptr.h"
 #include "support/types.h"
 
+#include "frontends/controllers/biblio.h"
+
 #include <vector>
 
 
@@ -40,25 +42,6 @@ class VSpace;
 class Language;
 
 
-namespace biblio {
-
-enum CiteEngine {
-       ENGINE_BASIC,
-       ENGINE_NATBIB_AUTHORYEAR,
-       ENGINE_NATBIB_NUMERICAL,
-       ENGINE_JURABIB
-};
-
-class CiteEngine_enum {
-       CiteEngine val_;
-public:
-       CiteEngine_enum(CiteEngine val) : val_(val) {}
-       operator CiteEngine() const{ return val_; }
-};
-
-} // namespace biblio
-
-
 /** Buffer parameters.
  *  This class contains all the parameters for this a buffer uses. Some
  *  work needs to be done on this class to make it nice. Now everything
@@ -178,12 +161,18 @@ public:
        BranchList const & branchlist() const;
        /**
         * The input encoding for LaTeX. This can be one of
-        * - auto: find out the input encoding from the used languages
-        * - default: Don't load the inputenc package and hope that it will
-        *   work (unlikely)
+        * - \c auto: find out the input encoding from the used languages
+        * - \c default: ditto
         * - any encoding supported by the inputenc package
         * The encoding of the LyX file is always utf8 and has nothing to
         * do with this setting.
+        * The difference between \c auto and \c default is that \c auto also
+        * causes loading of the inputenc package, while \c default does not.
+        * \c default will not work unless the user takes additional measures
+        * (such as using special environments like the CJK environment from
+        * CJK.sty).
+        * \c default can be seen as an unspecified 8bit encoding, since LyX
+        * does not interpret it in any way apart from display on screen.
         */
        std::string inputenc;
        /// The main encoding used by this buffer for LaTeX output.
@@ -234,8 +223,6 @@ public:
        /// Whether and how to load esint
        Package use_esint;
        ///
-       biblio::CiteEngine cite_engine;
-       ///
        bool use_bibtopic;
        /// revision tracking for this buffer ?
        bool trackChanges;
@@ -265,12 +252,17 @@ public:
        ///
        std::string const babelCall(std::string const & lang_opts) const;
        /// set up the document fonts
-       std::string const loadFonts(LaTeXFeatures & features, std::string const & rm,
+       std::string const loadFonts(std::string const & rm,
                                     std::string const & sf, std::string const & tt,
                                     bool const & sc, bool const & osf,
                                     int const & sfscale, int const & ttscale) const;
        /// path of the current buffer
        std::string filepath;
+       /// get the appropriate cite engine (natbib handling)
+       biblio::CiteEngine getEngine() const;
+
+       ///
+       void setCiteEngine(biblio::CiteEngine const);
 
 private:
        /** Use the Pimpl idiom to hide those member variables that would otherwise
@@ -283,6 +275,9 @@ private:
                static void destroy(Impl *);
        };
        support::copied_ptr<Impl, MemoryTraits> pimpl_;
+
+       ///
+       biblio::CiteEngine cite_engine_;
 };
 
 } // namespace lyx