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);
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;
49 int Ascent(LyXFont const & font) const;
51 int Descent(LyXFont const & font) const;
53 int Width(LyXFont const & font) const;
55 void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
58 void Read(LyXLex & lex);
60 void Write(ostream & os);
62 int Latex(ostream & os, signed char fragile);
64 int Latex(string & file, signed char fragile);
66 int Linuxdoc(string & file);
68 int DocBook(string & file);
70 Inset * Clone() const;
72 /// what appears in the minibuffer when opening
73 char const * EditMessage() const {return _("Math macro editor mode");}
75 void Edit(int x, int y);
79 bool LocalDispatch(int, char const *);
89 MathMacroTemplate * tmacro;