2 #ifndef MATH_PARINSET_H
3 #define MATH_PARINSET_H
6 #include "math_inset.h"
8 #include "math_rowst.h"
17 /** The math paragraph base class, base to all editable math objects
18 \author Alejandro Aguilar Sierra
20 class MathParInset : public MathedInset {
23 MathParInset(short st = LM_ST_TEXT, string const & nm = string(),
24 short ot = LM_OT_MIN);
26 virtual MathedInset * Clone();
27 /// Draw the object on a drawable
28 virtual void draw(Painter &, int x, int baseline);
30 virtual void Write(std::ostream &, bool fragile);
32 virtual void Metrics();
34 virtual void UserSetSize(short);
35 /// Data is stored in a LyXArray
36 virtual void setData(MathedArray const &);
38 virtual MathedArray & GetData();
40 virtual MathedArray const & GetData() const;
41 /// Paragraph position
42 virtual void GetXY(int &, int &) const;
44 virtual void setXY(int x, int y);
46 virtual void SetFocus(int, int) {}
48 virtual bool Inside(int, int);
49 // Tab stuff used by Matrix.
51 virtual void SetAlign(char, string const &);
53 virtual int GetColumns() const;
55 virtual int GetRows() const;
57 virtual bool isMatrix() const;
60 virtual bool setArgumentIdx(int i);
62 virtual bool setNextArgIdx();
64 virtual int getArgumentIdx() const;
66 virtual int getMaxArgumentIdx() const;
68 virtual void SetStyle(short);
70 virtual MathedRowSt * getRowSt() const;
72 virtual void setRowSt(MathedRowSt *);
74 virtual bool Permit(short f) const;
82 /// Paragraph data is stored here
91 /// Cursor start position
99 void MathParInset::SetAlign(char, string const &)
104 int MathParInset::GetColumns() const
111 int MathParInset::GetRows() const
118 bool MathParInset::isMatrix() const
125 bool MathParInset::setArgumentIdx(int i)
132 bool MathParInset::setNextArgIdx()
139 int MathParInset::getArgumentIdx() const
146 int MathParInset::getMaxArgumentIdx() const
153 void MathParInset::setRowSt(MathedRowSt *)
158 int MathParInset::xo() const
165 int MathParInset::yo() const
172 void MathParInset::xo(int tx)
179 void MathParInset::yo(int ty)