]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfont.h
Minor code shuffle.
[lyx.git] / src / lyxfont.h
index 2309eab91789510d4db67e401837c14ccbb791d9..c690f19e3f33646a2870570da2da130fc819cf67 100644 (file)
@@ -5,7 +5,7 @@
  *           LyX, The Document Processor
  *      
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.   
+ *           Copyright 1995-2001 The LyX Team.   
  *
  * ====================================================== */
 
 #include <iosfwd>
 
 #include "LString.h"
-#include "language.h"
 #include "LColor.h"
-
-// It might happen that locale.h defines ON and OFF. This is not good
-// for us, since we use these names below. But of course this is due
-// to some old compilers. Than is broken when it comes to C++ scoping.
-#include "gettext.h" // so that we are sure tht it won't be included
-// later. 
-#ifdef ON
-#undef ON
-#endif
-
-#ifdef OFF
-#undef OFF
-#endif
+#include "language.h"
 
 class LyXLex;
 class BufferParams;
 
+
+#define NO_LATEX 1
+
 ///
 class LyXFont {
 public:
@@ -198,9 +188,10 @@ public:
        ///
        FONT_MISC_STATE noun() const;
 
+#ifndef NO_LATEX
        ///
        FONT_MISC_STATE latex() const;
-
+#endif
        ///
        FONT_MISC_STATE number() const;
 
@@ -230,8 +221,10 @@ public:
        LyXFont & setUnderbar(LyXFont::FONT_MISC_STATE u);
        ///
        LyXFont & setNoun(LyXFont::FONT_MISC_STATE n);
+#ifndef NO_LATEX
        ///
        LyXFont & setLatex(LyXFont::FONT_MISC_STATE l);
+#endif
        ///
        LyXFont & setNumber(LyXFont::FONT_MISC_STATE n);
        ///
@@ -342,8 +335,10 @@ private:
                FONT_MISC_STATE underbar;
                ///
                FONT_MISC_STATE noun;
+#ifndef NO_LATEX
                ///
                FONT_MISC_STATE latex;
+#endif
                ///
                FONT_MISC_STATE number;
        };
@@ -368,6 +363,55 @@ private:
                                         LyXFont::FONT_MISC_STATE org);
 };
 
+
+inline
+LyXFont::FONT_SHAPE LyXFont::shape() const
+{
+       return bits.shape;
+}
+
+
+inline
+LyXFont::LyXFont()
+       : bits(sane), lang(default_language)
+{}
+
+
+inline
+LyXFont::FONT_FAMILY LyXFont::family() const 
+{
+       return bits.family;
+}
+
+
+inline
+LyXFont::FONT_SERIES LyXFont::series() const
+{
+       return bits.series;
+}
+
+
+inline
+LyXFont::FONT_SIZE LyXFont::size() const
+{
+       return bits.size;
+}
+
+
+inline
+LyXFont::FONT_MISC_STATE LyXFont::emph() const
+{
+       return bits.emph;
+}
+
+
+inline
+LyXFont::FONT_MISC_STATE LyXFont::noun() const
+{
+       return bits.noun;
+}
+
+
 ///
 std::ostream & operator<<(std::ostream &, LyXFont::FONT_MISC_STATE);