move code from nestinset

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4551 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-07-08 13:35:26 +00:00
parent 2f74107771
commit f68213134c
2 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,38 @@
#include "math_parinset.h"
#include "math_mathmlstream.h"
#include "debug.h"
MathParInset::MathParInset()
{
lyxerr << "constructing MathParInset\n";
}
void MathParInset::metrics(MathMetricsInfo & mi) const
{
MathFontSetChanger dummy1(mi.base, "textnormal");
MathGridInset::metrics(mi);
}
void MathParInset::draw(MathPainterInfo & pi, int x, int y) const
{
MathFontSetChanger dummy1(pi.base, "textnormal");
MathGridInset::draw(pi, x, y);
}
void MathParInset::write(WriteStream & os) const
{
for (idx_type i = 0; i < nargs(); ++i)
os << cell(i) << "\n";
}
void MathParInset::infoize(std::ostream & os) const
{
os << "Type: Paragraph ";
}

View File

@ -0,0 +1,22 @@
#ifndef MATH_PARINSET_H
#define MATH_PARINSET_H
#include "math_hullinset.h"
class MathParInset : public MathHullInset {
public:
///
MathParInset();
///
MathParInset * asParInset() { return this; }
///
void metrics(MathMetricsInfo & mi) const;
///
void draw(MathPainterInfo &, int x, int y) const;
///
void infoize(std::ostream & os) const;
///
void write(WriteStream & os) const;
};
#endif