]> git.lyx.org Git - lyx.git/blob - src/mathed/formulamacro.h
read the Changelog, preparing for prerelease
[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 #ifdef __GNUG__
21 #pragma interface
22 #endif
23
24 #include "formula.h"
25
26 class MathMacroTemplate;
27
28
29 ///
30 class InsetFormulaMacro: public InsetFormula {
31 public:
32         ///
33         InsetFormulaMacro();
34         ///
35         explicit
36         InsetFormulaMacro(string name, int na = 0, bool env = false);
37         ///
38         ~InsetFormulaMacro();
39         ///
40         int ascent(Painter &, LyXFont const &) const;
41         ///
42         int descent(Painter &, LyXFont const &) const;
43         ///
44         int width(Painter &, LyXFont const &) const;
45         ///
46         void draw(Painter &, LyXFont const &, int baseline, float & x) const;
47         ///
48         void Read(LyXLex & lex);
49         ///
50         void Write(std::ostream & os) const;
51         ///
52         int Latex(std::ostream & os, bool fragile, bool free_spc) const;
53         ///
54         int Linuxdoc(std::ostream &) const;
55         ///
56         int DocBook(std::ostream &) const;
57         ///
58         Inset * Clone() const;
59
60         /// what appears in the minibuffer when opening
61         char const * EditMessage() const;
62         ///
63         void Edit(BufferView *, int x, int y, unsigned int button);
64         ///
65         void InsetUnlock(BufferView *);
66         ///
67         RESULT LocalDispatch(BufferView *, int, string const &);
68
69 protected:
70         ///
71         //void UpdateLocal();
72
73 private:
74         ///
75         bool opened;
76         ///
77         string name;
78         ///
79         MathMacroTemplate * tmacro;
80 };
81
82 #endif