]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_inset.h
fix typo that put too many include paths for most people
[lyx.git] / src / mathed / math_inset.h
index 6783d5714c3704398c6df0737fc673c232379321..fce522e195b35d70c95ca815184e196984334d4b 100644 (file)
@@ -1,8 +1,8 @@
 // -*- C++ -*-
 /*
  *  File:        math_inset.h
- *  Purpose:     Declaration of insets for mathed 
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Purpose:     Declaration of insets for mathed
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1996
  *  Description: Math paragraph and objects for a WYSIWYG math editor.
  *
@@ -35,7 +35,7 @@
 
 Abstract base class for all math objects.  A math insets is for use of the
 math editor only, it isn't a general LyX inset. It's used to represent all
-the math objects. 
+the math objects.
 
 Math insets do not know there parents, a cursor position or things
 like that. The are dumb object that are contained in other math insets
@@ -80,7 +80,7 @@ class MathPosFinder;
 
 
 class MathInset {
-public: 
+public:
        /// short of anything else reasonable
        typedef MathArray::size_type        size_type;
        /// type for cursor positions differences within a cell
@@ -110,9 +110,9 @@ public:
        virtual void draw(Painter &, int x, int y) const;
        /// the ascent of the inset above the baseline
        /// compute the size of the object for text based drawing
-       virtual void metrics(TextMetricsInfo const & st) const;
+       virtual void metricsT(TextMetricsInfo const & st) const;
        /// draw the object as text
-       virtual void draw(TextPainter &, int x, int y) const;
+       virtual void drawT(TextPainter &, int x, int y) const;
        /// the ascent of the inset above the baseline
        virtual int ascent() const { return 1; }
        /// the descent of the inset below the baseline
@@ -122,10 +122,8 @@ public:
        /// total height (== ascent + descent)
        virtual int height() const;
 
-       /// Where should we go when we press the up cursor key?
-       virtual bool idxUp(idx_type & idx) const;
-       /// The down key
-       virtual bool idxDown(idx_type & idx) const;
+       /// Where should we go when we press the up or down cursor key?
+       virtual bool idxUpDown(idx_type & idx, bool up) const;
        /// The left key
        virtual bool idxLeft(idx_type & idx, pos_type & pos) const;
        /// The right key
@@ -147,9 +145,9 @@ public:
        virtual bool idxEnd(idx_type & idx, pos_type & pos) const;
 
        /// Delete a cell and move cursor
-       // the return value indicates whether the cursor should leave the inset
-       // and/or the whole inset should be deleted
-       virtual void idxDelete(idx_type & idx, bool & popit, bool & deleteit);
+       virtual bool idxDelete(idx_type &) { return false; }
+       /// pulls cell after pressing erase
+       virtual void idxGlue(idx_type) {}
        // returns list of cell indices that are "between" from and to for
        // selection purposes
        virtual std::vector<idx_type> idxBetween(idx_type from, idx_type to) const;
@@ -165,7 +163,7 @@ public:
        virtual MathXArray & xcell(idx_type);
        /// return cell plus drawing cache given its number
        virtual MathXArray const & xcell(idx_type) const;
-                       
+
        /// the number of columns of this inset if it is grid-like
        virtual col_type ncols() const { return 1; }
        /// the number of rows of this inset if it is grid-like