void MathBoxInset::draw(Painter & pain, int x, int y) const
{
float fx = x + 2;
-
if (text_ && mi_.view)
text_->draw(mi_.view, mi_.font, y, fx, false);
if (mathcursor && mathcursor->isInside(this))
void metrics(MathMetricsInfo const &) const;
/// identifies BoxInsets
MathBoxInset * asBoxInset() { return this; }
+ ///
+ bool isHyperActive() const { return 1; }
private:
/// unimplemented
bool MathCursor::openable(MathAtom const & t, bool sel) const
{
+ if (t->isHyperActive())
+ return true;
+
if (!t->isActive())
return false;
lastcode_ = LM_TC_VAR;
if (hasPrevAtom() && openable(prevAtom(), sel)) {
+ if (prevAtom()->isHyperActive()) {
+ lyxerr << "entering hyperactive inset\n";
+ }
pushRight(prevAtom());
return true;
}
lastcode_ = LM_TC_VAR;
if (hasNextAtom() && openable(nextAtom(), sel)) {
+ if (nextAtom()->isHyperActive()) {
+ lyxerr << "entering hyperactive inset\n";
+ }
pushLeft(nextAtom());
return true;
}
#include "math_parser.h"
#include "math_binominset.h"
-//#include "math_boxinset.h"
+#include "math_boxinset.h"
#include "math_decorationinset.h"
#include "math_dotsinset.h"
#include "math_funcinset.h"
return MathAtom(new MathSpaceInset(l->id));
case LM_TK_DOTS:
return MathAtom(new MathDotsInset(l->name));
- //case LM_TK_BOX:
- // return MathAtom(new MathBoxInset(l->name));
+ case LM_TK_BOX:
+ return MathAtom(new MathBoxInset(l->name));
}
return MathAtom(new MathFuncInset(l->name));
}
MathXArray & MathInset::xcell(idx_type)
{
- lyxerr << "I don't have a cell\n";
+ lyxerr << "I don't have a cell 1\n";
return dummyCell;
}
MathXArray const & MathInset::xcell(idx_type) const
{
- lyxerr << "I don't have a cell\n";
+ lyxerr << "I don't have a cell 2\n";
return dummyCell;
}
MathArray & MathInset::cell(idx_type)
{
- lyxerr << "I don't have a cell\n";
+ lyxerr << "I don't have a cell 3\n";
return dummyCell.data_;
}
MathArray const & MathInset::cell(idx_type) const
{
- lyxerr << "I don't have a cell\n";
+ lyxerr << "I don't have a cell 4\n";
return dummyCell.data_;
}
virtual bool isScriptable() const { return false; }
///
virtual bool isActive() const { return nargs() > 0; }
+ /// identifies insets from the outer world
+ virtual bool isHyperActive() const { return 0; }
///
virtual bool isRelOp() const { return false; }
///