]> git.lyx.org Git - lyx.git/blob - src/mathed/MathSupport.h
Coding style
[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/strfwd.h"
17 #include <vector>
18
19 namespace lyx {
20
21 class PainterInfo;
22 class FontInfo;
23 class Dimension;
24 class MathData;
25 class MathAtom;
26 class InsetMath;
27
28
29 int mathed_char_width(FontInfo const &, char_type c);
30
31 int mathed_char_kerning(FontInfo const &, char_type c);
32
33 void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
34         docstring const & name);
35
36 void mathed_string_dim(FontInfo const & font,
37                        docstring const & s,
38                        Dimension & dim);
39
40 int mathed_string_width(FontInfo const &, docstring const & s);
41
42 void drawStrRed(PainterInfo & pi, int x, int y, docstring const & s);
43 void drawStrBlack(PainterInfo & pi, int x, int y, docstring const & s);
44
45 void math_font_max_dim(FontInfo const &, int & asc, int & desc);
46
47 void augmentFont(FontInfo & f, docstring const & cmd);
48
49 bool isFontName(docstring const & name);
50
51 // converts single cell to string
52 docstring asString(MathData const & ar);
53 // converts single inset to string
54 docstring asString(InsetMath const &);
55 docstring asString(MathAtom const &);
56 // converts string to single cell
57 void asArray(docstring const & str, MathData & ar);
58
59 } // namespace lyx
60
61 #endif