]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDecoration.h
Revert "Fix a number of signedness warnings"
[lyx.git] / src / mathed / InsetMathDecoration.h
index 22c9f9bed35379aa4671860ae7cc195e90fe8cfe..78f01a8207bc07fce67864d1adbfc1b760fb6766 100644 (file)
@@ -26,26 +26,35 @@ public:
        ///
        explicit InsetMathDecoration(Buffer * buf, latexkeys const * key);
        ///
-       void draw(PainterInfo &, int x, int y) const;
+       mode_type currentMode() const override;
        ///
-       void write(WriteStream & os) const;
+       void draw(PainterInfo &, int x, int y) const override;
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       void write(WriteStream & os) const override;
        ///
-       void normalize(NormalStream & os) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       void infoize(odocstream & os) const;
+       void normalize(NormalStream & os) const override;
        ///
-       bool isScriptable() const;
+       void infoize(odocstream & os) const override;
        ///
-       void validate(LaTeXFeatures & features) const;
+       MathClass mathClass() const override;
+       /// The default limits value
+       Limits defaultLimits() const override { return allowsLimitsChange() ? LIMITS : NO_LIMITS; }
+       /// whether the inset has limit-like sub/superscript
+       Limits limits() const override { return limits_; }
+       /// sets types of sub/superscripts
+       void limits(Limits lim) override { limits_ = lim; }
        ///
-       InsetCode lyxCode() const { return MATH_DECORATION_CODE; }
+       void validate(LaTeXFeatures & features) const override;
        ///
-       void mathmlize(MathStream &) const;
-
+       InsetCode lyxCode() const override { return MATH_DECORATION_CODE; }
+       ///
+       void mathmlize(MathStream &) const override;
+       ///
+       void htmlize(HtmlStream &) const override;
 private:
-       virtual Inset * clone() const;
+       Inset * clone() const override;
        ///
        bool upper() const;
        ///
@@ -55,12 +64,15 @@ private:
 
        ///
        latexkeys const * key_;
+       ///
+       Limits limits_ = AUTO_LIMITS;
+       // FIXME: this should depend on BufferView
        /// height cache of deco
-       mutable int dh_;
+       mutable int dh_ = 0;
        /// vertical offset cache of deco
-       mutable int dy_;
+       mutable int dy_ = 0;
        /// width for non-wide deco
-       mutable int dw_;
+       mutable int dw_ = 0;
 };
 
 } // namespace lyx