]> git.lyx.org Git - lyx.git/blobdiff - src/Font.h
* ca/Intro.lyx from Daniel
[lyx.git] / src / Font.h
index 2cdd5c1f2e4fcae3ba7f50bc69378b8208844a05..b59f015eca7d9318deb5ec513f6755681c45e453 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef FONT_H
 #define FONT_H
 
-#include "ColorCode.h"
 #include "FontInfo.h"
 
 #include "support/strfwd.h"
@@ -27,13 +26,14 @@ class BufferParams;
 class Language;
 class LaTeXFeatures;
 class OutputParams;
+class otexstream;
 
 ///
 class Font {
 
 public:
        ///
-       explicit Font(FontInfo = sane_font, Language const * l = 0);
+       explicit Font(FontInfo = sane_font, Language const * l = nullptr);
 
        ///
        FontInfo & fontInfo() { return bits_; }
@@ -72,24 +72,27 @@ public:
            to this font. Returns number of chars written. Base is the
            font state active now.
        */
-       int latexWriteStartChanges(odocstream &, BufferParams const & bparams,
+       int latexWriteStartChanges(otexstream &, BufferParams const & bparams,
                                   OutputParams const & runparams,
                                   Font const & base,
-                                  Font const & prev) const;
+                                  Font const & prev,
+                                  bool non_inherit_inset = false,
+                                  bool needs_cprotection = false) const;
 
        /** Writes the tail of the LaTeX needed to change to this font.
            Returns number of chars written. Base is the font state we want
            to achieve.
        */
-       int latexWriteEndChanges(odocstream &, BufferParams const & bparams,
+       int latexWriteEndChanges(otexstream &, BufferParams const & bparams,
                                 OutputParams const & runparams,
                                 Font const & base,
                                 Font const & next,
-                                bool const & closeLanguage = true) const;
+                                bool & needPar,
+                                bool closeLanguage = true) const;
 
 
        /// Build GUI description of font state
-       docstring const stateText(BufferParams * params) const;
+       docstring const stateText(BufferParams * params = nullptr, bool const terse = false) const;
 
        ///
        void validate(LaTeXFeatures & features) const;
@@ -116,6 +119,9 @@ private:
        mutable bool open_encoding_;
 };
 
+///
+std::ostream & operator<<(std::ostream & os, FontInfo const & f);
+
 
 ///
 inline
@@ -131,11 +137,6 @@ bool operator!=(Font const & font1, Font const & font2)
        return !(font1 == font2);
 }
 
-/** Returns the current freefont, encoded as a std::string to be passed to the
- *  frontends. Implemented in Text3.cpp.
- */
-std::string const freefont2string();
-
 } // namespace lyx
 
 #endif