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
26 class MathMacroTemplate;
30 class InsetFormulaMacro: public InsetFormula {
36 InsetFormulaMacro(string name, int na = 0, bool env = false);
40 int ascent(Painter &, LyXFont const &) const;
42 int descent(Painter &, LyXFont const &) const;
44 int width(Painter &, LyXFont const &) const;
46 void draw(Painter &, LyXFont const &, int baseline, float & x) const;
48 void Read(LyXLex & lex);
50 void Write(std::ostream & os) const;
52 int Latex(std::ostream & os, signed char fragile, bool free_spc) const;
54 int Linuxdoc(std::ostream &) const;
56 int DocBook(std::ostream &) const;
58 Inset * Clone() const;
60 /// what appears in the minibuffer when opening
61 char const * EditMessage() const;
63 void Edit(BufferView *, int x, int y, unsigned int button);
65 void InsetUnlock(BufferView *);
67 RESULT LocalDispatch(BufferView *, int, string const &);
79 MathMacroTemplate * tmacro;