]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacroTemplate.h
tex2lyx/text.cpp: fix typos
[lyx.git] / src / mathed / MathMacroTemplate.h
index f6ac948d87e51330baf372c4d7c7c0b18063ed53..4e5fc721748ea131b963c488b384701f1671c6fb 100644 (file)
@@ -22,6 +22,9 @@
 
 namespace lyx {
 
+class OutputParams;
+class XHTMLStream;
+
 /// This class contains the macro definition.
 class MathMacroTemplate : public InsetMathNest {
 public:
@@ -49,11 +52,13 @@ public:
        void write(WriteStream & os) const;
        /// Output LaTeX code, but assume that the macro is not definied yet
        /// if overwriteRedefinition is true
-       void write(WriteStream & os, bool overwriteRedefinition) const;
+       int write(WriteStream & os, bool overwriteRedefinition) const;
+       /// Nothing happens. This is simply to suppress the default output.
+       docstring xhtml(XHTMLStream &, OutputParams const &) const;
        ///
        int plaintext(odocstream &, OutputParams const &) const;
        ///
-       bool noFontChange() const { return true; }
+       bool inheritFont() const { return false; }
 
        ///
        docstring name() const;
@@ -99,7 +104,7 @@ public:
        ///
        void infoize(odocstream & os) const;
        ///
-       docstring contextMenu(BufferView const &, int, int) const;
+       std::string contextMenuName() const;
 protected:
        ///
        virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
@@ -115,17 +120,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 +147,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_;
        ///