]> git.lyx.org Git - lyx.git/blob - src/mathed/MathSupport.h
b37d42bc33a01f47685c2fe0210c0a3c38ded029
[lyx.git] / src / mathed / MathSupport.h
1 // -*- C++ -*-
2 /**
3  * \file MathSupport.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Alejandro Aguilar Sierra
8  * \author André Pönitz
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef MATH_SUPPORT_H
14 #define MATH_SUPPORT_H
15
16 #include "support/docstring.h"
17
18 #include <string>
19 #include <vector>
20
21 namespace lyx {
22
23 class PainterInfo;
24 class LyXFont;
25 class Dimension;
26 class MathArray;
27 class MathAtom;
28 class InsetMath;
29
30
31 int mathed_char_width(LyXFont const &, char_type c);
32
33 int mathed_char_kerning(LyXFont const &, char_type c);
34
35 void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
36         docstring const & name);
37
38 void mathed_string_dim(LyXFont const & font,
39                        docstring const & s,
40                        Dimension & dim);
41
42 int mathed_string_width(LyXFont const &, docstring const & s);
43
44 void drawStrRed(PainterInfo & pi, int x, int y, docstring const & s);
45 void drawStrBlack(PainterInfo & pi, int x, int y, docstring const & s);
46
47 void math_font_max_dim(LyXFont const &, int & asc, int & desc);
48
49 void augmentFont(LyXFont & f, docstring const & cmd);
50
51 bool isFontName(docstring const & name);
52
53 // converts single cell to string
54 docstring asString(MathArray const & ar);
55 // converts single inset to string
56 docstring asString(InsetMath const &);
57 docstring asString(MathAtom const &);
58 // converts string to single cell
59 void asArray(docstring const & str, MathArray & ar);
60
61 } // namespace lyx
62
63 #endif