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);
34 virtual void Metrics();
36 virtual void UserSetSize(short);
37 /// Data is stored in a LyXArray
38 virtual void setData(MathedArray const &);
40 virtual MathedArray & GetData();
42 virtual MathedArray const & GetData() const;
43 /// Paragraph position
44 virtual void GetXY(int &, int &) const;
46 virtual void setXY(int x, int y);
48 virtual void SetFocus(int, int) {}
50 virtual bool Inside(int, int);
51 // Tab stuff used by Matrix.
53 virtual void SetAlign(char, string const &);
55 virtual int GetColumns() const;
57 virtual int GetRows() const;
59 virtual bool isMatrix() const;
62 virtual bool setArgumentIdx(int i);
64 virtual bool setNextArgIdx();
66 virtual int getArgumentIdx() const;
68 virtual int getMaxArgumentIdx() const;
70 virtual void SetStyle(short);
72 MathedRowContainer & getRowSt();
74 virtual bool Permit(short f) const;
84 /// Paragraph data is stored here
93 MathedRowContainer row_;
95 /// Cursor start position
103 void MathParInset::SetAlign(char, string const &)
108 int MathParInset::GetColumns() const
115 int MathParInset::GetRows() const
122 bool MathParInset::isMatrix() const
129 bool MathParInset::setArgumentIdx(int i)
136 bool MathParInset::setNextArgIdx()
143 int MathParInset::getArgumentIdx() const
150 int MathParInset::getMaxArgumentIdx() const
157 int MathParInset::xo() const
164 int MathParInset::yo() const
171 void MathParInset::xo(int tx)
178 void MathParInset::yo(int ty)