#ifndef INSET_FORMULA_MACRO_H
#define INSET_FORMULA_MACRO_H
-#include "formulabase.h"
-
+#include "math_nestinset.h"
class MathMacroTemplate;
+class LyXLex;
+
// An InsetFormulaMacro only knows its name and asks the global
// MathMacroTable if it needs to know more.
/// Main LyX Inset for defining math macros
-class InsetFormulaMacro : public InsetFormulaBase {
+class InsetFormulaMacro : public MathNestInset {
public:
///
InsetFormulaMacro();
/// construct a macro hull from its name and the number of arguments
- explicit InsetFormulaMacro(string const & name, int nargs, string const & t);
+ InsetFormulaMacro(std::string const & name, int nargs, std::string const & t);
/// constructs a mocro from its LaTeX definition
- explicit InsetFormulaMacro(string const & s);
+ explicit InsetFormulaMacro(std::string const & s);
///
void metrics(MetricsInfo & mi, Dimension & dim) const;
///
///
void write(Buffer const &, std::ostream & os) const;
///
- int ascii(Buffer const &, std::ostream &, int linelen) const;
+ int plaintext(Buffer const &, std::ostream &,
+ OutputParams const &) const;
///
int latex(Buffer const &, std::ostream & os,
- LatexRunParams const &) const;
+ OutputParams const &) const;
///
- int linuxdoc(Buffer const &, std::ostream & os) const;
+ int linuxdoc(Buffer const &, std::ostream & os,
+ OutputParams const &) const;
///
- int docbook(Buffer const &, std::ostream &, bool mixcont) const;
+ int docbook(Buffer const &, std::ostream &,
+ OutputParams const &) const;
///
- virtual std::auto_ptr<InsetBase> clone() const;
- ///
- InsetOld::Code lyxCode() const;
+ std::auto_ptr<InsetBase> clone() const;
///
- MathAtom const & par() const;
- ///
- MathAtom & par();
+ InsetBase::Code lyxCode() const { return MATHMACRO_CODE; }
private:
///
void read(std::istream & is);
/// prefix in inset
- string prefix() const;
+ std::string prefix() const;
+ ///
+ std::string name_;
};
#endif