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;
52 #ifndef USE_OSTREAM_ONLY
54 int Latex(string & file, signed char fragile) const;
57 int Linuxdoc(string & file) const;
59 int DocBook(string & file) const;
61 Inset * Clone() const;
63 /// what appears in the minibuffer when opening
64 const char * EditMessage() const {return _("Math macro editor mode");}
66 void Edit(BufferView *, int x, int y, unsigned int button);
68 void InsetUnlock(BufferView *);
70 RESULT LocalDispatch(BufferView *, int, string const &);
82 MathMacroTemplate * tmacro;