X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMath.h;h=c872316abfbf5bc38613f991d9c0a562b8f9699b;hb=d9082639080b9de993742bd352f92e5183058cf5;hp=9a970c5839fe89c5f44078a5265495b3b6a02a38;hpb=6a21ec854b356fbbc89aaf99b2a23e4c3de4aca6;p=lyx.git diff --git a/src/mathed/InsetMath.h b/src/mathed/InsetMath.h index 9a970c5839..c872316abf 100644 --- a/src/mathed/InsetMath.h +++ b/src/mathed/InsetMath.h @@ -50,6 +50,15 @@ enum Limits { }; +/// The possible marker types for math insets +enum class marker_type : int { + NO_MARKER, + MARKER2, + MARKER, + BOX_MARKER +}; + + /** Abstract base class for all math objects. A math insets is for use of the @@ -95,8 +104,8 @@ class OctaveStream; class MapleStream; class MaximaStream; class MathematicaStream; -class MathStream; -class WriteStream; +class MathMLStream; +class TeXMathStream; class MathData; class InsetMathMacroTemplate; @@ -123,8 +132,6 @@ public: /// this is overridden by specific insets mode_type currentMode() const override { return MATH_MODE; } - // The possible marker types for math insets - enum marker_type { NO_MARKER, MARKER2, MARKER, BOX_MARKER }; /// this is overridden by insets with specific edit marker type virtual marker_type marker(BufferView const *) const; @@ -202,14 +209,14 @@ public: /// Whether the inset allows \(no)limits bool allowsLimitsChange() const { return mathClass() == MC_OP; } - /// The default limits value - virtual Limits defaultLimits() const { return NO_LIMITS; } + /// The default limits value depending on whether display mode is on + virtual Limits defaultLimits(bool /* display */) const { return NO_LIMITS; } /// whether the inset has limit-like sub/superscript virtual Limits limits() const { return AUTO_LIMITS; } /// sets types of sub/superscripts virtual void limits(Limits) {} /// write limits status for LaTeX and LyX code - void writeLimits(WriteStream & os) const; + void writeLimits(TeXMathStream & os) const; /// replace things by other things virtual void replace(ReplaceData &) {} @@ -224,7 +231,7 @@ public: // write(). This is to shut off a clang warning. using Inset::write; /// write LaTeX and LyX code - virtual void write(WriteStream & os) const; + virtual void write(TeXMathStream & os) const; /// write normalized content virtual void normalize(NormalStream &) const; /// write content as something readable by Maple @@ -234,7 +241,7 @@ public: /// write content as something readable by Mathematica virtual void mathematica(MathematicaStream &) const; /// write content as MathML - virtual void mathmlize(MathStream &) const; + virtual void mathmlize(MathMLStream &) const; /// write content as HTML, best we can. /// the idea for this, and some of the details, come from /// eLyXer, written by Alex Fernandez. no code is borrowed. rather,