#endif
#include "math_nestinset.h"
+#include "math_cursor.h"
#include "math_mathmlstream.h"
#include "debug.h"
void MathNestInset::metrics(MathMetricsInfo const & mi) const
{
- for (idx_type i = 0; i < nargs(); ++i)
- xcell(i).metrics(mi);
+ MathMetricsInfo m = mi;
+ m.inset = this;
+ for (idx_type i = 0; i < nargs(); ++i) {
+ m.idx = i;
+ xcell(i).metrics(m);
+ }
}
for (idx_type i = 0; i < nargs(); ++i)
cell(i).replace(rep);
}
+
+
+bool MathNestInset::contains(MathArray const & ar)
+{
+ for (idx_type i = 0; i < nargs(); ++i)
+ if (cell(i).contains(ar))
+ return true;
+ return false;
+}
+
+
+bool MathNestInset::editing() const
+{
+ return mathcursor && mathcursor->isInside(this);
+}
+