2 #ifndef MATH_PARINSET_H
3 #define MATH_PARINSET_H
6 #include "math_inset.h"
13 /** The math paragraph base class, base to all editable math objects
14 \author Alejandro Aguilar Sierra
16 class MathParInset: public MathedInset {
19 MathParInset(short st = LM_ST_TEXT, string const & nm = string(),
20 short ot = LM_OT_MIN);
23 MathParInset(MathParInset *);
25 virtual ~MathParInset();
27 virtual MathedInset * Clone();
28 /// Draw the object on a drawable
29 virtual void draw(Painter &, int x, int baseline);
31 virtual void Write(std::ostream &, bool fragile);
33 virtual void Metrics();
35 virtual void UserSetSize(short);
36 /// Data is stored in a LyXArray
37 virtual void setData(MathedArray *);
39 virtual MathedArray * GetData();
40 /// Paragraph position
41 virtual void GetXY(int &, int &) const;
43 virtual void setXY(int x, int y);
45 virtual void SetFocus(int, int) {}
47 virtual bool Inside(int, int);
48 // Tab stuff used by Matrix.
50 virtual void SetAlign(char, string const &) {}
52 virtual int GetColumns() const { return 1; }
54 virtual int GetRows() const { return 1; }
56 virtual bool isMatrix() const { return false; }
59 virtual bool setArgumentIdx(int i) { return (i == 0); }
61 virtual bool setNextArgIdx() { return false; }
63 virtual int getArgumentIdx() const { return 0; }
65 virtual int getMaxArgumentIdx() const { return 0; }
67 virtual void SetStyle(short);
69 virtual MathedRowSt * getRowSt() const;
71 virtual void setRowSt(MathedRowSt *) {}
73 virtual bool Permit(short f) const;
83 /// Paragraph data is stored here
96 /// Cursor start position