]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacroTemplate.h
"fix" bug #3332 (plain text export depends on the menu language)
[lyx.git] / src / mathed / MathMacroTemplate.h
index 8a945e12555218becd9ce020d88229b6e9b4a809..7dd81890a997d7ac4115f386937f1fd9a8357ad8 100644 (file)
@@ -14,7 +14,7 @@
 #define MATH_MACROTEMPLATE_H
 
 #include "MathData.h"
-#include "MathMacroTable.h"
+#include "MacroTable.h"
 #include "InsetMathNest.h"
 
 #include "support/types.h"
@@ -28,52 +28,56 @@ public:
        ///
        MathMacroTemplate();
        ///
-       MathMacroTemplate(std::string const & name, int nargs,
-               std::string const & type,
-               MathArray const & = MathArray(),
-               MathArray const & = MathArray());
+       MathMacroTemplate(docstring const & name, int nargs,
+               docstring const & type,
+               MathData const & = MathData(),
+               MathData const & = MathData());
        ///
-       explicit MathMacroTemplate(std::istream & is);
+       explicit MathMacroTemplate(const docstring & str);
        ///
-       void edit(LCursor & cur, bool left);
+       void edit(Cursor & cur, bool left);
        ///
        EDITABLE editable() const { return HIGHLY_EDITABLE; }
        ///
-       void read(Buffer const &, LyXLex & lex);
+       void read(Buffer const &, Lexer & lex);
        ///
        void write(Buffer const &, std::ostream & os) const;
        ///
        void write(WriteStream & os) const;
+       ///
+       int plaintext(Buffer const &, odocstream &,
+                     OutputParams const &) const;
+
        /// Number of arguments
        int numargs() const;
        ///
        void numargs(int);
        ///
-       std::string name() const;
+       docstring name() const;
        ///
        MacroData asMacroData() const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       bool metrics(MetricsInfo & mi, Dimension & dim) const;
        /// identifies macro templates
        MathMacroTemplate * asMacroTemplate() { return this; }
        /// identifies macro templates
        MathMacroTemplate const * asMacroTemplate() const { return this; }
        ///
-       InsetBase::Code lyxCode() const { return MATHMACRO_CODE; }
+       Inset::Code lyxCode() const { return MATHMACRO_CODE; }
 
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       virtual std::auto_ptr<Inset> doClone() const;
        /// prefix in inset
        docstring prefix() const;
 
        ///
        int numargs_;
        ///
-       std::string name_;
+       docstring name_;
        /// newcommand or renewcommand or def
-       std::string type_;
+       docstring type_;
 };