]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSideset.h
Move <algorithm> from DocIterator.h
[lyx.git] / src / mathed / InsetMathSideset.h
index d5be86316cb5e3bd71f4a5a9e283f74230b54a18..8bfe8105bb11870abadff4b0496f3079e98de1b1 100644 (file)
@@ -30,35 +30,33 @@ public:
        InsetMathSideset(Buffer * buf, bool scriptl, bool scriptr,
                         MathAtom const & at);
        ///
-       mode_type currentMode() const { return MATH_MODE; }
+       mode_type currentMode() const override { return MATH_MODE; }
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
+       void draw(PainterInfo & pi, 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 & pi, int x, int y) const;
+       void drawT(TextPainter & pi, int x, int y) const override;
 
        /// move cursor backwards
-       bool idxBackward(Cursor & cur) const;
+       bool idxBackward(Cursor & cur) const override;
        /// move cursor forward
-       bool idxForward(Cursor & cur) const;
+       bool idxForward(Cursor & cur) const override;
        /// move cursor up or down
-       bool idxUpDown(Cursor & cur, bool up) const;
-       /// Target pos when we enter the inset while moving forward
-       bool idxFirst(Cursor & cur) const;
-       /// Target pos when we enter the inset while moving backwards
-       bool idxLast(Cursor & cur) const;
+       bool idxUpDown(Cursor & cur, bool up) const override;
+       /// The index of the cell entered while moving backward
+       size_type lastIdx() const override { return 0; }
 
        /// write LaTeX and Lyx code
-       void write(WriteStream & os) const;
+       void write(WriteStream & os) const override;
        /// write normalized content
-       void normalize(NormalStream &) const;
+       void normalize(NormalStream &) const override;
        /// write content as MathML
-       void mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const override;
        /// write content as HTML
-       void htmlize(HtmlStream &) const;
+       void htmlize(HtmlStream &) const override;
 
        /// returns nucleus
        MathData const & nuc() const { return cell(0); }
@@ -81,13 +79,13 @@ public:
        /// top right index or single right cell
        MathData & tr()              { return cell(2 + scriptl_ + scriptr_); }
        /// say that we have scripts
-       void infoize(odocstream & os) const;
+       void infoize(odocstream & os) const override;
        ///
-       InsetCode lyxCode() const { return MATH_SCRIPT_CODE; }
+       InsetCode lyxCode() const override { return MATH_SCRIPT_CODE; }
        ///
-       void validate(LaTeXFeatures &features) const;
+       void validate(LaTeXFeatures &features) const override;
 private:
-       virtual Inset * clone() const;
+       Inset * clone() const override;
        /// returns x offset of nucleus
        int dxn(BufferView const & bv) const;
        /// returns width of nucleus if any
@@ -104,12 +102,12 @@ private:
        int nasc(BufferView const &) const;
        /// returns descent of nucleus if any
        int ndes(BufferView const &) const;
-       /// returns subscript and superscript kerning of nucleus if any
+       /// Italic correction as described in InsetMathScript.h
        int nker(BufferView const * bv) const;
        /// Whether there are two left scripts or one single cell
-       bool scriptl_; 
+       bool scriptl_;
        /// Whether there are two right scripts or one single cell
-       bool scriptr_; 
+       bool scriptr_;
 };