#include "InsetMathBinom.h"
#include "MathData.h"
#include "MathSupport.h"
-#include "MathMLStream.h"
+#include "MathStream.h"
+
+
+namespace lyx {
using std::max;
}
-void InsetMathBinom::metrics(MetricsInfo & mi, Dimension & dim) const
+bool InsetMathBinom::metrics(MetricsInfo & mi, Dimension & dim) const
{
ScriptChanger dummy(mi.base);
cell(0).metrics(mi);
dim.des = cell(1).height() + 4 - 5;
dim.wid = max(cell(0).width(), cell(1).width()) + 2 * dw() + 4;
metricsMarkers2(dim);
+ bool const changed = dim_ != dim;
dim_ = dim;
+ return changed;
}
ScriptChanger dummy(pi.base);
cell(0).draw(pi, m - cell(0).width() / 2, y - cell(0).descent() - 3 - 5);
cell(1).draw(pi, m - cell(1).width() / 2, y + cell(1).ascent() + 3 - 5);
- mathed_draw_deco(pi, x, y - dim_.ascent(), dw(), dim_.height(), "(");
+ mathed_draw_deco(pi, x, y - dim_.ascent(), dw(), dim_.height(), from_ascii("("));
mathed_draw_deco(pi, x + dim_.width() - dw(), y - dim_.ascent(),
- dw(), dim_.height(), ")");
+ dw(), dim_.height(), from_ascii(")"));
drawMarkers2(pi, x, y);
}
{
os << "[binom " << cell(0) << ' ' << cell(1) << ']';
}
+
+
+} // namespace lyx