]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathFrac.h
g-brief loads babel internally. So don't load it ourselves.
[lyx.git] / src / mathed / InsetMathFrac.h
index 96b62930ba1ef1b3d845d24dab80f16a8d80f3cd..c2427ec76496f59ebc602b1eb69fc7892abbf8a0 100644 (file)
@@ -25,15 +25,17 @@ public:
        ///
        InsetMathFracBase(Buffer * buf, idx_type ncells = 2);
        ///
-       bool idxUpDown(Cursor &, bool up) const;
+       marker_type marker(BufferView const *) const override { return marker_type::MARKER2; }
        ///
-       bool idxBackward(Cursor &) const { return false; }
+       bool idxUpDown(Cursor &, bool up) const override;
        ///
-       bool idxForward(Cursor &) const { return false; }
+       bool idxBackward(Cursor &) const override { return false; }
        ///
-       InsetMathFracBase * asFracBaseInset() { return this; }
+       bool idxForward(Cursor &) const override { return false; }
        ///
-       InsetMathFracBase const * asFracBaseInset() const { return this; }
+       InsetMathFracBase * asFracBaseInset() override { return this; }
+       ///
+       InsetMathFracBase const * asFracBaseInset() const override { return this; }
 };
 
 
@@ -44,6 +46,7 @@ public:
        ///
        enum Kind {
                FRAC,
+               AASTEX_CASE,
                CFRAC,
                CFRACLEFT,
                CFRACRIGHT,
@@ -58,43 +61,46 @@ public:
        ///
        explicit InsetMathFrac(Buffer * buf, Kind kind = FRAC, idx_type ncells = 2);
        ///
-       bool idxForward(Cursor &) const;
+       bool idxForward(Cursor &) const override;
        ///
-       bool idxBackward(Cursor &) const;
+       bool idxBackward(Cursor &) const override;
        ///
-       MathClass mathClass() const;
+       MathClass mathClass() const override;
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       void draw(PainterInfo &, int x, int y) const;
+       void draw(PainterInfo &, int x, int y) const override;
        ///
-       void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
+       void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override;
        ///
-       void drawT(TextPainter &, int x, int y) const;
+       void drawT(TextPainter &, int x, int y) const override;
        /// identifies FracInsets
-       InsetMathFrac * asFracInset();
+       InsetMathFrac * asFracInset() override;
        /// identifies FracInsets
-       InsetMathFrac const * asFracInset() const;
+       InsetMathFrac const * asFracInset() const override;
        ///
-       docstring name() const;
+       docstring name() const override;
        ///
-       bool extraBraces() const;
+       bool extraBraces() const override;
        ///
-       void write(WriteStream & os) const;
+       void write(TeXMathStream & os) const override;
        ///
-       void maple(MapleStream &) const;
+       void maple(MapleStream &) const override;
        ///
-       void mathematica(MathematicaStream &) const;
+       void mathematica(MathematicaStream &) const override;
        ///
-       void octave(OctaveStream &) const;
+       void octave(OctaveStream &) const override;
        ///
-       void mathmlize(MathStream &) const;
+       void mathmlize(MathMLStream &) const override;
        ///
-       void htmlize(HtmlStream &) const;
+       void htmlize(HtmlStream &) const override;
        ///
-       void validate(LaTeXFeatures & features) const;
-public:
-       Inset * clone() const;
+       void validate(LaTeXFeatures & features) const override;
+private:
+       /// vertical displacement
+       int dy(FontInfo & fi) const;
+       ///
+       Inset * clone() const override;
        ///
        Kind kind_;
 };
@@ -116,30 +122,27 @@ public:
        ///
        explicit InsetMathBinom(Buffer * buf, Kind kind = BINOM);
        ///
-       void write(WriteStream & os) const;
+       void write(TeXMathStream & os) const override;
        ///
-       void normalize(NormalStream &) const;
+       void normalize(NormalStream &) const override;
        /// Generalized fractions are of inner class (see The TeXbook, p.292)
-       MathClass mathClass() const { return MC_INNER; }
+       MathClass mathClass() const override { return MC_INNER; }
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       void draw(PainterInfo &, int x, int y) const;
-       /// draw decorations.
-       void drawDecoration(PainterInfo & pi, int x, int y) const
-       { drawMarkers2(pi, x, y); }
+       void draw(PainterInfo &, int x, int y) const override;
        ///
-       bool extraBraces() const;
+       bool extraBraces() const override;
        ///
-       void mathmlize(MathStream &) const;
+       void mathmlize(MathMLStream &) const override;
        ///
-       void htmlize(HtmlStream &) const;
+       void htmlize(HtmlStream &) const override;
        ///
-       void validate(LaTeXFeatures & features) const;
+       void validate(LaTeXFeatures & features) const override;
        ///
-       InsetCode lyxCode() const { return MATH_FRAC_CODE; }
+       InsetCode lyxCode() const override { return MATH_FRAC_CODE; }
 private:
-       Inset * clone() const;
+       Inset * clone() const override;
        ///
        int dw(int height) const;
        ///