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