]> git.lyx.org Git - lyx.git/blob - src/mathed/MathSupport.h
Fix display and export of some latex macros
[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
19 namespace lyx {
20
21 class MetricsInfo;
22 class PainterInfo;
23 class FontInfo;
24 class Dimension;
25 class MathData;
26 class MathAtom;
27 class InsetMath;
28
29
30 int mathed_font_em(FontInfo const &);
31
32 int mathed_thinmuskip(FontInfo font);
33
34 int mathed_medmuskip(FontInfo font);
35
36 int mathed_thickmuskip(FontInfo font);
37
38 int mathed_char_width(FontInfo const &, char_type c);
39
40 int mathed_char_kerning(FontInfo const &, char_type c);
41
42 void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
43         docstring const & name);
44
45 void mathed_string_dim(FontInfo const & font,
46                        docstring const & s,
47                        Dimension & dim);
48
49 int mathed_string_width(FontInfo const &, docstring const & s);
50
51 void metricsStrRedBlack(MetricsInfo & mi, Dimension & dim, docstring const & s);
52
53 void drawStrRed(PainterInfo & pi, int x, int y, docstring const & s);
54 void drawStrBlack(PainterInfo & pi, int x, int y, docstring const & s);
55
56 void math_font_max_dim(FontInfo const &, int & asc, int & desc);
57
58 void augmentFont(FontInfo & f, std::string const & cmd);
59
60 bool isFontName(std::string const & name);
61
62 bool isMathFont(std::string const & name);
63
64 bool isTextFont(std::string const & name);
65
66 bool isAlphaSymbol(MathAtom const & at);
67
68 // converts single cell to string
69 docstring asString(MathData const & ar);
70 // converts single inset to string
71 docstring asString(InsetMath const &);
72 docstring asString(MathAtom const &);
73 // converts string to single cell
74 void asArray(docstring const &, MathData &, Parse::flags f = Parse::NORMAL);
75
76 } // namespace lyx
77
78 #endif