]> git.lyx.org Git - lyx.git/blob - src/mathed/formulamacro.h
Added the ability to select both delimiters at one click (based in part
[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: (c) 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
27
28
29 class MathMacroTemplate;
30
31
32 ///
33 class InsetFormulaMacro: public InsetFormula {
34 public:
35         ///
36         InsetFormulaMacro();
37         ///
38         InsetFormulaMacro(string name, int na= 0, bool env= false);
39         ///
40         ~InsetFormulaMacro();
41         ///
42         int Ascent(LyXFont const &font) const;
43         ///
44         int Descent(LyXFont const &font) const;
45         ///
46         int Width(LyXFont const &font) const;
47         ///
48         void Draw(LyXFont font, LyXScreen &scr, int baseline, float &x);
49         ///
50         void Read(LyXLex &lex);
51         ///
52         void Write(FILE *file);
53         ///
54 //      void Read(LyXLex &lex);
55         ///
56         int Latex(FILE *file, signed char fragile);
57         ///
58         int Latex(string &file, signed char fragile);
59         ///
60         int Linuxdoc(string &file);
61         ///
62         int DocBook(string &file);
63         ///
64         Inset* Clone();
65
66         /// what appears in the minibuffer when opening
67         char const* EditMessage() {return "Math macro editor mode";}
68         ///
69         void Edit(int x, int y);
70         ///
71         void InsetUnlock();
72    
73         bool LocalDispatch(int, char const*);
74    
75 protected:
76         void UpdateLocal();
77 private:
78         bool opened;
79         string name; 
80         class MathMacroTemplate* tmacro;
81
82 };
83
84
85 #endif
86