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
29 class MathMacroTemplate;
33 class InsetFormulaMacro: public InsetFormula {
38 InsetFormulaMacro(string name, int na=0, bool env=false);
42 int Ascent(LyXFont const &font) const;
44 int Descent(LyXFont const &font) const;
46 int Width(LyXFont const &font) const;
48 void Draw(LyXFont font, LyXScreen &scr, int baseline, float &x);
50 void Read(LyXLex &lex);
52 void Write(FILE *file);
54 // void Read(LyXLex &lex);
56 int Latex(FILE *file, signed char fragile);
58 int Latex(string &file, signed char fragile);
60 int Linuxdoc(string &file);
62 int DocBook(string &file);
66 /// what appears in the minibuffer when opening
67 char const* EditMessage() {return "Math macro editor mode";}
69 void Edit(int x, int y);
73 bool LocalDispatch(int, char const*);
80 class MathMacroTemplate* tmacro;