X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBufferParams.h;h=2c4828e1c48ecae4a03a6813da4ce6f1579940cf;hb=1744b6f9edc58a938da97facc3164d623809d2a3;hp=386ef5739b3e314a332173a22d0fc2eeb7a2a4c5;hpb=f27d5aa9ae5f3f89c4e2923dae1592a116988906;p=lyx.git diff --git a/src/BufferParams.h b/src/BufferParams.h index 386ef5739b..2c4828e1c4 100644 --- a/src/BufferParams.h +++ b/src/BufferParams.h @@ -16,7 +16,9 @@ #define BUFFERPARAMS_H #include "Citation.h" +#include "Format.h" #include "LayoutModuleList.h" +#include "OutputParams.h" #include "paper.h" #include "insets/InsetQuotes.h" @@ -24,6 +26,7 @@ #include "support/copied_ptr.h" #include +#include namespace lyx { @@ -82,7 +85,7 @@ public: * the BufferParams, a LyXRC variable, and the document class). * This returned value can then be passed to the insets... */ - bool writeLaTeX(odocstream &, LaTeXFeatures &, TexRow &, + bool writeLaTeX(otexstream &, LaTeXFeatures &, support::FileName const &) const; /// @@ -153,6 +156,29 @@ public: /// Clear the removed module list void clearRemovedModules() { removed_modules_.clear(); } + /// returns \c true if the buffer contains a LaTeX document + bool isLatex() const; + /// returns \c true if the buffer contains a DocBook document + bool isDocBook() const; + /// returns \c true if the buffer contains a Wed document + bool isLiterate() const; + + /// return the format of the buffer on a string + std::string bufferFormat() const; + /// return the default output format of the current backend + std::string getDefaultOutputFormat() const; + /// return the output flavor of \p format or the default + OutputParams::FLAVOR getOutputFlavor( + std::string const format = std::string()) const; + /// + bool isExportable(std::string const & format) const; + /// + std::vector exportableFormats(bool only_viewable) const; + /// + bool isExportableFormat(std::string const & format) const; + /// + std::vector backends() const; + /// List of included children (for includeonly) std::list const & getIncludedChildren() const { return included_children_; } @@ -367,8 +393,7 @@ public: /// return supported drivers for specific packages docstring getGraphicsDriver(std::string const & package) const; /// handle inputenc etc. - void writeEncodingPreamble(odocstream & os, LaTeXFeatures & features, - TexRow & texrow) const; + void writeEncodingPreamble(otexstream & os, LaTeXFeatures & features) const; /// std::string const parseFontName(std::string const & name) const; /// set up the document fonts @@ -406,6 +431,8 @@ public: std::string html_latex_start; /// std::string html_latex_end; + /// + bool html_css_as_file; /// generate output usable for reverse/forward search bool output_sync; /// custom LaTeX macro from user instead our own @@ -413,6 +440,10 @@ public: /// use refstyle? or prettyref? bool use_refstyle; + /// Return true if language could be set to lang, + /// otherwise return false and do not change language + bool setLanguage(std::string const & lang); + private: /// void readPreamble(Lexer &); @@ -432,6 +463,10 @@ private: void readRemovedModules(Lexer &); /// void readIncludeonly(Lexer &); + /// A cache for the default flavors + typedef std::map DefaultFlavorCache; + /// + mutable DefaultFlavorCache default_flavors_; /// for use with natbib CiteEngine cite_engine_; ///