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: (c) 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 {
35 InsetFormulaMacro(string name, int na = 0, bool env = false);
39 int ascent(Painter &, LyXFont const &) const;
41 int descent(Painter &, LyXFont const &) const;
43 int width(Painter &, LyXFont const &) const;
45 void draw(Painter &, LyXFont const &, int baseline, float & x) const;
47 void Read(LyXLex & lex);
49 void Write(ostream & os) const;
51 int Latex(ostream & os, signed char fragile) const;
53 int Latex(string & file, signed char fragile) const;
55 int Linuxdoc(string & file) const;
57 int DocBook(string & file) const;
59 Inset * Clone() const;
61 /// what appears in the minibuffer when opening
62 char const * EditMessage() const {return _("Math macro editor mode");}
64 void Edit(int x, int y);
68 bool LocalDispatch(int, char const *);
78 MathMacroTemplate * tmacro;