]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathStream.h
This patch does two closely related things.
[lyx.git] / src / mathed / MathStream.h
index ad1baada353dcd214b682442db7def4527a3a0d2..479e9d459e8e931cad9d749aab1b047ddbc2a566 100644 (file)
 #ifndef MATH_MATHMLSTREAM_H
 #define MATH_MATHMLSTREAM_H
 
-#include "support/strfwd.h"
-
 #include "InsetMath.h"
-// FIXME: Move to individual insets
-#include "MetricsInfo.h"
+#include "texstream.h"
+
+#include "support/Changer.h"
+#include "support/strfwd.h"
 
 
 namespace lyx {
@@ -39,10 +39,9 @@ public:
                wsPreview
        };
        ///
-       WriteStream(odocstream & os, bool fragile, bool latex, OutputType output,
-               Encoding const * encoding = 0);
-       ///
-       explicit WriteStream(odocstream & os);
+       explicit WriteStream(otexrowstream & os, bool fragile = false,
+                            bool latex = false, OutputType output = wsDefault,
+                            Encoding const * encoding = 0);
        ///
        ~WriteStream();
        ///
@@ -54,7 +53,9 @@ public:
        ///
        OutputType output() const { return output_; }
        ///
-       odocstream & os() { return os_; }
+       otexrowstream & os() { return os_; }
+       ///
+       TexRow & texrow() { return os_.texrow(); }
        ///
        bool & firstitem() { return firstitem_; }
        ///
@@ -85,9 +86,15 @@ public:
        bool asciiOnly() const { return ascii_; }
        /// LaTeX encoding
        Encoding const * encoding() const { return encoding_; }
+
+       /// Temporarily change the TexRow information about the outer row entry.
+       Changer changeRowEntry(TexRow::RowEntry entry);
+       /// TexRow::starts the innermost outer math inset
+       /// returns true if the outer row entry will appear at this line
+       bool startOuterRow();
 private:
        ///
-       odocstream & os_;
+       otexrowstream & os_;
        /// do we have to write \\protect sometimes
        bool fragile_;
        /// are we at the beginning of an MathData?
@@ -112,6 +119,8 @@ private:
        int line_;
        ///
        Encoding const * encoding_;
+       /// Row entry we are in
+       TexRow::RowEntry row_entry_;
 };
 
 ///