]> git.lyx.org Git - features.git/blob - src/mathed/formula.h
388d770432db7adcb3c1f8f91863f27ab719157b
[features.git] / src / mathed / formula.h
1 // -*- C++ -*-
2 /*
3  *  File:        formula.h
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. 
8  *
9  *  Copyright: 1996, Alejandro Aguilar Sierra
10  *
11  *  Version: 0.4, Lyx project.
12  *
13  *   You are free to use and modify this code under the terms of
14  *   the GNU General Public Licence version 2 or later.
15  */
16
17 #ifndef INSET_FORMULA_H 
18 #define INSET_FORMULA_H
19
20 #ifdef __GNUG__
21 #pragma interface
22 #endif
23
24 #include "mathed/formulabase.h"
25 #include "math_defs.h"
26
27 class MathMatrixInset;
28
29 ///
30 class InsetFormula : public InsetFormulaBase {
31 public:
32         ///
33         InsetFormula();
34         ///
35         explicit InsetFormula(MathInsetTypes);
36         ///
37         int ascent(BufferView *, LyXFont const &) const;
38         ///
39         int descent(BufferView *, LyXFont const &) const;
40         ///
41         int width(BufferView *, LyXFont const &) const;
42         ///
43         void draw(BufferView *, LyXFont const &, int, float &, bool) const;
44         ///
45         void write(Buffer const *, std::ostream &) const;
46         ///
47         void read(Buffer const *, LyXLex & lex);
48         ///
49         int latex(Buffer const *, std::ostream &,
50                   bool fragile, bool free_spc) const;
51         ///
52         int ascii(Buffer const *, std::ostream &, int linelen) const;
53         ///
54         int linuxdoc(Buffer const *, std::ostream &) const;
55         ///
56         int docBook(Buffer const *, std::ostream &) const;
57         ///
58         Inset * clone(Buffer const &) const;
59         ///
60         void validate(LaTeXFeatures & features) const;
61         ///
62         Inset::Code lyxCode() const;
63         ///
64         virtual RESULT localDispatch(BufferView *, kb_action, string const &);
65         ///
66         std::vector<string> const getLabelList() const;
67         ///
68         void handleExtern(string const & arg, BufferView * bv);
69         ///
70         MathMatrixInset * par() const;
71         ///
72         bool display() const;
73         ///
74         bool ams() const;
75 };
76 #endif