]> git.lyx.org Git - features.git/blobdiff - src/BufferParams.h
Fix bug 3522.
[features.git] / src / BufferParams.h
index c147290058bfc3515580e5209dd22c24658349ed..11049c3380f1da54579c12aac0c51a4e5ca66043 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef BUFFERPARAMS_H
 #define BUFFERPARAMS_H
 
-#include "LyXTextClass.h"
+#include "TextClass.h"
 #include "paper.h"
 
 #include "insets/InsetQuotes.h"
@@ -34,7 +34,7 @@ class AuthorList;
 class BranchList;
 class Bullet;
 class Encoding;
-class LyXLex;
+class Lexer;
 class LatexFeatures;
 class Spacing;
 class TexRow;
@@ -60,8 +60,11 @@ public:
        BufferParams();
        ~BufferParams();
 
+       /// get l10n translated to the buffers language
+       docstring const B_(std::string const & l10n) const;
+
        /// read a header token, if unrecognised, return it or an unknown class name
-       std::string const readToken(LyXLex & lex, std::string const & token);
+       std::string const readToken(Lexer & lex, std::string const & token);
 
        ///
        void writeFile(std::ostream &) const;
@@ -97,10 +100,10 @@ public:
        ///
        textclass_type textclass;
        ///
-       LyXTextClass const & getLyXTextClass() const;
+       TextClass const & getTextClass() const;
 
        /// returns the main font for the buffer (document)
-       LyXFont const getFont() const;
+       Font const getFont() const;
 
        /* this are for the PaperLayout */
        /// the papersize
@@ -186,8 +189,10 @@ public:
        std::string float_placement;
        ///
        unsigned int columns;
+       /// parameters for the listings package
+       std::string listings_params;
        ///
-       LyXTextClass::PageSides sides;
+       TextClass::PageSides sides;
        ///
        std::string pagestyle;
        /// \param index should lie in the range 0 <= \c index <= 3.
@@ -197,15 +202,15 @@ public:
        Bullet & user_defined_bullet(size_type index);
        Bullet const & user_defined_bullet(size_type index) const;
        ///
-       void readPreamble(LyXLex &);
+       void readPreamble(Lexer &);
        ///
-       void readLanguage(LyXLex &);
+       void readLanguage(Lexer &);
        ///
-       void readGraphicsDriver(LyXLex &);
+       void readGraphicsDriver(Lexer &);
        ///
-       void readBullets(LyXLex &);
+       void readBullets(Lexer &);
        ///
-       void readBulletsLaTeX(LyXLex &);
+       void readBulletsLaTeX(Lexer &);
 
        /// Whether to load a package such as amsmath or esint.
        /// The enum values must not be changed (file format!)
@@ -226,12 +231,9 @@ public:
        bool use_bibtopic;
        /// revision tracking for this buffer ?
        bool trackChanges;
-       /** This param decides whether change tracking marks should be output
-        *  (using the dvipost package) or if the current "state" of the
-        *  document should be output instead. Since dvipost needs dvi
-        *  specials, it only works with dvi/ps output (the param will be
-        *  ignored with other output flavors and disabled when dvipost is
-        *  not installed).
+       /** This param decides whether change tracking marks should be used
+        *  in output (irrespective of how these marks are actually defined;
+        *  for instance, they may differ for DVI and PDF generation)
         */
        bool outputChanges;
        /// Time ago we agreed that this was a buffer property [ale990407]
@@ -249,8 +251,11 @@ public:
        std::string const dvips_options() const;
        ///
        std::string const paperSizeName() const;
-       ///
+       /// set up if and how babel is called
        std::string const babelCall(std::string const & lang_opts) const;
+       /// handle inputenc etc.
+       docstring const writeEncodingPreamble(LaTeXFeatures & features,
+                                             TexRow & texrow) const;
        /// set up the document fonts
        std::string const loadFonts(std::string const & rm,
                                     std::string const & sf, std::string const & tt,