X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetFormulaMacro.h;h=55b31761594e866b4b215a341bfd0138bbf26cc8;hb=fc6ce7cd08562fd7bab4427880b46390bb7d2f07;hp=b32ac582341fcf967d799b8f5d404408db875a32;hpb=8b67659646c6850377cb9f44a2a0a22c0e80840c;p=lyx.git diff --git a/src/mathed/InsetFormulaMacro.h b/src/mathed/InsetFormulaMacro.h index b32ac58234..55b3176159 100644 --- a/src/mathed/InsetFormulaMacro.h +++ b/src/mathed/InsetFormulaMacro.h @@ -15,8 +15,11 @@ #include "InsetMathNest.h" + +namespace lyx { + class MathMacroTemplate; -class LyXLex; +class Lexer; // An InsetFormulaMacro only knows its name and asks the global @@ -28,34 +31,34 @@ public: /// InsetFormulaMacro(); /// construct a macro hull from its name and the number of arguments - InsetFormulaMacro(std::string const & name, int nargs, std::string const & t); + InsetFormulaMacro(docstring const & name, int nargs, docstring const & t); /// constructs a mocro from its LaTeX definition - explicit InsetFormulaMacro(std::string const & s); + explicit InsetFormulaMacro(docstring const & s); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + bool metrics(MetricsInfo & mi, Dimension & dim) const; /// void draw(PainterInfo & pi, int x, int y) const; /// - void read(Buffer const &, LyXLex & lex); + void read(Buffer const &, Lexer & lex); /// void write(Buffer const &, std::ostream & os) const; /// - int plaintext(Buffer const &, lyx::odocstream &, - OutputParams const &) const; + int latex(Buffer const &, odocstream & os, + OutputParams const &) const; /// - int latex(Buffer const &, lyx::odocstream & os, - OutputParams const &) const; + int plaintext(Buffer const &, odocstream &, + OutputParams const &) const; /// - int docbook(Buffer const &, std::ostream &, - OutputParams const &) const; + int docbook(Buffer const &, odocstream &, + OutputParams const &) const; /// - std::auto_ptr clone() const; + std::auto_ptr clone() const; /// - InsetBase::Code lyxCode() const { return MATHMACRO_CODE; } + Inset::Code lyxCode() const { return MATHMACRO_CODE; } /// - std::string const & getInsetName() const { return name_; } + docstring const & getInsetName() const { return name_; } /// EDITABLE editable() const { return HIGHLY_EDITABLE; } private: @@ -64,9 +67,12 @@ private: /// void read(std::istream & is); /// prefix in inset - std::string prefix() const; + docstring prefix() const; /// - std::string name_; + docstring name_; }; + +} // namespace lyx + #endif