]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacroTemplate.h
Get rid of Inset::setPosCache
[lyx.git] / src / mathed / MathMacroTemplate.h
index e93ceb46d0dfe0c4a85c79ebf17016485312e62a..b0c301897761a0caeb9124c91270386b960875a9 100644 (file)
@@ -17,8 +17,6 @@
 #include "MacroTable.h"
 #include "MathData.h"
 
-#include "support/types.h"
-
 
 namespace lyx {
 
@@ -36,8 +34,8 @@ public:
                std::vector<MathData> const & optionalValues = std::vector<MathData>(),
                MathData const & def = MathData(),
                MathData const & display = MathData());
-       ///
-       MathMacroTemplate(Buffer * buf, const docstring & str);
+       /// parses from string, returns false if failed
+       bool fromString (const docstring & str);
        ///
        bool editable() const { return true; }
        ///
@@ -56,9 +54,9 @@ public:
        /// Nothing happens. This is simply to suppress the default output.
        docstring xhtml(XHTMLStream &, OutputParams const &) const;
        ///
-       int plaintext(odocstream &, OutputParams const &) const;
+       int plaintext(odocstringstream &, OutputParams const &, size_t) const;
        ///
-       bool noFontChange() const { return true; }
+       bool inheritFont() const { return false; }
 
        ///
        docstring name() const;
@@ -89,7 +87,7 @@ public:
        virtual void validate(LaTeXFeatures &) const;
 
        /// decide whether its a redefinition
-       void updateToContext(MacroContext const & mc) const;
+       void updateToContext(MacroContext const & mc);
 
        ///
        void draw(PainterInfo & pi, int x, int y) const;
@@ -104,7 +102,10 @@ public:
        ///
        void infoize(odocstream & os) const;
        ///
-       docstring contextMenu(BufferView const &, int, int) const;
+       std::string contextMenuName() const;
+       ///
+       void addToToc(DocIterator const & di, bool output_active,
+                                 UpdateType utype) const;
 protected:
        ///
        virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
@@ -166,7 +167,7 @@ private:
        /// (re)newcommand or def
        mutable MacroType type_;
        /// defined before already?
-       mutable bool redefinition_;
+       bool redefinition_;
        ///
        void createLook(int args) const;
        ///