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: 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_H
18 #define INSET_FORMULA_H
24 #include "mathed/formulabase.h"
25 #include "math_defs.h"
27 class MathMatrixInset;
30 class InsetFormula : public InsetFormulaBase {
35 explicit InsetFormula(MathInsetTypes);
37 int ascent(BufferView *, LyXFont const &) const;
39 int descent(BufferView *, LyXFont const &) const;
41 int width(BufferView *, LyXFont const &) const;
43 void draw(BufferView *, LyXFont const &, int, float &, bool) const;
45 void write(Buffer const *, std::ostream &) const;
47 void read(Buffer const *, LyXLex & lex);
49 int latex(Buffer const *, std::ostream &,
50 bool fragile, bool free_spc) const;
52 int ascii(Buffer const *, std::ostream &, int linelen) const;
54 int linuxdoc(Buffer const *, std::ostream &) const;
56 int docBook(Buffer const *, std::ostream &) const;
58 Inset * clone(Buffer const &) const;
60 void validate(LaTeXFeatures & features) const;
62 Inset::Code lyxCode() const;
64 virtual RESULT localDispatch(BufferView *, kb_action, string const &);
66 std::vector<string> const getLabelList() const;
68 void handleExtern(string const & arg, BufferView * bv);
70 MathMatrixInset * par() const;