]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathFrac.h
InsetMathHull.cpp: whitespace
[lyx.git] / src / mathed / InsetMathFrac.h
index b5e99e82d77e91bb78553ecb8cdee5e9328fb4c4..966d99d1291987751499c2d0bcc76c9b808eeb3e 100644 (file)
@@ -26,9 +26,9 @@ public:
        ///
        bool idxUpDown(Cursor &, bool up) const;
        ///
-       bool idxLeft(Cursor &) const { return false; }
+       bool idxBackward(Cursor &) const { return false; }
        ///
-       bool idxRight(Cursor &) const { return false; }
+       bool idxForward(Cursor &) const { return false; }
 };
 
 
@@ -49,9 +49,9 @@ public:
        ///
        explicit InsetMathFrac(Kind kind = FRAC, idx_type ncells = 2);
        ///
-       bool idxRight(Cursor &) const;
+       bool idxForward(Cursor &) const;
        ///
-       bool idxLeft(Cursor &) const;
+       bool idxBackward(Cursor &) const;
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
@@ -132,7 +132,15 @@ private:
 class InsetMathBinom : public InsetMathFracBase {
 public:
        ///
-       explicit InsetMathBinom(bool choose = false);
+       enum Kind {
+               BINOM,
+               CHOOSE,
+               BRACE,
+               BRACK
+       };
+
+       ///
+       explicit InsetMathBinom(Kind kind = BINOM);
        ///
        void write(WriteStream & os) const;
        ///
@@ -146,12 +154,58 @@ public:
        { drawMarkers2(pi, x, y); }
        ///
        bool extraBraces() const;
+       ///
+       void validate(LaTeXFeatures & features) const;
 private:
        Inset * clone() const;
        ///
        int dw(int height) const;
        ///
-       bool choose_;
+       Kind kind_;
+};
+
+
+/// \dbinom support
+class InsetMathDBinom : public InsetMathFracBase {
+public:
+       ///
+       InsetMathDBinom() {}
+       ///
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       ///
+       void draw(PainterInfo &, int x, int y) const;
+       ///
+       docstring name() const;
+       ///
+       void mathmlize(MathStream &) const;
+       ///
+       void validate(LaTeXFeatures & features) const;
+private:
+       Inset * clone() const;
+       ///
+       int dw(int height) const;
+};
+
+
+/// \tbinom support
+class InsetMathTBinom : public InsetMathFracBase {
+public:
+       ///
+       InsetMathTBinom() {}
+       ///
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       ///
+       void draw(PainterInfo &, int x, int y) const;
+       ///
+       docstring name() const;
+       ///
+       void mathmlize(MathStream &) const;
+       ///
+       void validate(LaTeXFeatures & features) const;
+private:
+       Inset * clone() const;
+       ///
+       int dw(int height) const;
 };