]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathFrac.h
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetMathFrac.h
index 0788747d39d4022696e98e9c7ed7486608abc477..49d131d25a596948e270fbd35df3118f0f761931 100644 (file)
@@ -5,7 +5,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Alejandro Aguilar Sierra
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -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;
        ///
@@ -128,11 +128,39 @@ private:
 };
 
 
+/// \cfrac support
+class InsetMathCFrac : public InsetMathFrac {
+public:
+       ///
+       InsetMathCFrac() {}
+       ///
+       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;
+};
+
+
 /// Binom like objects
 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 +174,14 @@ 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_;
 };