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(LyXFont const & font) const;
41 int Descent(LyXFont const & font) const;
43 int Width(LyXFont const & font) const;
45 void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
47 void Read(LyXLex & lex);
49 void Write(FILE * file);
51 int Latex(FILE * file, signed char fragile);
53 int Latex(string & file, signed char fragile);
55 int Linuxdoc(string & file);
57 int DocBook(string & file);
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 *);
75 class MathMacroTemplate * tmacro;