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);
22 virtual ~MathParInset();
24 virtual MathedInset * Clone();
25 /// Draw the object on a drawable
26 virtual void draw(Painter &, int x, int baseline);
28 virtual void Write(std::ostream &, bool fragile);
30 virtual void Metrics();
32 virtual void UserSetSize(short);
33 /// Data is stored in a LyXArray
34 virtual void setData(MathedArray *);
36 virtual MathedArray * GetData();
37 /// Paragraph position
38 virtual void GetXY(int &, int &) const;
40 virtual void setXY(int x, int y);
42 virtual void SetFocus(int, int) {}
44 virtual bool Inside(int, int);
45 // Tab stuff used by Matrix.
47 virtual void SetAlign(char, string const &) {}
49 virtual int GetColumns() const { return 1; }
51 virtual int GetRows() const { return 1; }
53 virtual bool isMatrix() const { return false; }
56 virtual bool setArgumentIdx(int i) { return (i == 0); }
58 virtual bool setNextArgIdx() { return false; }
60 virtual int getArgumentIdx() const { return 0; }
62 virtual int getMaxArgumentIdx() const { return 0; }
64 virtual void SetStyle(short);
66 virtual MathedRowSt * getRowSt() const;
68 virtual void setRowSt(MathedRowSt *) {}
70 virtual bool Permit(short f) const;
82 /// Paragraph data is stored here
95 /// Cursor start position