]> git.lyx.org Git - features.git/commitdiff
move code from nestinset
authorAndré Pönitz <poenitz@gmx.net>
Mon, 8 Jul 2002 13:35:26 +0000 (13:35 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Mon, 8 Jul 2002 13:35:26 +0000 (13:35 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4551 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_parinset.C [new file with mode: 0644]
src/mathed/math_parinset.h [new file with mode: 0644]

diff --git a/src/mathed/math_parinset.C b/src/mathed/math_parinset.C
new file mode 100644 (file)
index 0000000..28af5f9
--- /dev/null
@@ -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 ";
+}
+
diff --git a/src/mathed/math_parinset.h b/src/mathed/math_parinset.h
new file mode 100644 (file)
index 0000000..17b6e0b
--- /dev/null
@@ -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