]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacroTemplate.h
Whitespace.
[lyx.git] / src / mathed / MathMacroTemplate.h
index 4b6b98924bd89083685f1c688522ecaec0f69b74..4a496e0857f967c9ea5fa8b2081e9abca2a2a22b 100644 (file)
@@ -26,15 +26,15 @@ namespace lyx {
 class MathMacroTemplate : public InsetMathNest {
 public:
        ///
-       MathMacroTemplate(Buffer * buf = 0);
+       MathMacroTemplate(Buffer * buf);
        ///
-       MathMacroTemplate(docstring const & name, int nargs, int optional, 
-               MacroType type, Buffer * buf = 0,
+       MathMacroTemplate(Buffer * buf, docstring const & name, int nargs,
+               int optional, MacroType type, 
                std::vector<MathData> const & optionalValues = std::vector<MathData>(),
                MathData const & def = MathData(),
                MathData const & display = MathData());
        ///
-       explicit MathMacroTemplate(const docstring & str, Buffer * buf = 0);
+       MathMacroTemplate(Buffer * buf, const docstring & str);
        ///
        bool editable() const { return true; }
        ///
@@ -115,17 +115,20 @@ private:
        virtual Inset * clone() const;
 
        /// remove #n with from<=n<=to
-       void removeArguments(Cursor & cur, int from, int to);
+       void removeArguments(Cursor & cur, DocIterator const & inset_pos,
+               int from, int to);
        /// shift every #n with from<=n, i.e. #n -> #(n-by)
        void shiftArguments(size_t from, int by);
        ///
-       void insertParameter(Cursor & cur, int pos, bool greedy = false, bool addarg = true);
+       void insertParameter(Cursor & cur, DocIterator const & inset_pos,
+               int pos, bool greedy = false, bool addarg = true); 
        ///
-       void removeParameter(Cursor & cur, int pos, bool greedy = false);
+       void removeParameter(Cursor & cur, DocIterator const & inset_pos,
+               int pos, bool greedy = false);
        ///
-       void makeOptional(Cursor & cur);
+       void makeOptional(Cursor & cur, DocIterator const & inset_pos);
        ///
-       void makeNonOptional(Cursor & cur);
+       void makeNonOptional(Cursor & cur, DocIterator const & inset_pos);
        ///
        idx_type defIdx() const { return optionals_ + 1; }
        /// index of default value cell of optional parameter (#1 -> n=0)
@@ -139,9 +142,10 @@ private:
        /// add missing #n arguments up to \c maxArg
        void insertMissingArguments(int maxArg);
        /// change the arity
-       void changeArity(Cursor & cur, int newNumArg);
+       void changeArity(Cursor & cur, DocIterator const & inset_pos,
+               int newNumArg);
        /// find arguments in definition and adapt the arity accordingly
-       void commitEditChanges(Cursor & cur);
+       void commitEditChanges(Cursor & cur, DocIterator const & inset_pos);
        /// The representation of the macro template, with some holes to edit
        mutable MathData look_;
        ///