]> git.lyx.org Git - lyx.git/blob - src/mathed/formulamacro.h
remove unneeded member
[lyx.git] / src / mathed / formulamacro.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_MACRO_H
18 #define INSET_FORMULA_MACRO_H
19
20 #include "formulabase.h"
21
22 #ifdef __GNUG__
23 #pragma interface
24 #endif
25
26 class MathMacroTemplate;
27
28 // InsetFormulaMacro's only knows its name and asks the global
29 // MathMacroTable if it needs to know more.
30
31 ///
32 class InsetFormulaMacro: public InsetFormulaBase {
33 public:
34         ///
35         InsetFormulaMacro();
36         /// construct a macro hull from its name and the number of arguments
37         explicit InsetFormulaMacro(string const & name, int nargs);
38         /// constructs a mocro from its LaTeX definition
39         explicit InsetFormulaMacro(string const & s);
40         ///
41         int ascent(BufferView *, LyXFont const &) const;
42         ///
43         int descent(BufferView *, LyXFont const &) const;
44         ///
45         int width(BufferView *, LyXFont const &) const;
46         ///
47         void draw(BufferView *, LyXFont const &, int, float &, bool) const;
48
49         ///
50         void read(Buffer const *, LyXLex & lex);
51         ///
52         void write(Buffer const *, std::ostream & os) const;
53         ///
54         int ascii(Buffer const *, std::ostream &, int linelen) const;
55         ///
56         int latex(Buffer const *, std::ostream & os, bool fragile, bool free_spc) const;
57         ///
58         int linuxdoc(Buffer const *, std::ostream & os) const;
59         ///
60         int docbook(Buffer const *, std::ostream &, bool mixcont) const;
61
62         ///
63         Inset * clone(Buffer const &, bool same_id = false) const;
64         ///
65         Inset::Code lyxCode() const;
66         ///
67         MathAtom const & par() const;
68         ///
69         MathAtom & par();
70 private:
71         /// prefix in inset
72         string prefix() const;
73 };
74
75 #endif