]> git.lyx.org Git - lyx.git/blob - src/mathed/MathSupport.h
Merge branch 'master' of git.lyx.org:lyx
[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 "MathParser_flags.h"
17 #include "support/strfwd.h"
18 #include <vector>
19
20 namespace lyx {
21
22 class MetricsInfo;
23 class PainterInfo;
24 class FontInfo;
25 class Dimension;
26 class MathData;
27 class MathAtom;
28 class InsetMath;
29
30
31 int mathed_char_width(FontInfo const &, char_type c);
32
33 int mathed_char_kerning(FontInfo 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(FontInfo const & font,
39                        docstring const & s,
40                        Dimension & dim);
41
42 int mathed_string_width(FontInfo const &, docstring const & s);
43
44 void metricsStrRedBlack(MetricsInfo & mi, Dimension & dim, docstring const & s);
45
46 void drawStrRed(PainterInfo & pi, int x, int y, docstring const & s);
47 void drawStrBlack(PainterInfo & pi, int x, int y, docstring const & s);
48
49 void math_font_max_dim(FontInfo const &, int & asc, int & desc);
50
51 void augmentFont(FontInfo & f, docstring const & cmd);
52
53 bool isFontName(docstring const & name);
54
55 bool isMathFont(docstring const & name);
56
57 bool isTextFont(docstring const & name);
58
59 // converts single cell to string
60 docstring asString(MathData const & ar);
61 // converts single inset to string
62 docstring asString(InsetMath const &);
63 docstring asString(MathAtom const &);
64 // converts string to single cell
65 void asArray(docstring const &, MathData &, Parse::flags f = Parse::NORMAL);
66
67 } // namespace lyx
68
69 #endif