]> git.lyx.org Git - lyx.git/blobdiff - src/FontInfo.h
Remove undisclosed imports (from xxx import *)
[lyx.git] / src / FontInfo.h
index 696e64db47b2ce69af842ee3b0c0019bdbc818da..bd0f125a7a594eb3285b2392b258fdfbc5fe05b3 100644 (file)
@@ -25,7 +25,7 @@
 
 namespace lyx {
 
-class Lexer;
+namespace support { class Lexer; }
 
 ///
 class FontInfo
@@ -39,6 +39,7 @@ public:
                FontSeries series,
                FontShape  shape,
                FontSize   size,
+               MathStyle  style,
                ColorCode  color,
                ColorCode  background,
                FontState  emph,
@@ -51,7 +52,7 @@ public:
                FontState  number,
                FontState  nospellcheck)
                : family_(family), series_(series), shape_(shape), size_(size),
-               style_(LM_ST_TEXT), color_(color), background_(background), emph_(emph),
+               style_(style), color_(color), background_(background), emph_(emph),
                underbar_(underbar), strikeout_(strikeout), xout_(xout), uuline_(uuline),
                uwave_(uwave), noun_(noun), number_(number), nospellcheck_(nospellcheck)
        {}
@@ -128,7 +129,8 @@ public:
                if (noun_ == FONT_ON)
                        return SMALLCAPS_SHAPE;
                if (emph_ == FONT_ON)
-                       return (shape_ == ITALIC_SHAPE) ? UP_SHAPE : ITALIC_SHAPE;
+                       return (shape_ == ITALIC_SHAPE || shape_ == SLANTED_SHAPE)
+                               ? UP_SHAPE : ITALIC_SHAPE;
                return shape_;
        }
 
@@ -160,6 +162,9 @@ public:
        /// \param realize the \param font against the current FontInfo.
        Changer change(FontInfo font, bool realize = false);
 
+       /// Build GUI description of font state
+       docstring const stateText(bool const terse = false) const;
+
 private:
        friend bool operator==(FontInfo const & lhs, FontInfo const & rhs);
 
@@ -206,6 +211,7 @@ inline bool operator==(FontInfo const & lhs, FontInfo const & rhs)
                && lhs.series_ == rhs.series_
                && lhs.shape_ == rhs.shape_
                && lhs.size_ == rhs.size_
+               && lhs.style_ == rhs.style_
                && lhs.color_ == rhs.color_
                && lhs.background_ == rhs.background_
                && lhs.emph_ == rhs.emph_
@@ -251,7 +257,7 @@ void setLyXColor(std::string const &, FontInfo &);
 FontState setLyXMisc(std::string const &);
 
 /// Read a font specification from Lexer. Used for layout files.
-FontInfo lyxRead(Lexer &, FontInfo const & fi = sane_font);
+FontInfo lyxRead(support::Lexer &, FontInfo const & fi = sane_font);
 
 /// Write a font specification. Used for layout files.
 void lyxWrite(std::ostream &, FontInfo const &, std::string const &, int);