]> git.lyx.org Git - features.git/blob - src/mathed/support.h
51353904f929142be050c804103ded4ccbf009f8
[features.git] / src / mathed / support.h
1 // -*- C++ -*-
2
3 #ifndef MATH_SUPPORT_H
4 #define MATH_SUPPORT_H
5
6 #include "lyxfont.h"
7 #include "math_defs.h"
8
9 #ifndef byte
10 #define byte unsigned char
11 #endif
12
13 class Painter;
14 class MathArray;
15 class MathMatrixInset;
16
17 struct math_deco_struct {
18         int code;
19         float const * data;
20         int angle;
21 };
22
23 extern char const * math_font_name[];
24 extern char const * latex_mathspace[];
25
26 int mathed_char_height(short type, int size, byte c, int & asc, int & des);
27 int mathed_char_width(short type, int size, byte c);
28 void mathed_char_dim(short type, int size, byte c, int & asc, int & des, int & wid);
29
30 void mathed_draw_deco(Painter & pain, int x, int y, int w, int h, int code);
31
32 LyXFont mathed_get_font(short type, int size);
33
34 void mathed_string_dim(short type, int size, string const & s,
35   int & asc, int & des, int & wid);
36 int mathed_string_height(short type, int size, string const & s,
37   int & asc, int & des);
38 int mathed_string_width(short type, int size, string const & s);
39
40 math_deco_struct const * search_deco(int code);
41
42 bool MathIsInset(short x);
43 bool MathIsAlphaFont(short x);
44 bool MathIsBOPS(short x);
45 bool MathIsBinary(short x);
46 bool MathIsSymbol(short x);
47 bool MathIsRelOp(byte c, MathTextCodes f);
48
49 void drawStr(Painter & pain, short type, int siz,
50         int x, int y, string const & s);
51 void drawChar(Painter & pain, short type, int siz,
52         int x, int y, char c);
53 #endif