-int InsetFormulaMacro::descent(BufferView *, LyXFont const &) const
-{
- return tmacro().descent() + 5;
-}
-
-
-int InsetFormulaMacro::width(BufferView *, LyXFont const & f) const
-{
- metrics();
- return 10 + lyxfont::width(prefix(), f) + tmacro().width();
-}
-
-
-
-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 const & InsetFormulaMacro::tmacro() const