X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetFormulaMacro.h;h=0e4e3ba70044bd707e59fbec92faba7203cefab5;hb=55a3dd7b346d29a52ba305a4558e9e380ef50f47;hp=b32bd033c6a17bb1aed09ce0bcb40b35983621ee;hpb=e24bf64c68102691fc76081de9fb57926b482726;p=lyx.git diff --git a/src/mathed/InsetFormulaMacro.h b/src/mathed/InsetFormulaMacro.h index b32bd033c6..0e4e3ba700 100644 --- a/src/mathed/InsetFormulaMacro.h +++ b/src/mathed/InsetFormulaMacro.h @@ -5,7 +5,7 @@ * Licence details can be found in the file COPYING. * * \author Alejandro Aguilar Sierra - * \author André Pönitz + * \author André Pönitz * * Full author contact details are available in file CREDITS. */ @@ -19,7 +19,7 @@ namespace lyx { class MathMacroTemplate; -class LyXLex; +class Lexer; // An InsetFormulaMacro only knows its name and asks the global @@ -29,38 +29,35 @@ class LyXLex; class InsetFormulaMacro : public InsetMathNest { public: /// - InsetFormulaMacro(); + InsetFormulaMacro(Buffer * buf); /// construct a macro hull from its name and the number of arguments - InsetFormulaMacro(docstring const & name, int nargs, docstring const & t); + InsetFormulaMacro(Buffer * buf, docstring const & name, int nargs, docstring const & t); /// constructs a mocro from its LaTeX definition explicit InsetFormulaMacro(docstring const & s); /// - bool metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const; /// void draw(PainterInfo & pi, int x, int y) const; /// - void read(Buffer const &, LyXLex & lex); + void read(Lexer & lex); /// - void write(Buffer const &, std::ostream & os) const; + void write(std::ostream & os) const; /// - int plaintext(Buffer const &, odocstream &, - OutputParams const &) const; + int latex(otexstream & os, OutputParams const &) const; /// - int latex(Buffer const &, odocstream & os, - OutputParams const &) const; + int plaintext(odocstream &, OutputParams const &) const; /// - int docbook(Buffer const &, odocstream &, - OutputParams const &) const; + int docbook(odocstream &, OutputParams const &) const; /// - std::auto_ptr clone() const; - /// - InsetBase::Code lyxCode() const { return MATHMACRO_CODE; } + InsetCode lyxCode() const { return MATHMACRO_CODE_CODE; } /// docstring const & getInsetName() const { return name_; } /// - EDITABLE editable() const { return HIGHLY_EDITABLE; } + bool editable() const { return true; } + /// + InsetCode lyxCode() const { return MATH_FORMULA_MACRO_CODE; } private: /// MathAtom & tmpl() const; @@ -70,6 +67,8 @@ private: docstring prefix() const; /// docstring name_; + /// + Inset * clone() const; };