- float t = tmacro()->width() + 5;
- x -= t;
- tmacro()->draw(pain, int(x), baseline);
- x += t;
-}
-
-
-UpdatableInset::RESULT
-InsetFormulaMacro::localDispatch(BufferView * bv,
- kb_action action, string const & arg)
-{
- RESULT result = DISPATCHED;
- switch (action) {
- case LFUN_MATH_MACROARG: {
- int const i = lyx::atoi(arg);
- lyxerr << "inserting macro arg " << i << "\n";
- if (i > 0 && i <= tmacro()->numargs()) {
- mathcursor->insert(new MathMacroArgument(i));
- updateLocal(bv, true);
- } else {
- lyxerr << "not in range 0.." << tmacro()->numargs() << "\n";
- }
- break;
- }
-
- default:
- result = InsetFormulaBase::localDispatch(bv, action, arg);
- }
- return result;
-}
-
-
-MathMacroTemplate * InsetFormulaMacro::tmacro() const
-{
- return static_cast<MathMacroTemplate *>(par_);
-}
+ par()->draw(pain, x + font_metrics::width(prefix(), f) + 5, y);
+ xx += w + 2;
+ xo_ = x;
+ yo_ = y;