4 * Purpose: Declaration of formula inset
5 * Author: Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
6 * Created: January 1996
7 * Description: Allows the edition of math paragraphs inside Lyx.
9 * Copyright: 1996, Alejandro Aguilar Sierra
11 * Version: 0.4, Lyx project.
13 * You are free to use and modify this code under the terms of
14 * the GNU General Public Licence version 2 or later.
17 #ifndef INSET_FORMULA_MACRO_H
18 #define INSET_FORMULA_MACRO_H
20 #include <boost/smart_ptr.hpp>
28 class MathMacroTemplate;
32 class InsetFormulaMacro: public InsetFormula {
38 InsetFormulaMacro(string name, int na);
42 int ascent(BufferView *, LyXFont const &) const;
44 int descent(BufferView *, LyXFont const &) const;
46 int width(BufferView *, LyXFont const &) const;
48 void draw(BufferView *,LyXFont const &, int, float &, bool) const;
50 void Read(Buffer const *, LyXLex & lex);
52 void Write(Buffer const *, std::ostream & os) const;
54 int Latex(Buffer const *, std::ostream & os, bool fragile,
57 int Linuxdoc(Buffer const *, std::ostream & os) const;
59 int DocBook(Buffer const *, std::ostream &) const;
61 Inset * Clone(Buffer const &) const;
63 Inset::Code LyxCode() const;
64 /// what appears in the minibuffer when opening
65 string const EditMessage() const;
67 void Edit(BufferView *, int x, int y, unsigned int button);
69 void InsetUnlock(BufferView *);
71 RESULT LocalDispatch(BufferView *, kb_action, string const &);
79 boost::shared_ptr<MathMacroTemplate> tmacro_;
84 Inset::Code InsetFormulaMacro::LyxCode() const
86 return Inset::MATHMACRO_CODE;