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();
28 virtual void substitute(MathMacro *);
29 /// Draw the object on a drawable
30 virtual void draw(Painter &, int x, int baseline);
32 virtual void Write(std::ostream &, bool fragile);
33 /// Write normalized content
34 virtual void WriteNormal(std::ostream &);
36 virtual void Metrics();
38 virtual void UserSetSize(short);
39 /// Data is stored in a LyXArray
40 virtual void setData(MathedArray const &);
42 virtual MathedArray & GetData();
44 virtual MathedArray const & GetData() const;
46 //virtual MathedArray & GetData(int i);
47 /// Paragraph position
48 virtual void GetXY(int &, int &) const;
50 virtual void setXY(int x, int y);
52 virtual void SetFocus(int, int) {}
54 virtual bool Inside(int, int);
55 // Tab stuff used by Matrix.
57 virtual void SetAlign(char, string const &);
59 virtual int GetColumns() const;
61 virtual int GetRows() const;
63 virtual bool isMatrix() const;
66 virtual bool setArgumentIdx(int i);
68 virtual bool setNextArgIdx();
70 virtual int getArgumentIdx() const;
72 virtual int getMaxArgumentIdx() const;
74 virtual void SetStyle(short);
76 MathedRowContainer & getRowSt();
78 virtual bool Permit(short f) const;
88 void push_back(MathedInset *, int);
90 /// Paragraph data is stored here
99 MathedRowContainer row_;
101 /// Cursor start position
109 void MathParInset::SetAlign(char, string const &)
114 int MathParInset::GetColumns() const
121 int MathParInset::GetRows() const
128 bool MathParInset::isMatrix() const
135 bool MathParInset::setArgumentIdx(int i)
142 bool MathParInset::setNextArgIdx()
149 int MathParInset::getArgumentIdx() const
156 int MathParInset::getMaxArgumentIdx() const
163 int MathParInset::xo() const
170 int MathParInset::yo() const
177 void MathParInset::xo(int tx)
184 void MathParInset::yo(int ty)