- pos_type optIdx(int n) const { return n + 1; }
- ///
- pos_type displayIdx() const { return optionals_ + 2; }
- /// The label with some holes to edit
- mutable MathData label_;
+ idx_type optIdx(idx_type n) const { return n + 1; }
+ ///
+ idx_type displayIdx() const { return optionals_ + 2; }
+ ///
+ void updateLook() const;
+ /// look through the macro for #n arguments
+ int maxArgumentInDefinition() const;
+ /// add missing #n arguments up to \c maxArg
+ void insertMissingArguments(int maxArg);
+ /// change the arity
+ void changeArity(Cursor & cur, DocIterator const & inset_pos,
+ int newNumArg);
+ /// find arguments in definition and adapt the arity accordingly
+ void commitEditChanges(Cursor & cur, DocIterator const & inset_pos);
+ /// The representation of the macro template, with some holes to edit
+ mutable MathData look_;