]> git.lyx.org Git - features.git/blobdiff - src/mathed/MathStream.h
Fix broken Apple speller interface
[features.git] / src / mathed / MathStream.h
index c2dadf243a59d5c09453042ddb01b8248392b74c..6d0399e4c8e2bca0b902caf2c16de4f4505a613d 100644 (file)
@@ -13,6 +13,7 @@
 #define MATH_MATHMLSTREAM_H
 
 #include "InsetMath.h"
+#include "FontInfo.h"
 
 #include "TexRow.h"
 #include "texstream.h"
@@ -37,7 +38,8 @@ public:
        enum OutputType {
                wsDefault,
                wsDryrun,
-               wsPreview
+               wsPreview,
+               wsSearchAdv
        };
        ///
        enum UlemCmdType {
@@ -106,7 +108,7 @@ public:
        /// tell whether to use only ascii chars when producing latex code
        bool asciiOnly() const { return ascii_; }
        /// tell whether we are in a MathClass inset
-       void inMathClass(bool mathclass) { mathclass_ = mathclass; };
+       void inMathClass(bool mathclass) { mathclass_ = mathclass; }
        /// tell whether we are in a MathClass inset
        bool inMathClass() const { return mathclass_; }
        /// LaTeX encoding
@@ -319,6 +321,18 @@ public:
        std::string attr_;
 };
 
+/// Start inline tag.
+class MTagInline {
+public:
+       ///
+       MTagInline(char const * const tag, std::string const & attr = std::string())
+               : tag_(tag), attr_(attr) {}
+       ///
+       char const * const tag_;
+       ///
+       std::string attr_;
+};
+
 
 /// End tag.
 class ETag {
@@ -330,6 +344,16 @@ public:
 };
 
 
+/// End inlinetag.
+class ETagInline {
+public:
+       ///
+       explicit ETagInline(char const * const tag) : tag_(tag) {}
+       ///
+       char const * const tag_;
+};
+
+
 /// Compound tag (no content, directly closed).
 class CTag {
 public:
@@ -380,6 +404,10 @@ public:
        std::string namespacedTag(std::string const & tag) const {
                return (xmlns().empty() ? "" : xmlns() + ":") + tag;
        }
+       /// Returns the current math style in the stream.
+       const MathStyle & getFontMathStyle() const { return font_math_style_; }
+       /// Returns the current math style in the stream.
+       void setFontMathStyle(const MathStyle style) { font_math_style_ = style; }
 private:
        ///
        void setTextMode(bool t) { in_text_ = t; }
@@ -397,6 +425,8 @@ private:
        std::string xmlns_;
        ///
        bool xml_mode_;
+       /// The only important part of a FontInfo object.
+       MathStyle font_math_style_;
        ///
        friend class SetMode;
 };
@@ -416,8 +446,12 @@ MathMLStream & operator<<(MathMLStream &, char_type);
 ///
 MathMLStream & operator<<(MathMLStream &, MTag const &);
 ///
+MathMLStream & operator<<(MathMLStream &, MTagInline const &);
+///
 MathMLStream & operator<<(MathMLStream &, ETag const &);
 ///
+MathMLStream & operator<<(MathMLStream &, ETagInline const &);
+///
 MathMLStream & operator<<(MathMLStream &, CTag const &);