]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfont.h
Fix small bug in reading \set_color in lyxrc
[lyx.git] / src / lyxfont.h
index 7bdd509f7cb3d1ba1ab4302d6398d06a4c526ee5..62e5da13f22ad8c3c589acdfa23533cc17cd60f0 100644 (file)
@@ -36,6 +36,7 @@
 #endif
 
 class LyXLex;
+class BufferParams;
 
 ///
 class LyXFont {
@@ -158,10 +159,13 @@ public:
        LyXFont(LyXFont const & x);
  
        /// Shortcut initialization
+       explicit
        LyXFont(LyXFont::FONT_INIT1);
        /// Shortcut initialization
+       explicit
        LyXFont(LyXFont::FONT_INIT2);
        /// Shortcut initialization
+       explicit
        LyXFont(LyXFont::FONT_INIT3);
        /// Shortcut initialization
        LyXFont(LyXFont::FONT_INIT1, Language const * l);
@@ -306,7 +310,7 @@ public:
                                 LyXFont const & next) const;
 
        /// Build GUI description of font state
-       string stateText() const;
+       string stateText(BufferParams * params) const;
 
        ///
        LColor::color realColor() const;
@@ -321,8 +325,7 @@ public:
        ///
        friend 
        bool operator!=(LyXFont const & font1, LyXFont const & font2) {
-               return font1.bits != font2.bits ||
-                       font1.lang != font2.lang;
+               return !(font1 == font2);
        }
 
        /// compares two fonts, ignoring the setting of the Latex part.
@@ -440,6 +443,7 @@ LyXFont::LyXFont(LyXFont::FONT_INIT3, Language const * l)
        lang = l;
 }
 
+
 inline
 LyXFont & LyXFont::operator=(LyXFont const & x) 
 {
@@ -522,14 +526,14 @@ Language const * LyXFont::language() const
 inline
 bool LyXFont::isRightToLeft() const 
 {
-       return lang->RightToLeft;
+       return lang->RightToLeft();
 }
 
 
 inline
 bool LyXFont::isVisibleRightToLeft() const 
 {
-       return (lang->RightToLeft && latex() != ON);
+       return (lang->RightToLeft() && latex() != ON);
 }