]> git.lyx.org Git - lyx.git/blob - src/mathed/math_support.h
Georg Baum's vspace change
[lyx.git] / src / mathed / math_support.h
1 // -*- C++ -*-
2 /**
3  * \file math_support.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 <string>
17
18
19 class PainterInfo;
20 class LyXFont;
21 class Dimension;
22 class MathArray;
23
24 void mathed_char_dim(LyXFont const &, unsigned char c, Dimension & dim);
25 int mathed_char_width(LyXFont const &, unsigned char c);
26 int mathed_char_ascent(LyXFont const &, unsigned char c);
27 int mathed_char_descent(LyXFont const &, unsigned char c);
28
29 void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
30         std::string const & name);
31
32 void mathed_string_dim(LyXFont const & font, std::string const & s, Dimension & dim);
33 int mathed_string_width(LyXFont const &, std::string const & s);
34
35 void drawStr(PainterInfo & pi,
36         LyXFont const &, int x, int y, std::string const & s);
37 void drawStrRed(PainterInfo & pi, int x, int y, std::string const & s);
38 void drawStrBlack(PainterInfo & pi, int x, int y, std::string const & s);
39 void drawChar(PainterInfo & pi, LyXFont const & font, int x, int y, char c);
40
41 void math_font_max_dim(LyXFont const &, int & asc, int & desc);
42
43 void augmentFont(LyXFont & f, std::string const & cmd);
44
45 bool isFontName(std::string const & name);
46
47 // converts single cell to string
48 std::string asString(MathArray const & ar);
49 // converts string to single cell
50 void asArray(std::string const & str, MathArray & ar);
51
52 #endif