#include "math_defs.h"
#include "math_inset.h"
+#include "LString.h"
-class MathInset;
-class MathAtom;
-class MathArrayInset;
-class MathFuncInset;
-class MathMatrixInset;
-class MathScriptInset;
-class MathSpaceInset;
class InsetFormulaBase;
-class MathArray;
-class MathXArray;
class Painter;
class Selection;
-class latexkeys;
/// Description of a position
struct MathCursorPos {
///
void delLine();
/// This is in pixels from (maybe?) the top of inset
- void setPos(int, int);
+ // don't move further in than the Anchor's inset if respect_anchor == true
+ void setPos(int x, int y, bool respect_anchor = false);
+ /// This is in pixels from (maybe?) the top of inset, don't move further
///
void getPos(int & x, int & y);
///
MathAtom & par() const;
/// return the next enclosing grid inset and the cursor's index in it
- MathArrayInset * enclosingArray(idx_type &) const;
+ MathGridInset * enclosingGrid(idx_type &) const;
///
InsetFormulaBase const * formula();
///
///
size_type size() const;
///
- void interpret(string const &);
+ bool interpret(string const &);
///
- void interpret(char);
- ///
- void setSize(MathStyles);
+ bool interpret(char);
///
bool toggleLimits();
///
///
void selClear();
///
+ void selGet(MathArray & ar);
+ ///
void drawSelection(Painter & pain) const;
///
void handleFont(MathTextCodes t);
void splitCell();
/// Splits line and insert new row of cell
void breakLine();
+ /// read contents of line into an array
+ void readLine(MathArray & ar) const;
///
MathTextCodes getLastCode() const;
///
///
char halign() const;
///
+ col_type ncols() const;
+ ///
col_type col() const;
///
row_type row() const;
- ///
- MathStyles style() const;
/// Make sure cursor position is valid
void normalize() const;
+ ///
+ UpdatableInset * asHyperActiveInset() const;
/// enter a MathInset
void push(MathAtom & par);
void seldump(char const * str) const;
///
void dump(char const * str) const;
+ ///
+ void stripFromLastEqualSign();
///
friend class Selection;
pos_type & pos();
/// write access to cursor cell index
idx_type & idx();
- /// x-offset of current cell relative to par xo
- int cellXOffset() const;
- /// y-offset of current cell relative to par yo
- int cellYOffset() const;
- /// current x position relative to par xo
- int xpos() const;
- /// current y position relative to par yo
- int ypos() const;
- /// adjust position in current cell according to x. idx is not changed.
- void gotoX(int x);
///
InsetFormulaBase * const formula_;