#include <config.h>
-
#include "math_inset.h"
-#include "Lsstream.h"
#include "math_scriptinset.h"
#include "math_mathmlstream.h"
#include "math_cursor.h"
-#include "math_parser.h"
#include "debug.h"
#include "frontends/LyXView.h"
BufferView * MathInset::view() const
{
- if (!mathcursor)
- return 0;
- return mathcursor->formula()->view();
-}
-
-
-int MathInset::height() const
-{
- return ascent() + descent();
+ return mathcursor ? mathcursor->formula()->view() : 0;
}
}
-Dimension MathInset::dimensions() const
-{
- lyxerr << "call MathInset::dimensions()\n";
- return Dimension(width(), ascent(), descent());
-}
-
-
MathArray dummyCell;
MathArray & MathInset::cell(idx_type)
}
-void MathInset::metrics(MetricsInfo &) const
-{
- lyxerr << "MathInset::metrics() called directly!\n";
-}
-
-
-void MathInset::draw(PainterInfo &, int, int) const
-{
- lyxerr << "MathInset::draw() called directly!\n";
-}
-
-
void MathInset::drawSelection(PainterInfo &,
idx_type, pos_type, idx_type, pos_type) const
{
}
-void MathInset::metricsT(TextMetricsInfo const &) const
+void MathInset::metricsT(TextMetricsInfo const &, Dimension &) const
{
#ifdef WITH_WARNINGS
lyxerr << "MathInset::metricsT(Text) called directly!\n";
}
-string asString(MathArray const & ar)
-{
- std::ostringstream os;
- WriteStream ws(os);
- ws << ar;
- return STRCONV(os.str());
-}
-
-
-MathArray asArray(string const & str)
-{
- MathArray ar;
- mathed_parse_cell(ar, str);
- return ar;
-}
-
-
ostream & operator<<(ostream & os, MathAtom const & at)
{
WriteStream wi(os, false, false);